Ejemplo n.º 1
0
 private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     using (SqlConnection sqlCon = new SqlConnection(connectionString))
     {
         sqlCon.Open();
         var item = dataGridView1.Rows[e.RowIndex].Cells[0].Value;
         if ((int)item > 100 && (int)item < 200) //Range 100++ tupos Souvlakia
         {
             var newForm = new S1();
             newForm.Show();
         }
         else if ((int)item > 200 && (int)item < 300) //Range 200++ tupos Crepes
         {
             var newForm = new S2();
             newForm.Show();
         }
         else if ((int)item > 200 && (int)item < 300) //Range 300++ tupos Burgers
         {
             var newForm = new S3();
             newForm.Show();
         }
         else //Range 400++ tupos Pizza
         {
             var newForm = new S4();
             newForm.Show();
         }
     }
 }
Ejemplo n.º 2
0
        private void label6_Click(object sender, EventArgs e)
        {
            var newForm = new S4();

            newForm.Show();
        }