Questions tagged as 'c#'

1
answer

Coloring row in datagridview C #

I'm trying to use the following method: for (int i = 0; i < dgvRequisicao.Rows.Count; i++) { valor = Convert.ToDouble(dgvRequisicao.Rows[i].Cells["valor"].Value); if (valor > 20000.01 && valor &...
asked by 04.07.2016 / 19:48
1
answer

Consuming REST windows forms

I'm trying to consume a JSON REST, I'm developing a module for a legacy Windows Forms system, it's not working, it does not return anything. Follow the code: var client = new RestClient("https://selador.homologacao.portalseloam.com.br/auth"...
asked by 08.08.2016 / 16:16
1
answer

Starting a windows service

I'm setting up a "Service Monitor". My windows server is stopping the service from my database. So I mounted a service validator, but I do not know how to give the start service a new one if it crashes. This is the code of how far I have co...
asked by 15.07.2016 / 04:54
2
answers

Entity Framework: Object Refresh Error

I can not update my object. I created the method as follows: public void Atualizar(T obj) { banco.Entry(obj).State = EntityState.Modified; banco.SaveChanges(); } The following exception was thrown: Attaching an entity of type 'Pr...
asked by 15.07.2016 / 17:01
2
answers

Separate front-end and back-and-from executable

My idea is to separate the application into three different files, in the file MinhaAppBackend.dll , it will be, as the name suggests, all classes and other elements that are part of the application backend (Model, ViewModel, Daos etc ). I...
asked by 15.07.2016 / 20:19
1
answer

Linq - Relationship with 3 tables

Good morning. In my project (C # MVC), I need to query with three tables, being: TabCollection 1 - N TabVolume and TabVolume 1 - N TabAuthor Example: IneedtodisplaytheViewasfollows: The first difficulty is to create this query...
asked by 28.06.2016 / 17:46
1
answer

How to create method in C # to do insert of SQL Query 2? [closed]

How to create a method in C # to insert data, this method make more than one INSERT one behind the other? Because I tried here and it did not work!     
asked by 08.07.2016 / 13:54
1
answer

Error while logging in

I created a View here to login on my system, but in the ModelState.IsValid part only returns false , I do not know the reason, could someone help? My code for View is as follows: [HttpPost] [ValidateAntiForgeryTok...
asked by 14.06.2016 / 02:31
1
answer

Clear Form1 and add new things, such as the game maker's room system

Oops! How do I clean a form and put new elements in it? For example: Something like an installation screen when we click Next. Edit1: For example, this screen: Flipthisscreenbyclickingonanydollicon: So that one is not on top of the other,...
asked by 10.07.2016 / 18:44
1
answer

string.find (), what if I want to create something similar? [closed]

Well, I'd like to know how these "things" I do not know, in the case of string.find (), string.copy (), string.erase (); All I can do is stringpick (string). Remembering that I just quoted examples, what I really wanted to know is what those thi...
asked by 08.07.2016 / 02:14