示例#1
0
 private void btnReceipt_Click(object sender, EventArgs e)
 {
     try
     {
         if (printTime > 0)
         {
             CashID();
             ReceiptView RV = new ReceiptView();
             RV.ShowDialog();
         }
         else
         {
             throw new Exception("No receipt to print, print from \"Records\"");
         }
     }
     catch (Exception Ex)
     {
         MessageBox.Show(Ex.Message + "\nReceipt Could Not Be Generated", "Receipt Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#2
0
 private void btnReceipt_Click(object sender, EventArgs e)
 {
     try
     {
         lblTotal.Visible   = false;
         checkTotal.Checked = false;
         if (dataAccess.DcashId == 0)
         {
             throw new Exception("Click on a Record to Select ");
         }
         else
         {
             ReceiptView rv = new ReceiptView();
             rv.ShowDialog();
         }
     }
     catch (Exception Ex)
     {
         MessageBox.Show(Ex.Message + "\nReceipt Preview Failed", "make a Selection", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }