Пример #1
0
 private void btnNew_Click(object sender, EventArgs e)
 {
     try
     {
         frmCreditNoteEntry fSM = new frmCreditNoteEntry((int)Constant.Mode.Insert, 0);
         fSM.ShowInTaskbar = false;
         fSM.ShowDialog();
         LoadList();
         btnClear_Click(sender, e);
     }
     catch (Exception exc)
     {
         Utill.Common.ExceptionLogger.writeException("Service Module", exc.StackTrace);
         MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
     }
 }
Пример #2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvCreditNote.CurrentRow != null)
         {
             if (dgvCreditNote.SortedColumn != null)
             {
                 sortedColumn  = dgvCreditNote.SortedColumn;
                 sortDirection = dgvCreditNote.SortOrder;
             }
             frmCreditNoteEntry fSM = new frmCreditNoteEntry((int)Constant.Mode.Modify, (Int64)dgvCreditNote.CurrentRow.Cells["CNID"].Value);
             fSM.ShowInTaskbar = false;
             fSM.ShowDialog();
             setDefaultGridRecords(sender, e);
         }
     }
     catch (Exception exc)
     {
         Utill.Common.ExceptionLogger.writeException("Service Module", exc.StackTrace);
         MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
     }
 }