Questions tagged as 'c#'

1
answer

What kind of function should I use? [closed]

I'm trying to develop an application where when the value of a bool variable changes to false it should run a script. Should I use background_work to do this? If yes, how should I use it? And if not, how should I do it?     
asked by 02.03.2018 / 00:32
1
answer

Configuring the Web.Config file

I wonder if I can leave the recipient's email in web.config, if so, how do I deploy it. I created a variable and gave the value of the email, however if I need to change I will have to compile dnv, if I can put the recipient in web.config and on...
asked by 02.03.2018 / 14:23
2
answers

Update table after Insert to another

I have a table called Consumption, in this table I have a Quantity column. I have another table called Product, in this table I have an Inventory column. Whenever a new consumption is entered, one must choose a product and the quantity that w...
asked by 21.03.2018 / 18:48
1
answer

Query too slow to export in excel

I have created a method to export some columns to xls and the process is very slow, it takes almost one minute to do the whole process. public void Download(string datainicio, string datafinal, int? searchContrato, string searchCliente, st...
asked by 21.03.2018 / 13:22
1
answer

Decode string encoded by javascript in C #

Hello, this is the following .. In the site I am building, I record an information in the database, this information is a json, to be able to send this data to the database, I code them by javascript like this: p> encodeURI(dados); After tha...
asked by 15.05.2018 / 21:47
2
answers

How to insert new object into json file

The json file follows: [{"Id":0,"Nome":"","Endereco":""}] Follow the class: public class JsonResult { public int Id { get; set; } public string Nome { get; set; } public string Endereco { get; set; } } Follow the code below...
asked by 15.05.2018 / 21:42
1
answer

How do I display all the columns in my BD asp.net mvc

I wanted to know how to loop to print the columns of my grid with the values of the database, but it only showed 1 result even the database being huge, here is the code, thanks for the help CONTROLLER: using System.Collections.Generic; usin...
asked by 09.05.2018 / 19:03
1
answer

Return data from 2 tables entity framework

I have the following table: Movement -movement -Indicator -ProductId When I select a particular customer I want to list all of the trades in which they are together with the product. how would I call this inside the controller? That's what...
asked by 07.02.2018 / 00:27
1
answer

Get parameter by url to my controller

I need my controller to get a parameter from a URL ( localhost/Check/123456 ), where 12346 would be the parameter. I configured RouteConfig: public static void RegisterRoutes(RouteCollection routes) { routes.Ignore...
asked by 05.02.2018 / 18:36
1
answer

Generate values and dates of parcels in a datatable C #

Hello, I have a form where a Total Sale Value is placed, the Number of Payment Parcels. Then I would like my DataTable that is located on the other Form to display the values and due dates with their value divided by the number of months....
asked by 02.02.2018 / 20:31