Example #1
0
 private void toolStripMenuItem2_Click(object sender, EventArgs e)
 {
     if (dataGridView2.CurrentRow.Tag != null)
     {
         var id = Convert.ToInt32(dataGridView2.CurrentRow.Tag);
         using (UserContext db = new UserContext(Settings.constr))
         {
             var item = db.CalculationConstants.FirstOrDefault(x => x.ID == id);
             CalculationConstantForm f = new CalculationConstantForm(this, 2, item);
             f.ShowDialog();
         }
     }
 }
Example #2
0
        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            CalculationConstantForm f = new CalculationConstantForm(this, 1, null);

            f.ShowDialog();
        }