Questions tagged as 'c#'

2
answers

keep formatting in cell in datagridview c #

Good evening: I have a datagridview (dgv) where the "Price" column has the format "N2" defined in the DefaultCellStyle property of the dgv. When I change the value of the Price cell, the format is lost. For example, when I put 5 should be 5.00 a...
asked by 08.08.2016 / 02:40
2
answers

Convert sql query to linq

I have basic concepts of linq, but I stuck with a query with group by someone could help me translate this query from sql to linq: select at1,at2,count(1) from tabla where fecha=trunc(sysdate) group by at1,at2 Greetings.     
asked by 12.08.2016 / 22:26
2
answers

Include a dll as a reference and call objects of your class

I want to call the main function of the following class: class Program { static Pool _pool = null; static Work _work = null; static uint _nonce = 0; static long _maxAgeTicks = 20000 * TimeSpan.TicksPerMillisecond; static ui...
asked by 09.11.2016 / 14:10
2
answers

Do 3 different operations with a single C # button

I hope you can help me please, I want to perform the calculation of these 3 operations (2 divisions and 1 multiplication) with a single button (so I do not have to do them separately) but I do not know how to do it. My code is as follows: priv...
asked by 09.11.2016 / 02:49
2
answers

How to insert a date with c # and MySQL in reverse format?

My database is designed in such a way that the insertion of dates is under the format years / months / days and when sending the content of that control by means of c # to the database, I do not know of the appropriate sentence for convert it an...
asked by 06.11.2016 / 02:59
2
answers

Error Selecting Records with EntityFramework

Class that receives the query data public class EngineEntity { public string FacturaId { get; set; } public string Cliente { get; set; } public int? TipoFactura { get; set; } public double? Monto { get; s...
asked by 29.10.2016 / 14:37
2
answers

How to Convert ICollectiont1 in ICollectiont2

I have a LinQ To Entities Query, And an ActivityModel returns to me, but it really does the query to the Activity entity, and I assign each data as you can see it, but it brings me the Orders as Icollection<Orden> , and in Activit...
asked by 25.10.2016 / 23:57
1
answer

Problem with Visual C # [closed]

I am learning the language and I am doing a calculator to start with. The calculator should have a small system that simulates a memory where the numbers are stored. For example, if I write 56 and give it to the sum button, the number 56 should...
asked by 02.07.2016 / 08:27
4
answers

DataGridView C #

I have a DataGridView in this way: and this is my code Clicking on the register button does this: foreach (DataGridViewRow item in dgvEstudiantes.Rows) { int indice = dgvEstudiantes.CurrentRow.Index;...
asked by 22.06.2016 / 03:24
2
answers

Erroneous Coding in TextBox

A curious topic with a TextBox in Windows Forms is happening to me. I use a windows form for encrypting and decrypting strings, the case is that I have seen that if in the TextBox I write a character "\" internally saved two! For example if I en...
asked by 10.08.2017 / 10:11