Questions tagged as 'c#'

4
answers

how to generate an xml in memory

With the code below, I generate a file and write it somewhere, however, instead of writing to disk, I wanted to generate it in memory, how do I do that? using (var context = new ClassContexto(ClassMaster.conexao())) {...
asked by 19.01.2017 / 17:47
2
answers

How to perform a Where using Entity Framework

I have a web application that needs to present a list containing some data, for this, I created the Model: Crm_Analise : public class Crm_Analise { [Key] public int id { get; set; } public string cod_item_CRM { get; set; }...
asked by 12.07.2017 / 21:02
2
answers

How to scan a string and check content inside it?

I need to make a check with a given text within a string . How do I go through this string and look up the text to do this check? Example: If(dentro da string contém "Olá") { Mostre o valor determinado para essa string; }     
asked by 03.11.2015 / 13:41
2
answers

Doubt with sql command in C #

SqlCommand comm = new SqlCommand("UPDATE Contatos Set Telefone=" + " ' " + txtTelefone.Text + " ' " + ",Cidade=" + " ' " + txtCidade.Text + " ' " + ",Email=" + " ' " + txtEmail.Text + " ' " + ",Endereco=" + " ' " + txtEndereco.Text + " ' " + "WHE...
asked by 26.11.2015 / 17:29
2
answers

Sort a Multidimensional array per column C #

I have a multidimensional array: string[,] classificacao = new string[20, 2]; and it has the following inputs: classificação[0,0]="Hamilton"; //ISTO É O NOME DO JOGADOR classificação[0,1]="20"; //ISTO A SUA PONTUAÇÃO classificação[1,0]...
asked by 31.05.2017 / 20:41
2
answers

NotSupportedException error while setting value to a DataSource

I have a textBox and I want it, when typing something, the dataSource of my grid provider to be updated. I'm using the code below: private void txtNome_TextChanged(object sender, EventArgs e) { gridFornecedor.DataSource = modelOff.forne...
asked by 07.04.2017 / 16:36
1
answer

Is it possible to use composite key for Entity Framework with Model First?

I have the modeling down and I need to map composite keys as the embedded id of hibernate, but in the entity framework using the model first, is it possible?     
asked by 30.10.2015 / 22:48
1
answer

Send an SMS to one of your contacts

I have an application and in the end I wanted to send a msg to one of the user's contacts about my application. var columnNumber = cursor.GetColumnIndex(ContactsContract.CommonDataKinds.Phone.Number); contacto_numero = cursor.Get...
asked by 18.05.2016 / 13:32
2
answers

Doubt over HTTP POST

I'm trying to send SMS through a WebService. Sending a single SMS is simple. Just use the URL in this format: https://xxxxx.com/sendMessage?messageText=mensagemdeteste&destination=552199998888&key=XXXX However according to the We...
asked by 08.04.2015 / 20:17
3
answers

Inheritance in EntityFramework

I have a parent class DadosClientes and two child classes DadosClientesPF , and DadosClientesPJ . The DadosCliente instance has the field: Nome , Telefone The instance DadosClientePF has the fi...
asked by 07.04.2015 / 15:49