Questions tagged as 'c#'

1
answer

ExecuteReader how to fill fields for search

I'm having a problem understanding how to return the values inside the form windows (fill in the textbox, etc.). This method runs the data reader but I'm not sure how to use it to fill in the fields. public bool BuscarCliente(int id) {...
asked by 20.10.2017 / 19:32
1
answer

Change text from another form does not work

Follow the code below: Form2: public void ChangeLabel(string s) { labelX1.Text = s; } And inside Form1: private void button_MostrarSegundaTela_Click(object sender, EventArgs e) { if (Screen.AllScreens.Length > 1) {...
asked by 20.10.2017 / 01:27
1
answer

Is there any way to compare all received parameters?

I have the following method public Boolean Teste(String nome, String telefone, String...) { if(!string.IsNullOrWhiteSpace(nome) || !string.IsNullOrWhiteSpace(telefone)...) {} } Is there a way to compare all of these received values in a...
asked by 23.01.2018 / 18:08
2
answers

Pass jquery parameters to Url.Action ASP.NET MVC [closed]

I'm having trouble setting up a URL with parameters. Until then I have been using @Url.Action , but the second parameter dataPesquisa is going null. I imagine that when the parameter passed directly to @Url.Action C # s...
asked by 31.10.2017 / 16:37
2
answers

How to simplify code using a loop?

How can I simplify the code below using a loop, I am in doubt because of the names of the labels that are sequential, as I put something variable in FieldName1, NomeCampo2 , ..., NomeCampoX . lblNomeCampo1.Text = dt.Rows[1][0].To...
asked by 30.10.2017 / 12:18
1
answer

My notifications are not coming and I think my code may be correct

I made several attempts to send Push Notification and none of them I could see in my App. I always thought until now, that I was wrong. But I followed two step by step and I saw that with the guys it was working and not with me. So I started to...
asked by 27.09.2017 / 20:42
1
answer

Disable Lazy Loading for a specified query

I'm having a sloppy problem when it comes to fetching the data. I have 16 thousand records in the table that are taking about 6 seconds to be fetched. I noticed that while bringing these records this is also bringing the related records du...
asked by 28.09.2017 / 20:17
3
answers

Compare if two date fields are the same in C #

I have form and in this form I have two date fields, campodata1 is populated by user and campodata2 is filled by the database, now I need a code to compare if these two fields have the same information. The fields...
asked by 07.03.2018 / 13:38
1
answer

Progress bar in second window

I'm creating a system that takes files from a server and copies it to my machine. I work in a software company and as we can not install systems from outside, I decided to create one myself. The system is up and running, but I'm improving it....
asked by 06.03.2018 / 07:38
1
answer

How to publish a WebService using Visual Studio C #?

I'm trying to publish a Webservice with Visual Studio but the connection is failing. Can anyone help me connect to this project? Here is the error message when I try to publish:    Publishing folder / ...   2> Unable to add 'Web.config' t...
asked by 25.09.2017 / 03:28