Questions tagged as '.net'

1
answer

Do a join make the search faster?

I have two tables, one for patients and one for queries. In summary, the tables have the following structure: Patients int id; string nome; string cartaoSus; Queries int id; int idPaciente; dateTime data; When I want a patient r...
asked by 05.07.2017 / 15:11
1
answer

Nested dispose is required?

I have the following hypothetical code. using (var QDR = new DAL.teste()) { //codigos using (var QDR1 = new DAL.teste1()) { //codigos using (var QDR2 = new DAL.teste2()) { // códigos } } } Is...
asked by 27.06.2016 / 15:39
1
answer

How to simulate the click of a button via code?

Buttons in WPF applications do not have Button.PerformClick . So, how could I simulate the click of a button via code?     
asked by 20.12.2016 / 22:26
1
answer

Differences in Constructors Using Property vs. Field

What's the difference between: namespace WMB.CieloB { internal class FuncoesCielo { internal FuncoesCielo(int iDC, Boleto boleto) { IDCliente = iDC; this.boleto = boleto;...
asked by 22.04.2016 / 14:31
1
answer

Execute builder of an Attribute

How do I call the constructor of an attribute before the constructor of the decorated class? For example, I have my attribute: using System; namespace T.WinForm { public class TesteAttribute : Attribute { public TesteAtt...
asked by 11.05.2016 / 02:27
3
answers

How to download a file from a URL using C #

Developing a project in C # I came across the following situation, I need to download files from some URL's, what is the best way to do this? Would there be any way to download a progress bar together?     
asked by 17.03.2017 / 18:55
1
answer

Lambda - how to use the || (OR) in an .Any ()

What would be the correct way to implement the line below in Lambda ? ListaDeRespostasPossiveis.Any(x => x.Nome == "respostaUm" || x.Nome == "respostaDois") I saw some examples in Stack Overflow in English, but I did not find it for the...
asked by 18.05.2017 / 01:33
2
answers

Parameter error in MySQL with C #

string sql = @"UPDATE ivendas SET nritem=(@rank:=(@rank+1)) where id_venda = 20"; try { MySQLBase basemysql = new MySQLBase(); MySqlCommand cmd = basemysql.connection.CreateCommand(); cmd.CommandText = sql; cmd.CommandTimeout = 10...
asked by 16.01.2018 / 18:37
1
answer

If I have two servers (application and database) with different time zones, which one is better to use as a base?

I am working with the MySQL server of a hosting, I can not change the time zone of the same, ie it uses the "Mountain Standard time (MST)", on the other hand, I am using the ASP.NET server and in it I can set the time zone for "Brasilia Timetabl...
asked by 10.01.2018 / 18:49
1
answer

Recover network-mapped disk drive volume name

I'm using DriveInfo.GetDrivers() to get the names of the disk drives present on the machine and list them in TreeView . I've made the code below that works, but the network disk names that my machine has access to do not appear,...
asked by 21.03.2016 / 17:50