Questions tagged as 'c#'

1
answer

Convert a Session to Boolean - asp.net mvc?

I have in my system a Session that stores an information "S" or "N" Session["Administrador"] = retorno.ADMINISTRADOR; In the layout I want to make the conversion of it to boolean @{ bool administrador = bool.Parse(Session["Adminis...
asked by 09.11.2016 / 14:29
1
answer

How to run Procedures with Dapper

How can I run a store procedure with Dapper?     
asked by 10.11.2016 / 18:41
2
answers

If - Datatable condition

I need to compare a value of one of the fields of a DataTable , to accomplish a if condition, but I do not know how to do it. below: public partial class imp_orcamento : DevExpress.XtraReports.UI.XtraReport { Datatable_orcame...
asked by 08.08.2016 / 12:47
2
answers

How to know which button was clicked?

I have three buttons, one to insert , another to change and one to write . The record button will work to save data whether it is an insert or a change. How to identify which button I pressed for the Save button to know if I am rec...
asked by 16.08.2016 / 16:28
1
answer

Disable automatic refresh of a Grid [closed]

Hello, I have been trying to disable refresh a AjaxUpdatedControl of a RadGrid that occurs when I click a button on this Grid. Does anyone have any suggestions how to do this?     
asked by 01.09.2016 / 19:13
1
answer

Is there a reliable way to test your internet connection?

I read about the NetworkInterface.GetIsNetworkAvailable , but it does not work in my case, since I need to check if there is actually an internet connection. I also read about trying to access the Google page through a
asked by 06.09.2016 / 04:46
3
answers

DataTables highlight line with higher percentage

On my system I have a table mounted by DataTables . The data is received from the server via Ajax. Example of the data structure loaded in the table:    DDD | Processed | Approved | Percentage |       11 - 19 | 2.660 | 574 | 21.58...
asked by 01.09.2016 / 20:58
2
answers

TextBox_Changed is accumulating the value of the sum c #

I am using the textBox_Changed event and when I type a value in the field, another textBox should receive this value, but this other textBox called ValorTotalVenda is accumulating this value. private void textBox4_Te...
asked by 11.01.2017 / 14:36
1
answer

Reload DataGridView in C #

I'm creating an event from a button in which it creates a Product object and adds it to a list of Products and using this list to populate the DataSource of a dataGridView, but the DataGridView always keeps appearing a single product. private v...
asked by 09.01.2017 / 18:43
1
answer

When consuming an API that returns me serialized data in JSON, how do I know the data types of the properties?

I have no experience with JSON or web services, but I'm trying to consume an API that returns me weather data. Here is the documentation of the API I am trying to consume. This API returns me serialized data in JSON. As I read about JSON...
asked by 14.10.2016 / 03:24