Questions tagged as 'c#'

1
answer

Copy values from a DataGridView to a new DataTable in order to be compared

I have the following conflict, by means of several objects and queries I am consulting 4 different databases that together load information with a DataGrid , this DataGrid in turn must feed To another table with the information it...
asked by 15.12.2016 / 19:04
2
answers

Filling gridview with stored procedure

I am trying to fill a grid with data of sp I'm working with data, business and presentation layer This is where I call the business and then bring the data from the data layer (the sp ) BuscarListaPersonal(); the HTML...
asked by 14.12.2016 / 20:49
1
answer

How can I send an email using an xml file?

I have a program written in C # which has to send an email. What I'm looking for is that the content of the email comes from an xml file. Here is how I have the code of the post office: MailMessage mail = new MailMessage("[email protected]"...
asked by 27.02.2017 / 17:48
1
answer

Show the last day of each month on Date AjaxControlToolkit c #

Good a query as I do so that it is only active the last day of every month in date in aspx AjaxControlToolkit c #? <tr> <td>Fecha</td> <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></cc1...
asked by 01.03.2017 / 18:59
1
answer

Error connecting to a Mysql database. Object reference not set to an instance of an object

What I am trying to do is a simple connection method in c #, but at the moment that I want to make the connection with my Database I get the following error:    Reference to object not established as an instance of an object. Code where I...
asked by 23.03.2017 / 18:03
1
answer

correctly obtain decimal values in controller MVC

I created a view based on a model using MVC C # in this model I have a property for the cost of an event, which according to my country can contain the following valid values (separated by hyphen): $ 1,234.56 - $ 123,123 , 54 - $ 1.25 and the pr...
asked by 23.03.2017 / 19:49
3
answers

Close session in mvc c #?

I have the following code for a log Response.Cookies["correoRepresentante"].Value = CorreoL; Response.Cookies["correoRepresentante"].Expires = DateTime.Now.AddYears(1); Response.Cookies["passRepresentante"].Value = contrasena; Response.Cookies...
asked by 30.11.2016 / 00:49
2
answers

How do I get the data of a JsonConvert.DeserializeObject (s) object to be occupied as the value of a variable?

I have the following example string in string within an application C #: string json={"success":56,"msg_error":"credenciales no reconocidas"} That I receive a web service. What I need is to take the value of "success" and assign it to a var...
asked by 06.12.2016 / 01:22
1
answer

PointF to Centimeters c #

I'm working with a printdocument in which position I assign it with PointF variables, but I want to know how many units of this type of varibles are equivalent to one centimeter.     
asked by 18.11.2016 / 00:38
1
answer

Browse array of dates in C #

Good afternoon, requesting your help as I have this situation, from two different databases I have to get the working days in one month (L to V) and another get the holidays of the year, which I get for half of a cycle foreach , the proble...
asked by 14.11.2016 / 23:05