Beispiel #1
0
 private void dgvStock_DoubleClick(object sender, EventArgs e)
 {
     String strStock = comboBox1.SelectedValue.ToString();
     String str = null;
     str = dgvStock.CurrentRow.Cells[0].Value.ToString();
     if (radioButton1.Checked == true)
     {
         minDate = dateTimePicker4.Value.ToString("yyyy-MM-dd", new CultureInfo("en-US"));
         dateTimePicker3.Value = DateTime.Now;
         maxDate = dateTimePicker3.Value.ToString("yyyy-MM-dd", new CultureInfo("en-US"));
     }
     else if (radioButton2.Checked == true)
     {
         minDate = dateTimePicker4.Value.ToString("yyyy-MM-dd", new CultureInfo("en-US"));
         maxDate = dateTimePicker1.Value.ToString("yyyy-MM-dd", new CultureInfo("en-US"));
     }
     else if (radioButton3.Checked == true)
     {
         minDate = dateTimePicker2.Value.ToString("yyyy-MM-dd", new CultureInfo("en-US"));
         maxDate = dateTimePicker3.Value.ToString("yyyy-MM-dd", new CultureInfo("en-US"));
     }
     if (str != null)
     {
         StockAsiaDrink.COStockCard Frm = new StockAsiaDrink.COStockCard(dgvStock.CurrentRow.Cells[0].Value.ToString(), dgvStock.CurrentRow.Cells[1].Value.ToString(),
             minDate, maxDate, strStock);
         Frm.ShowDialog();
     }
 }
Beispiel #2
0
 private void dgvStocks_DoubleClick(object sender, EventArgs e)
 {
     String strStock = comboBox1.SelectedValue.ToString();
     String str = null;
     str = dgvStocks.CurrentRow.Cells[0].Value.ToString();
     if (str != null)
     {
         if (checkBox1.Checked == true)
         {
             StockAsiaDrink.COStockCard Frm = new StockAsiaDrink.COStockCard(dgvStocks.CurrentRow.Cells[0].Value.ToString(), dgvStocks.CurrentRow.Cells[1].Value.ToString(),
             theDate1, theDate2,strStock);
             Frm.ShowDialog();
         }
         else
         {
             StockAsiaDrink.COStockCard Frm = new StockAsiaDrink.COStockCard(dgvStocks.CurrentRow.Cells[0].Value.ToString(), dgvStocks.CurrentRow.Cells[1].Value.ToString(),
             "", "",strStock);
             Frm.ShowDialog();
         }
     }
 }