Questions tagged as 'c#'

1
answer

Data table with AJAX C # ASP.NET SqlDataReader

Hi, I'm working with ASP.Net / SqlDataReader / C # and razor I have the sig. complication ... I'm trying to show a table using AJAX but I'm not sure I'm doing it right, so I understand I have to make a method for my query to be stored in a list...
asked by 03.10.2017 / 23:17
1
answer

How to make a grid select the first record if it depends on another grid

I have a model, of the form: public class A { public ObservableCollection B col1; } Public Class B { public int BA; public int BB; public ObservableCollection C; } public Class C { public int CA; public int CB; } The fir...
asked by 11.10.2017 / 17:56
1
answer

Events that do not fire because they are null even after assigning them

In the following example class, an object with an observable collection is created and filled by default, assigning an event to each class of its elements. However, when making a change on the elements, they do not know what the listener of t...
asked by 02.11.2017 / 20:42
2
answers

How to pass data in DataGridView to Other DataGridView?

I have two DataGridView in this way: What I need is that the CheckBox that are selected from the first DatagridView when pressing the Button "add" are passed to the second DataGridView .NOTA: The total...
asked by 31.07.2017 / 17:22
1
answer

How to add parameters to the EventHandler method that is added to the Click event in C #?

It turns out that I'm starting to program in C #, well, my problem is that I have a Button matrix and when I initialize the buttons I add a method in the Click event, I would like to know if parameters can be passed to the method of the event....
asked by 15.09.2017 / 23:03
3
answers

SQL Syntax - LINQ in C #

I'm doing a small application where I need to save data in SQL Server and then view it in a Datagrid using WPF. I'm not used to LINQ but I've already done some tests but it's not very clear to me because there are two types of syntax ... Exam...
asked by 10.09.2017 / 09:37
1
answer

Convert a switch to linq

Is there any way to convert this SWITCH to LINQ ? switch (row["grupo"]) { case "Genera ICAs": enuMetodo = TipoMovimientosStock.GeneraIca; break; case "Genera Remito de Compras": enuMetodo = TipoMovimientosSto...
asked by 12.09.2017 / 17:26
1
answer

Error trying to execute SQL statement, System.InvalidOperationException

I am developing an application in C # to recover data from a database. The case is: when I try to execute the statement I get this error:    "System.InvalidOperationException: Fill: The SelectCommand.Connection property has not been initializ...
asked by 20.09.2017 / 23:22
1
answer

Sign XML document with sha256 signature method

I develop an application that signs an XML document ... even there perfect ... But I must change this line of signature <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> for this one: <SignatureM...
asked by 03.01.2018 / 19:34
2
answers

How to get the value of a cell from a DataGrid?

I want to get the value of the UserID cell that has the following settings made with Visual Studio 2017 in a window (WPF) <DataGridTextColumn Binding="{Binding Path=idUsuario}" ClipboardContentBinding="{x:Null}" Header="idUsuario" He...
asked by 08.04.2018 / 09:13