Questions tagged as 'c#'

3
answers

How to use a variable from one form of c # in another [closed]

They could explain how I can use a variable declared in one form could be used in another.     
asked by 23.05.2016 / 19:10
2
answers

Update ComboBox

I have a class with public static List<Persona> Personas { get; set; } where people are saved. then in the main form when loading private void Principal_Load(object sender, EventArgs e) { recargar_CBPersonas();...
asked by 27.08.2018 / 21:39
2
answers

INNER JOIN listed in the Entity Framework

I have these 2 tables Table Products Table Balances I want to list the table in such a way that it shows me all the data of the first table plus the amount according to the id, I did it with this sentence: SELECT A...
asked by 25.08.2018 / 00:26
1
answer

C # Read name of local or remote Database

I need you to help me with something I do not know where to start. The idea is to read with C # the name of the database (MySQL) that is running on the pc where it is running, and subsequently, the tables that are under it. The latter is e...
asked by 18.06.2018 / 23:44
2
answers

How to make a conditional if depending on which model type my variable contains?

I have the following code below: var response = await ... the response of the await can be of two types, for example of type Model1 or of type Model2 depending on which type model is the answer I need to do certain things, it...
asked by 06.06.2018 / 21:13
2
answers

Select with LINQ

I need to recover the code of a division which is a string and return it to show later. The code I have is the following but there is something that does not work and I do not know what it is. Any suggestions? public string DivisionCode()...
asked by 07.06.2018 / 21:56
1
answer

How do I close an XML document that opens with XDocument in c #?

I want to save an XML document several times in a certain direction. The first time I save my document there is no problem, the situation comes after I want to write it with new information. Try doing it with the following code lines: XDocum...
asked by 31.05.2018 / 18:19
3
answers

Add columns of a mvc table

I have a table created in this way <table class="table table-bordered table-striped"> <tr> <th> @Html.DisplayNameFor(model => model.Sale.Date)...
asked by 18.07.2018 / 23:10
1
answer

How to fill array from a datatable

I'm doing an insertion of data from a sql database to a datatable to then dump that data into an arraylist that will contain and remove the rows, when executing the visual it collects the columns and goes into interruption and I can not find out...
asked by 25.05.2018 / 06:44
1
answer

How to add an indicator to the datagridview

What I would like to add in my Weight field that I show you below A word, that is to say for the values that are in ZERO "0" that in the gridview is visualized as NA and if it has a value different from ZERO, that conserves the value. I do...
asked by 07.09.2018 / 00:49