Questions tagged as 'c#'

2
answers

How can I take a data from a DB and add it to another DateTime data in C #?

My question is this: I am using Visual Studio 2015 , and I am programming in C # for Windows Forms , the case that is I have a variable that is stored in a database of SQL Server 2008 , and the data that is there is of type int . What...
asked by 08.11.2016 / 20:37
2
answers

The query expects the parameter @Name that has not been provided

public bool IngresarUsuario(Prueba objeto) { using (SqlConnection cn = Conexion.Conectar("cadenaCon")) { try { cn.Open(); query = ("insert into Pruebas (Id,Nombre,Componente)values (@Id,@Nombre,@Co...
asked by 08.11.2016 / 18:47
2
answers

How to control the MessageBox in C #

My question is how to know if a MessageBox is already open so that they do not open more of the same message ?? private void timer1_Tick(object sender, EventArgs e) { //panelimgop.Location = new Point(panelimgop.Location.X +...
asked by 20.12.2016 / 16:26
2
answers

How to call the event ComboBox1_SelectedIndexChanged in c #

How to call the event ComboBox1_SelectedIndexChanged from a function? I want to trigger the events that are programmed in the SelectedIndexChanged .     
asked by 26.05.2016 / 19:56
1
answer

List of multidimensional arrays in c #

I am trying to create a vector of two positions, where in each position I add a two-dimensional matrix of type string , which led me to create a list of two-dimensional arrays as follows: List<String[,]> multi = new List<string[...
asked by 10.05.2016 / 09:52
1
answer

MVC 4 mark all checkboxes

Good morning, I'm doing a project in mvc4 razor, and in a view I need to show a table. So far so good, the problem comes when I have to put a checkbox in the header and one in each element of the table and the first checkbox mar...
asked by 22.06.2016 / 09:58
1
answer

datagridview with combo box

Hi, I'm trying to make a datagridview where one of the columns has a combo box TcType {Fuera de Servicio, Normal) ( Canton Type) . The code to fill in the datagrid view is as follows: dataGridViewTcCnf.DataSource = ConfData2.TcCnf.T...
asked by 19.02.2018 / 13:06
2
answers

How can I use the value of a variable with LINQ?

I'm trying to assign a variable to a select using LINQ. My function which makes it evaluate a data set to get the SourceID according to the caption that has been passed into the select. What I try to do is from an application in Windows Fo...
asked by 08.04.2016 / 16:32
1
answer

Query LINQ operator%

What does% 2 mean? string[] names = {"Geraldine", "Julieth", "Tatiana", "Maribel", "Susana", "Mónica"}; var Query = from x in names where (x.Length) > 5 && (((x.Length)%2)!=0) select x; Query.Dump();     
asked by 06.06.2016 / 01:44
1
answer

How to put local -portable- database in c # (visual studio 2015, sql server compact)?

I was doing a system in c # , I had it connected to a database in access . But I realized that maybe I could not; Generate the installer of the program and pass it to another person. Someone told me to try to put a database of Sql Server Comp...
asked by 08.06.2016 / 03:49