Questions tagged as 'c#'

1
answer

Error with lambda and float fields

Whenever I load my lambda, give me this error:    System.InvalidOperationException: 'The specified cast from a   materialized 'System.Double' type to the 'System.Single' type is not   valid. ' This only happens with float fields. If I comm...
asked by 23.08.2017 / 15:14
1
answer

Populate a DataGrid with data from a list but informing which columns I want to display

Dear colleagues. I want to find a Datagrid from a list. The detail is that I want to select the columns to be displayed. If you do not inhibit the auto-generation of the columns there is usually the data. But if you inhibit auto generation, i...
asked by 04.08.2017 / 22:19
1
answer

Problem writing ComboBox data in Postgresql

First is the code of the bank I'm using: CREATE TABLE perguntas ( cod_pergunta SERIAL PRIMARY KEY NOT NULL, pergunta VARCHAR(500), opcao_um VARCHAR(500), opcao_dois VARCHAR(500), opcao_tres VARCHAR(500), opcao_quatro V...
asked by 30.08.2017 / 15:12
1
answer

Error executing a query with npgsql + dapper in postgresql

I can get my "user" object that has a "Login and Password" inside it, and when I run the function through my ORM, I get the following error message:    {"42883: operator does not exist: @ character varying"}. Could anyone tell me what mig...
asked by 30.08.2017 / 07:53
2
answers

Problem with async task

I'm bumping my head to be able to solve it but I can not, the error you're giving is An asynchronous module or handler completed while an asynchronous operation was still pending. source error: An unhandled exception was gen...
asked by 01.09.2017 / 16:31
2
answers

Create ServiceController array dynamically

I would like to create a Windows services monitoring and want to register a customizable amount of services. For this I need to have a ServiceController array dynamically, the problem is that of Exception when I try to assign the service name to...
asked by 01.09.2017 / 17:09
1
answer

Event DataGridView.CellClick

How can I use the DataGridView.CellClick event to click on a single column? The way I did it in my code if I click any part of the datagrid it does the action, and did not want it to be that way I want to click one and a specific colum...
asked by 22.09.2017 / 14:25
1
answer

Do not go to another FORM1 while FORM2 is open

Suppose you have two forms, the first form1 is the main screen which gives you an option to open another form, when this form is open, the user can not go to the main form until he closes / closes form2 . How do I do this?     
asked by 24.06.2017 / 22:19
1
answer

ICollection in Put WebApi method

I have the Put method in a WebApi Rest service // PUT: api/pessoas/5 [ResponseType(typeof(void))] public IHttpActionResult Putpessoa(int id, pessoa pessoa) { if (!ModelState.IsValid) {...
asked by 28.06.2017 / 12:38
1
answer

Get error message in Post HttpClient

I have a WCF Service on a server whose service is also configured as WebInvoke: [WebInvoke( Method = "POST", UriTemplate = "/work", BodyStyle = WebMessageBodyStyle.WrappedResponse, ResponseFormat = WebMessageFor...
asked by 28.06.2017 / 14:22