Questions tagged as 'c#'

1
answer

I can not modify table record using EF

I have the following table in SQL, which has those 4 data Through EF I am trying to update the records say ID 3 to be "40" but for more I try the amount always remains at zero This is the code I'm using: /*SE AGREGA SALDO AL SALDO...
asked by 25.08.2018 / 11:52
2
answers

Blank page in ReportViewer

It turns out that I create a report in ReportViewer with data from the database in sql server and I generate it as A4 sheet in horizontal, the issue is that when I put the preview it generates two sheets with one data and another blank , I alrea...
asked by 27.08.2018 / 17:30
1
answer

Return Saved Registry ID (AJAX - MVC5 - ASP.NET)

I have a form that is sent by Ajax and stored correctly in the database. How can I make that at the time of saving, it returns the ID of that record that I just stored ?, since in another part of the document I have another form that needs that...
asked by 28.08.2018 / 00:45
1
answer

Fill a label from a datatable

Someone can help me, what happens is that I would like to fill label with data from a query in sql, the query returns only one result but I can not show it in label this is my code in c #: conexion.Open(); SqlCommand cmd2 = conex...
asked by 06.09.2018 / 02:30
1
answer

object reference not set as instance of a string object []. split (char) [duplicate]

I have this code StreamReader productosfile; string linea; string[] corte = new string[6]; productosfile = File.OpenText("productos.txt"); if (File.Exists("productos.txt")) { do { linea = productosfile.ReadLine(); cor...
asked by 06.09.2018 / 02:17
1
answer

post images

I am developing a website link in which I have a page that uploads images to a server of Windows Server type. The folder where I want the images to be saved is in the same one that the project is located in, that is to say. C:\Users\adm...
asked by 06.09.2018 / 21:10
1
answer

Compare 2 columns in DataGridview

I have 2 DataGridview that load information from a database in MySQL, in the dataA I have schedules, with a column time and a data type: 09:30 ( String ) and in dataB I have the data of the appointments assigned for th...
asked by 08.09.2018 / 22:53
1
answer

MySQL query does not show data [closed]

Someone to help me, I'm doing a query in MySQL with C #, but it does not show me any data, this is the query I'm doing: public DataTable Espera(String Programa, String FI, String FF) { DataTable dt = new DataTable(); String...
asked by 02.10.2018 / 00:04
1
answer

Delete xml elements

Hi guys I'm loading the tag items from the following xml in a dridView: <?xml version="1.0" encoding="utf-8"?> <grammar xmlns="http://www.w3.org/2001/06/grammar" version="1.0" xml:lang="es-MX" mode="voice" tag-format="semantics/1.0" r...
asked by 01.10.2018 / 17:59
2
answers

Establish that all the fields that they fill in the grid are string C # + Windows Forms

I have a problem filling a datagridview and it is that when filling it some data disappears in some cells, and I think it is because they are established with a predetermined format by the same datagrid when filled, I would like to know how to m...
asked by 02.10.2018 / 18:22