Exemple #1
0
        //This is the Cashout Report
        protected void BtnCashOutReport_Click(object sender, EventArgs e)
        {
            //Collects current method for error tracking
            string method = "btnCashOutReport_Click";

            object[] objPageDetails = { Session["currPage"].ToString(), method };
            try
            {
                object[] reportLog = { 1, CU.employee.intEmployeeID, CU.location.intLocationID };
                R.CallReportLogger(reportLog, objPageDetails);
                //Stores report dates into Session
                DateTime[] dtm       = GetDateRange();
                object[]   repInfo   = new object[] { dtm, Convert.ToInt32(ddlLocation.SelectedValue) };
                int        indicator = R.CashoutsProcessed(repInfo, objPageDetails);
                ////Check to see if there are sales first
                if (indicator == 0)
                {
                    Session["reportInfo"] = repInfo;
                    Response.Redirect("ReportsCashOut.aspx", false);
                }
                else if (indicator == 1)
                {
                    MessageBoxCustom.ShowMessage("No CashOuts have been processed for selected date range.", this);
                }
            }
            //Exception catch
            catch (ThreadAbortException) { }
            catch (Exception ex)
            {
                //Log all info into error table
                ER.CallLogError(ex, CU.employee.intEmployeeID, Convert.ToString(Session["currPage"]) + "-V3.2", method, this);
                //Display message box
                MessageBoxCustom.ShowMessage("An Error has occurred and been logged. "
                                             + "If you continue to receive this message please contact "
                                             + "your system administrator.", this);
            }
        }