Questions tagged as 'c#'

1
answer

HttpWebRequest with SSL

When I have to reproduce a few steps ( GETS and POSTS ) of an access all https using .net I need to use ServicePointManager.ServerCertificateValidationCallback . So here's my question: do I have to declare before doing...
asked by 07.08.2015 / 13:36
1
answer

Deploy WindowsForms with .mdf database

I made a program in Windows Forms (C #) in layers. Model DAO BLL Interface Create in the Model Project a Bank (Generator.mdf) and its Context (edmx). Now I want to publish, and how do I get the .mdf file to come with publish?...
asked by 11.08.2015 / 04:52
1
answer

Floating-point result for decimal variable

I have the following variable: decimal resultado = 0.0m; I need to assign the result of a division to this variable: resultado = (1 / 2) * (-1); The result has been 0 , but should be -0.5 . I think I need to do some kind of...
asked by 11.08.2015 / 13:50
1
answer

WebBrowser problem to click on site elements

Hello everyone! I need to access this link: link Using IE, Chrome, Firefox ... any browser I normally get without any error, but when trying to access this link through Webbrowser the site simply gets bugged. 1) I'll explain it better: T...
asked by 09.08.2015 / 22:58
1
answer

Report from DataSet created in a Class

How do I create a Visual Studio 2013 Report from a DataTable (or DataSet) created in a method? When fetching the Report.rdlc data source I reference the class where the DataTable is created, but it is not listed as DataSource. I tried to a...
asked by 10.09.2015 / 19:10
1
answer

Capture datagrid id

If I want to capture the value of the ID column of the selected row, do I necessarily need to use the wind SelectionChanged , which is to be fired at every row change in the datagrid? Or just dataGridView1.CurrentRow.Cells[0].Value ,...
asked by 12.09.2015 / 01:39
1
answer

CRUD error with .NET MVC

I'm trying to recover some data from my bank, but it's giving the following error    Specified key was too long; max key length is 767 bytes I have no idea what's going on. User Class public class Usuario { [Key] public...
asked by 10.09.2015 / 21:13
2
answers

CSharp Fill ComboBox with query, however bring already selected the option saved in the bank

I have a product registration screen with a LOCAL Combobox. Product table has LOCAL ID, called pro_local. And the local table the fields loc_cod and loc_descricao My combobox is populated with the function: public DataTable RetornaLocal()...
asked by 31.07.2015 / 19:11
1
answer

Calculate change between textbox?

Good night, I have 3 textbox, and I would like someone to provide a code to help me, when I select the product on the grid the total value is added in textbox1, and so on, the more I add products, the more it adds, I would like a code that when...
asked by 01.08.2015 / 05:29
1
answer

How to get the neighborhood through geolocation?

All other fields return normally through geolocation, only the neighborhood comes in white. What's wrong?     
asked by 02.08.2015 / 20:36