Click here to Skip to main content
15,896,382 members
Home / Discussions / C#
   

C#

 
QuestionPrint if checkbox ticked? Pin
Member 1062775714-Oct-16 10:45
Member 1062775714-Oct-16 10:45 
AnswerRe: Print if checkbox ticked? Pin
NotPolitcallyCorrect14-Oct-16 11:39
NotPolitcallyCorrect14-Oct-16 11:39 
AnswerRe: Print if checkbox ticked? Pin
Midi_Mick14-Oct-16 14:09
professionalMidi_Mick14-Oct-16 14:09 
AnswerRe: Print if checkbox ticked? Pin
omeecode17-Oct-16 18:46
omeecode17-Oct-16 18:46 
QuestionPolymorphism Pin
Vanichandrik Suptajesacar13-Oct-16 17:00
Vanichandrik Suptajesacar13-Oct-16 17:00 
AnswerRe: Polymorphism Pin
OriginalGriff13-Oct-16 19:07
mveOriginalGriff13-Oct-16 19:07 
GeneralRe: Polymorphism Pin
Peter_in_278013-Oct-16 19:37
professionalPeter_in_278013-Oct-16 19:37 
GeneralRe: Polymorphism Pin
OriginalGriff13-Oct-16 19:44
mveOriginalGriff13-Oct-16 19:44 
AnswerRe: Polymorphism Pin
Nathan Minier14-Oct-16 1:56
professionalNathan Minier14-Oct-16 1:56 
QuestionHow to integrate Facebook marketing API in window application using c# Pin
Member 1063574713-Oct-16 3:11
Member 1063574713-Oct-16 3:11 
AnswerRe: How to integrate Facebook marketing API in window application using c# Pin
Eddy Vluggen13-Oct-16 3:38
professionalEddy Vluggen13-Oct-16 3:38 
QuestionHTMLtoPDF Downloader Pin
Member 1279065812-Oct-16 18:29
Member 1279065812-Oct-16 18:29 
AnswerRe: HTMLtoPDF Downloader Pin
Member 1279065812-Oct-16 18:41
Member 1279065812-Oct-16 18:41 
AnswerRe: HTMLtoPDF Downloader Pin
Nathan Minier13-Oct-16 3:13
professionalNathan Minier13-Oct-16 3:13 
AnswerRe: HTMLtoPDF Downloader Pin
yellow flower18-Oct-16 1:39
yellow flower18-Oct-16 1:39 
QuestionC# Stopwatch - DateTime And Timer Tick - Is there a better way to run the Stopwatch Pin
Member 1275660312-Oct-16 12:05
Member 1275660312-Oct-16 12:05 
AnswerRe: C# Stopwatch - DateTime And Timer Tick - Is there a better way to run the Stopwatch Pin
Midi_Mick12-Oct-16 19:05
professionalMidi_Mick12-Oct-16 19:05 
AnswerRe: C# Stopwatch - DateTime And Timer Tick - Is there a better way to run the Stopwatch Pin
OriginalGriff12-Oct-16 22:47
mveOriginalGriff12-Oct-16 22:47 
AnswerRe: C# Stopwatch - DateTime And Timer Tick - Is there a better way to run the Stopwatch Pin
Bernhard Hiller13-Oct-16 22:08
Bernhard Hiller13-Oct-16 22:08 
AnswerRe: C# Stopwatch - DateTime And Timer Tick - Is there a better way to run the Stopwatch Pin
omeecode15-Oct-16 8:56
omeecode15-Oct-16 8:56 
QuestionHTML.Kendo.ComboBox [Error: Object doesn't support property or method 'requestData'] Pin
Atul Shriram rane11-Oct-16 17:57
Atul Shriram rane11-Oct-16 17:57 
AnswerRe: HTML.Kendo.ComboBox [Error: Object doesn't support property or method 'requestData'] Pin
NotPolitcallyCorrect12-Oct-16 4:53
NotPolitcallyCorrect12-Oct-16 4:53 
GeneralRe: HTML.Kendo.ComboBox [Error: Object doesn't support property or method 'requestData'] Pin
Pete O'Hanlon12-Oct-16 4:59
mvePete O'Hanlon12-Oct-16 4:59 
GeneralRe: HTML.Kendo.ComboBox [Error: Object doesn't support property or method 'requestData'] Pin
NotPolitcallyCorrect12-Oct-16 5:47
NotPolitcallyCorrect12-Oct-16 5:47 
QuestionI have a search button and datagrid in c# and SQL Pin
antonio_dsanchez11-Oct-16 11:16
antonio_dsanchez11-Oct-16 11:16 
C#
hi all
 
I have a search button and datagrid in c#, I require perform a query in the database and load the data in me datagrid
 
it is my code


C#
conexion.ConnectionString = @"Data Source = SHINIL-PC040\SQLEXPRESS; Initial Catalog = produccion; Integrated Security = True";  
            if(TXTORDEN_PRODUCCION.Text == "" || TXTTURNO.Text == "" || TXTMAQUINAS.Text == "" || TXTHORAINICIO.Text == "" || TXTHORAFIN.Text == "")  
            {  
                MessageBox.Show("Te falta campo");  
            }  
            else  
            {  
                 
                if (checkBox1.Checked == true)  
                {  
                    try  
                    {  
  
                        comando.Connection = conexion;  
                        conexion.Open();  
                        string SqlAction = "select orden, turno, operador, horainicio, horafin, articulo, totalpiezasok, totalcajas, piezascondefecto, maquina from conteo2 where CONVERT(varchar(10), horafin, 108) >= @horainicio and CONVERT(varchar(10), horafin, 108)<= @horafin and orden = @orden  and turno = @turno and maquina = @maquina ";  
                        // "SELECT MOLDE, PROYECTO, ITEMPARTE, COLOR, SNP FROM PARTE WHERE ITEMPARTE = @ITEMPARTE";  
                        SqlCommand cmd = new SqlCommand(SqlAction, conexion);  
                        cmd.Parameters.AddWithValue("@orden", TXTORDEN_PRODUCCION.Text);  
                        cmd.Parameters.AddWithValue("@turno", TXTTURNO.Text);  
                        cmd.Parameters.AddWithValue("@maquina", TXTMAQUINAS.Text);  
                        cmd.Parameters.AddWithValue("@horainicio", TXTHORAINICIO.Text);  
                        cmd.Parameters.AddWithValue("@horafin", TXTHORAFIN.Text);  
  
                         
                        }  
  
                        conexion.Close();  
                    }  
                    
                    catch (Exception Ex)  
                    {  
                        MessageBox.Show(Ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);  
                    }  
                }  
                MessageBox.Show("selecciono ok produccion");  
                }  
                if (checkBox2.Checked == true)  
                {  
                    MessageBox.Show("selecciono paros");  
                }  
                if (checkBox1.Checked == false & checkBox2.Checked == false)  
                {  
                    MessageBox.Show("tiene que seleccionar un reporte");  
                }  
            }  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.