Exemplo n.º 1
0
 public void EditOperation(object sender, EventArgs e)
 {
     if (_currentGridView == 0)
     {
         return;
     }
     if (_currentGridView == 1)
     {
         var i = incomeDataGridView.CurrentRow?.DataBoundItem as Income;
         if (i == null)
         {
             return;
         }
         using (var form = new EditOperationForm(i))
         {
             form.ShowDialog();
         }
     }
     else
     {
         var o = outlayDataGridView.CurrentRow?.DataBoundItem as Outlay;
         if (o == null)
         {
             return;
         }
         using (var form = new EditOperationForm(o))
         {
             form.ShowDialog();
         }
     }
     UpdateForm();
 }
Exemplo n.º 2
0
 public void AddOperation(object sender, EventArgs e)
 {
     using (var form = new EditOperationForm())
     {
         if (form.ShowDialog() == DialogResult.OK)
         {
             UpdateForm();
         }
     }
 }