Example #1
0
 private void btnReport_Click(object sender, EventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(combFeeName.Text))
         {
             throw new Exception("Select a fee to report");
         }
         DailyReports.GetlastReport(combFeeName.Text, dateTimeReport.Value.ToString("MM/dd/yyyy"));
         DailyReports.InsertDailyReport(combFeeName.Text, RecordAccess.total, RecordAccess.RecordDate);
     }
     catch (Exception Ex)
     {
         MessageBox.Show(Ex.Message + " \nReport Not Successful", "Cash Desk", MessageBoxButtons.OK,
                         MessageBoxIcon.Information);
     }
 }
Example #2
0
 private void btnReport_Click(object sender, EventArgs e)
 {
     try
     {
         var feeDate = dataGridRecords.Rows[0].Cells[6].Value.ToString();
         DailyReports.GetlastReport(combFeeName.Text, feeDate);
         DailyReports.InsertDailyReport(combFeeName.Text, RecordAccess.total, RecordAccess.RecordDate.ToString());
     }
     catch (IndexOutOfRangeException Ex)
     {
         throw new Exception("No Records Found");
     }
     catch (Exception Ex)
     {
         MessageBox.Show(Ex.Message + " \nReport Not Successful", "Cash Desk", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }