Questions tagged as 'c#'

0
answers

Problem with Return from Parallel.ForEach

Good evening everyone! I am making a system in C # WindowsForms for validation of FEBRABAN V2 model phone bills. The files usually have between 600Mb to 15Gb, so I opted for the use of Parallel.ForEach, and really turned the performance in...
asked by 12.05.2016 / 18:13
0
answers

Multiple connections with bank - Executable c # with multi task

I have an executable that I need to run a giant database. As the processing time would be unfeasible if I did in a single Thread .... Following the idea of this question , I decided to create an executable that does N tasks in parallel...
asked by 25.04.2016 / 17:17
2
answers

textbox saving in the same bank while being empty

Validation and message: if (txtFone.Text.Trim() == string.Empty) { MessageBox.Show("O campo Telefone é obrigatório!"); txtFone.Focus(); return false; } Record button code: if (this.Valida()) { Model.clie...
asked by 25.04.2016 / 19:10
1
answer

Identify the largest number

I'm doing resource tracking software and I'm having a hard time getting it to identify the most. public string max() { System.Diagnostics.Process[] ieProcs = Process.GetProcessesByName("devenv"); double avvv = 0; s...
asked by 16.04.2016 / 15:35
1
answer

ScriptManager.RegisterStartupScript and a Key

Good afternoon, I wanted to understand how this Key works, I have a function in aspx that I need in code-behind, but when I call it with a static Key, putting csname = "x"; It's only called once, but I need to be called as many times a...
asked by 15.04.2016 / 19:01
0
answers

Big loop inside of others

The challenge is to find x different ways of dividing the object, for 3 people in which each has to receive a value less than or equal to M, and the sum of the value that each one has had to be equal to N, Here is the code I did: int m,n; m = 9...
asked by 15.04.2016 / 22:40
1
answer

C # List - Insert into the database

I have an app that takes information from a TextBox , inserts into a List<> list, and then shows a CheckBoxList . Example: List<string> quantidade = new List<string>(); for (int i = 0; i < CheckBoxListLinhas.I...
asked by 15.04.2016 / 13:20
1
answer

Terminating two threads with ProgressBar in C #

I'm doing a ProgressBar of file conversions, with each converted file, it is updated to ProgressBar with a percentage of the total files to be converted. I read in a Tutorial how to do ProgressBar , work with Threads...
asked by 15.04.2016 / 18:11
1
answer

Join multiple values of type IQueryable

I'm receiving from my View an array of values with the days of the week. Sunday, Monday, etc. I want to compare this array with a string attribute of my database and save it to a variable of type "IQueryable". And go adding the contents of the t...
asked by 18.04.2016 / 12:50
1
answer

Update, Insert in the Entity Framework Using View?

I'm having an error in my project when trying to give a Update or an Insert via Entity Framework, where I mapped a view of data. defined. I also saw that I could change that, but I could not find where. Does anyone know how...
asked by 10.04.2016 / 08:10