예제 #1
0
 private void btnAddPayment_Click(object sender, EventArgs e)
 {
     try
     {
         frmEditPayment fEdit = new frmEditPayment(db_connection, usr);
         fEdit.ShowDialog();
         if (fEdit.DialogResult == DialogResult.OK)
             LoadGrid();
         fEdit.Close();
     }
     catch(Exception ex)
     {
         ErrorNfo.WriteErrorInfo(ex);
     }
 }
예제 #2
0
 private void btnEditPayment_Click(object sender, EventArgs e)
 {
     try
     {
         if (int.Parse(GridPayment.Rows[GridPayment.Row][1].ToString()) > 0)
         {
             if (int.Parse(GridPayment.Rows[GridPayment.Row][11].ToString()) != 1)
             {
                 frmEditPayment fEdit =
                     new frmEditPayment(db_connection, usr, int.Parse(GridPayment.Rows[GridPayment.Row][1].ToString()));
                 fEdit.ShowDialog();
                 if (fEdit.DialogResult == DialogResult.OK)
                     LoadGrid();
                 fEdit.Close();
             }
             else
             {
                 MessageBox.Show("Этот платеж внесен автоматической системой и не может быть изменен!", "Ошибка",
                                 MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
     catch(Exception ex)
     {
         ErrorNfo.WriteErrorInfo(ex);
     }
 }