Questions tagged as 'c#'

1
answer

How to pass DataGridView to Crystal Report?

I have a GridView in asp.net and I need to click on a print button to generate a report crystal reports with the data of GridView . So I have filled my GridView SqlConnection con = new SqlConnection(ConfigurationManager....
asked by 15.03.2018 / 17:16
2
answers

How to serialize / deserialize a node of type CDATA

The next class (of an xml) has several attributes and contains text. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.6.1055.0")] [System.SerializableAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [Syste...
asked by 07.09.2017 / 17:20
1
answer

The input array of your table is too long, Datatable and C #

My problem is that I have a datatable of 48 positions that would be the following: #region tablaRectificacionesImportaciones dt_rectificacionesImportaciones.Columns.AddRange(new DataColumn[48] { new DataCo...
asked by 29.03.2017 / 18:11
1
answer

Convert Data Table to INT and Add Values

Good morning, I need help in the following, I have a table that is filled by a DataTable, now I include my project a dropdownlist (DDL) to change a column in specifies depending on the date selected in the DDL, My inconvenience is with the pa...
asked by 27.03.2017 / 19:32
2
answers

Retrieve accents in C #

I can not retrieve a text with a tilde in StringBuilder of c # The silly example would be this: System.Text.StringBuilder sbEx = new System.Text.StringBuilder(); sbEx.Append("<br />Hoy es día " + dia.ToShortDateString() + "."...
asked by 03.07.2017 / 12:06
2
answers

Declaring variable of the same type of class that contains it

Greetings I've been studying data structures and I've run into a very curious syntax and I've been trying to find answers and I have not found them. public class CNodo { //Aqui colocamos el dato o datos que guarda el nodo private int...
asked by 12.10.2018 / 15:57
1
answer

Algorithm for adding daughter account values in parent accounts in C # .NET

What happens is that I have a list with three fields, which are: Cuenta , importe_A e importe_B . Example of information: Cuenta = "1000.2.15.3" Importe A = 230 Importe B = 500 Cuenta = "1000.2.15.4" Importe A =...
asked by 26.10.2018 / 05:02
3
answers

How to convert query from sql to linq?

I need to convert the following query to linq select * from detalle_pedido where articuloid = 13555 and id_pedido=13 I've tried it in the following way var querydetalle = _db.detalle_pedido.Where(dt => dt.articuloid == articu.articuloi...
asked by 30.10.2018 / 16:36
1
answer

What is the correct way to implement TOASTR?

I'm working with ASP.NET MVC 4, C #, I need to implement toastr following a manual, implement it on the server side and do it once with a base class. Extend MVC controller to support Toastr messages But they also recommend implementing it o...
asked by 13.12.2016 / 02:55
1
answer

Problems using LINQ to SQL

I try to bring a data collection using LINQ to SQL but when I run the app it gives me an error, I'm using Visual Studio 2012 SQL Server 2008, Windows Forms app. private IEnumerable<Customers> ListarCustomers() { using (North...
asked by 01.11.2016 / 19:07