Esempio n. 1
0
        protected void btnSubmit_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            try
            {
                //Couldn't help naming one proc after Bart who is fixated on the appearance and disappearance of controls.
                InvisibleBarts();

                //	string lstNames = UserList.SelectedItem.Text.Replace(" - " + UserList.SelectedItem.Value," ");
                //	string lstUsers = UserList.SelectedItem.Value;

                OrderClasses.ReportCriteria rptCrit1 = new OrderClasses.ReportCriteria();
                rptCrit1.ReportType = Convert.ToInt32(report_type.SelectedItem.Value);
                //PC Phase II changes CH2 - Start - Added the below code to Handle Date Time Picker
                rptCrit1.StartDate = Convert.ToDateTime(TextstartDate.Text);
                rptCrit1.EndDate   = Convert.ToDateTime(TextendDate.Text);
                //PC Phase II changes CH2 - End - Added the below code to Handle Date Time Picker
                rptCrit1.ProductType = RevenueProduct.ProductType;
                rptCrit1.RevenueType = RevenueProduct.RevenueType;

                //Code Added by Cognizant
                rptCrit1.PaymentType = PaymentType.PaymentType;
                //Code Added by Cognizant

                rptCrit1.App   = "-1";
                rptCrit1.Role  = "-1";
                rptCrit1.RepDO = "-1";
                rptCrit1.Users = UserList.SelectedItem.Value;

                //PC Phase II changes CH1 - Start - Added the below code to include the status value to report criteria
                rptCrit1.Status = Status.SelectedItem.Value;
                //PC Phase II changes CH1 - End - Added the below code to include the status value to report criteria
                bool bValid = rptLib.ValidateDate(lblErrMsg, rptCrit1.StartDate, rptCrit1.EndDate, rptCrit1.ReportType);
                if (bValid == true)
                {
                    InvisibleControls();
                    return;
                }

                if (rptCrit1.Users.Length > 2000)
                {
                    rptLib.SetMessage(lblErrMsg, "The total length of users should not exceed 2000 characters", true);
                    InvisibleControls();
                    return;
                }
                if (report_type.SelectedItem.Value == "2")
                {
                    TimeSpan ts = Convert.ToDateTime(TextendDate.Text) - Convert.ToDateTime(TextstartDate.Text);
                    if (ts.Days > 2)
                    {
                        InvisibleControls();
                        rptLib.SetMessage(lblErrMsg, "Please limit the date range to not more than 2 Days.", true);
                        return;
                    }
                }
                //Call the insurance web service
                //PC Phase II 4/20 - START-Added logging to find the user ID and search criteria for the insurance reports, Transaction search
                InsuranceClasses.Service.Insurance InsSvc = new InsuranceClasses.Service.Insurance();
                Logger.Log(CSAAWeb.Constants.INS_REPORT_USERID + Page.User.Identity.Name.ToString() + CSAAWeb.Constants.PARAMETER + rptCrit1);
                //PC Phase II 4/20 -END- Added logging to find the user ID and search criteria for the insurance reports, Transaction search
                // Create and Fill the DataSet
                DataSet ds = InsSvc.GetInsuranceReports(rptCrit1);
                Logger.Log(CSAAWeb.Constants.INS_REPORT_DATASET);
                //PC Phase II Changes CH3- Commented the below code to display Report Types for only Summary and Detail.
                //if (ds.Tables[0].Rows.Count == 0 & ds.Tables[1].Rows.Count == 0)
                if (ds.Tables[0].Rows.Count == 0)
                {
                    rptLib.SetMessage(lblErrMsg, "No Data Found. Please specify a valid criteria.", true);
                    InvisibleControls();
                    return;
                }
                else
                {
                    VisibleControls();
                }

                SetHeaders();
                //CHG0109406 - CH2 - BEGIN - Set the label lblHeaderTimeZone to display the timezone for the results displayed
                lblHeaderTimeZone.Visible = true;
                //CHG0109406 - CH2 - END - Set the label lblHeaderTimeZone to display the timezone for the results displayed
                Session.Timeout         = Convert.ToInt32(Config.Setting("SessionTimeOut"));
                Session["MyDataSet"]    = ds;
                Session["MyReportType"] = report_type.SelectedItem.Value;
                //Added as a part of .NetMig 3.5
                dgReport1.PageIndex = 0;
                dgReport2.PageIndex = 0;

                UpdateDataView();
            }
            catch (FormatException f)
            {
                Logger.Log(f);
                string invalidDate = @"<Script>alert('Select a valid date.')</Script>";
                Response.Write(invalidDate);
                lblPageNum1.Visible = false;
                lblPageNum2.Visible = false;
                return;
            }
            catch (Exception ex)
            {
                Logger.Log(ex);
                rptLib.SetMessage(lblErrMsg, MSCRCore.Constants.MSG_GENERAL_ERROR, true);
            }
        }
Esempio n. 2
0
        protected void btnSubmit_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            try
            {
                dgSearch2.Dispose();

                dgSearch2.CurrentPageIndex = 0;


                dgSearch2.Visible   = false;
                lblInsTitle.Visible = false;
                lblMbrTitle.Visible = false;

                lblErrMsg.Visible = false;
                pnlTitle.Visible  = false;

                start_date = this.start_date_month.SelectedItem.Value + '/' + this.start_date_day.SelectedItem.Value + '/' + this.start_date_year.SelectedItem.Value;
                DateTime dt_start_date = DateTime.Parse(start_date);

                end_date = this.end_date_month.SelectedItem.Value + '/' + this.end_date_day.SelectedItem.Value + '/' + this.end_date_year.SelectedItem.Value;
                DateTime dt_end_date = DateTime.Parse(end_date).AddDays(1);

                bool bValid = rptLib.ValidateDate(lblErrMsg, dt_start_date, dt_end_date, 99);
                if (bValid == true)
                {
                    InvisibleControls();
                    return;
                }

                if (txtCCPrefix.Text.Length > 0 || txtCCSuffix.Text.Length > 0)
                {
                    bValid = rptLib.ValidateCCNumber(lblErrMsg, txtCCPrefix.Text, txtCCSuffix.Text);
                    if (bValid == true)
                    {
                        InvisibleControls();
                        return;
                    }
                    else
                    {
                        PaymentClasses.CardInfo Card = new PaymentClasses.CardInfo();
                        Card.CCNumber = this.txtCCPrefix.Text.ToString() + "XXXXXXXX" + this.txtCCSuffix.Text.ToString();
                        sCCSignature  = Card.Signature;
                    }
                }
                // .Modified by Cognizant based on new SP changes
                if ((txtAmount.Text.Length == 0) && (txtCCAuthCode.Text.Length == 0) && (txtCCPrefix.Text.Length == 0) && (txtCCSuffix.Text.Length == 0) && (txtLastName.Text.Length == 0) && (txtMerchantRefNbr.Text.Length == 0) && (txtAccountNbr.Text.Length == 0) && (txtReceiptNbr.Text.Length == 0))
                {
                    rptLib.SetMessage(lblErrMsg, "Please specify a search criteria.", true);
                    InvisibleControls();
                    return;
                }

                OrderClasses.SearchCriteria srchCrit1 = new OrderClasses.SearchCriteria();
                srchCrit1.StartDate = dt_start_date;
                srchCrit1.EndDate   = dt_end_date;

                //START --> Code added by COGNIZANT - 07/08/2004 - for adding Receipt Number in Search Criteria
                srchCrit1.ReceiptNbr = this.txtReceiptNbr.Text;
                //END
                //START --> Code added by COGNIZANT - 07/08/2004
                //Changed by Cognizant to search based on App_Name and Description
                /* Modified by Cognizant on Feb 1 2005 to search based on App_Name and display test as Description */

                //if (this._Application.SelectedItem.Text =="All")
                //	srchCrit1.App = "-1";
                //else
                //	srchCrit1.App = Convert.ToString(this._Application.SelectedItem.Text);
                srchCrit1.App         = Convert.ToString(this._Application.SelectedItem.Value);
                srchCrit1.ProductCode = Convert.ToString(this._ProductType.SelectedItem.Value);
                if (this.txtAmount.Text != "")
                {
                    /// .Modified by Cognizant Added for PCR 29 Offshore
                    try
                    {
                        if (Convert.ToDecimal(this.txtAmount.Text) <= 0)
                        {
                            throw new FormatException();
                        }
                        else
                        {
                            // START - Code added by COGNIZANT 08/19/2004
                            // To check if the input Date Range is only for a single day when a postive value of amount
                            // is entered in the input search criteria
                            if ((dt_start_date.AddDays(1)).Equals(dt_end_date))
                            {
                                srchCrit1.Amount = Convert.ToDecimal(this.txtAmount.Text);
                            }
                            else
                            {
                                rptLib.SetMessage(lblErrMsg, "Please limit the date range to one day for searching by Amount", true);
                                InvisibleControls();
                                return;
                            }
                            // END
                        }
                    }

                    // START - Code added by COGNIZANT 07/08/2004 to handle invalid amount from being entered
                    catch (FormatException)
                    {
                        rptLib.SetMessage(lblErrMsg, "Please specify a valid amount", true);
                        InvisibleControls();
                        return;
                    }
                    // END
                }
                srchCrit1.MerchantRef = this.txtMerchantRefNbr.Text;
                //END
                // .Modified by Cognizant based on new SP Changes
                srchCrit1.AccountNbr = this.txtAccountNbr.Text;
                srchCrit1.LastName   = this.txtLastName.Text;
                srchCrit1.CCAuthCode = this.txtCCAuthCode.Text;
                srchCrit1.CCNumber   = sCCSignature;

                InsuranceClasses.Service.Insurance InsSvc = new InsuranceClasses.Service.Insurance();

                DataSet ds = InsSvc.NewSearchOrders(srchCrit1);
                //.Modified by Cognizant based on new SP Changes
                if (ds.Tables[0].Rows.Count == 0)
                {
                    rptLib.SetMessage(lblErrMsg, "No Data Found. Please specify a valid criteria.", true);
                    InvisibleControls();
                    return;
                }
                else
                {
                    VisibleControls();
                }

                Session["MyDataSet"] = ds;

                lblRunDate.Text   = DateTime.Now.ToString();
                lblDateRange.Text = srchCrit1.StartDate + " - " + srchCrit1.EndDate.AddSeconds(-1);
                lblDate.Text      = "Run Date:";
                lblDates.Text     = "Date Range:";

                // For printing and converting to Excel only, folowing session variables are declared.
                Session["DateRange"] = dt_start_date + " - " + dt_end_date.AddSeconds(-1);

                UpdateDataView();
            }


            catch (FormatException)
            {
                string invalidDate = @"<Script>alert('Please put in a valid date.')</Script>";
                Response.Write(invalidDate);
                return;
            }
            catch (Exception ex)
            {
                rptLib.SetMessage(lblErrMsg, MSCRCore.Constants.MSG_GENERAL_ERROR, true);
                Logger.Log(ex);
            }
        }
Esempio n. 3
0
        protected void btnSubmit_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            try
            {
                dgSearch2.Dispose();

                dgSearch2.PageIndex = 0;


                dgSearch2.Visible   = false;
                lblInsTitle.Visible = false;
                lblMbrTitle.Visible = false;
                //CHG0109406 - CH3 - BEGIN - Set the below label visible property to false which displays the timezone in results
                lblHeaderTimeZone.Visible = false;
                //CHG0109406 - CH3 - END - Set the below label visible property to false which displays the timezone in results
                lblErrMsg.Visible = false;
                pnlTitle.Visible  = false;
                //PC Phase II changes CH2 -Start- Added the below code to Handle Date Time Picker
                //MAIG - CH1 - BEGIN - Added Trim to defer any white space
                start_date = TxtstartDt.Text.Trim();
                //MAIG - CH1 - END - Added Trim to defer any white space
                DateTime dt_start_date = DateTime.Parse(start_date);
                //MAIG - CH2 - BEGIN - Added Trim to defer any white space
                end_date = TxtendDt.Text.Trim();
                //MAIG - CH2 - END - Added Trim to defer any white space
                //STAR Retrofit II.Ch1 - START -Added logging to find the user ID and search criteria for the insurance reports, Transaction search
                DateTime end_date_check = DateTime.Parse(end_date);
                //PC Phase II 4/20 - START-modified the Date Range in Transaction search to fix one day a head issue.
                //Modified the below code to display the exact end date seelcted in drop down combo.
                DateTime dt_end_date = DateTime.Parse(end_date);
                //PC Phase II 4/20 -END-Added logging to find the user ID and search criteria for the insurance reports, Transaction search

                bool bValid = rptLib.ValidateDate(lblErrMsg, dt_start_date, end_date_check, 99);
                //STAR Retrofit II.Ch1 - END
                if (bValid == true)
                {
                    InvisibleControls();
                    return;
                }
                //Begin PC Phase II Changes CH1 - Removed the Relevant code for the Fields removed for Transaction Search UI
                //if (txtCCSuffix.Text.Length > 0 )
                //{
                //    //67811A0  - PCI Remediation for Payment systems CH1:Start Modified the code to remove the credit card prefix filed in UI and the text box by as a part of security testing by cognizant on 01/09/2011
                //    bValid = rptLib.ValidateCCNumber(lblErrMsg, txtCCSuffix.Text);

                //    //bValid = rptLib.ValidateCCNumber(lblErrMsg, txtCCPrefix.Text, txtCCSuffix.Text);
                //    //67811A0  - PCI Remediation for Payment systems CH1:end Modified the code to remove the credit card prefix filed in UI and the text box by as a part of security testing by cognizant on 01/09/2011
                //    if (bValid == true)
                //    {
                //        InvisibleControls();
                //        return;
                //    }
                //    else
                //    {
                //        PaymentClasses.CardInfo Card = new PaymentClasses.CardInfo();
                //        Card.CCNumber = "XXXXXXXXXXXX" + this.txtCCSuffix.Text.ToString();
                //        sCCSignature = Card.Signature;
                //    }
                //}

                //HO6.Ch3:Added to check whether the echeck account number is greater than zero as a part of HO6 on 04-21-2010.
                //if(txtEcheckAcc.Text.Length>0)
                //{
                //PaymentClasses.eCheckInfo echeck= new PaymentClasses.eCheckInfo();
                //    echeck.BankAcntNo=this.txtEcheckAcc.Text.ToString();
                // sEcheckSignature=echeck.signature;
                //PaymentClasses.CardInfo Card = new PaymentClasses.CardInfo();
                //Card.CCCVNumber=sEcheckSignature;
                //}
                // .Modified by Cognizant based on new SP changes
                //HO6.Ch2:Modified to check the search creteria for echeck account number also as a part of HO6 on 04-21-2010.
                //if((txtAmount.Text.Length == 0)&&(txtEcheckAcc.Text.Length==0) && (txtCCAuthCode.Text.Length == 0) && (txtCCPrefix.Text.Length == 0) && (txtCCSuffix.Text.Length == 0) && (txtLastName.Text.Length == 0) &&  (txtMerchantRefNbr.Text.Length == 0) && (txtAccountNbr.Text.Length == 0) && (txtReceiptNbr.Text.Length == 0))
                //if ((txtAmount.Text.Length == 0) && (txtEcheckAcc.Text.Length == 0) && (txtCCAuthCode.Text.Length == 0) && (txtCCSuffix.Text.Length == 0) && (txtLastName.Text.Length == 0) && (txtMerchantRefNbr.Text.Length == 0) &&
                //End PC Phase II Changes CH1 - Removed the Relevant code for the Fields removed for Transaction Search UI
                //CHG0078293 - PT enhancement CH1 START- Added the new fields added withe existing Acount number and receipt number condition
                //MAIG - CH3 - BEGIN - for adding Agent & User IDs in Search Criteria and trim functionality
                if ((txtAccountNbr.Text.Trim().Length == 0) && (txtReceiptNbr.Text.Trim().Length == 0) &&
                    (txtAmount.Text.Trim().Length == 0) && (txtEcheckAcc.Text.Trim().Length == 0) &&
                    (txtDO.Text.Trim().Length == 0) && (txtCCSuffix.Text.Trim().Length == 0) && (txtAgentId.Text.Trim().Length == 0) && (txtUserId.Text.Trim().Length == 0))
                //MAIG - CH3 - END - for adding Agent & User IDs in Search Criteria and trim functionality
                //CHG0078293 - PT enhancement CH1 END- Added the new fields added withe existing Acount number and receipt number condition
                {
                    rptLib.SetMessage(lblErrMsg, "Please specify a search criteria.", true);
                    InvisibleControls();
                    return;
                }

                OrderClasses.SearchCriteria srchCrit1 = new OrderClasses.SearchCriteria();
                srchCrit1.StartDate = dt_start_date;
                srchCrit1.EndDate   = dt_end_date;

                //CHG0078293 - PT enhancement CH3 START- Added regex condition for Receipt Number and Account Number Textbox validations.
                Regex rx = new Regex(@"^(?=.*\d)[a-zA-Z0-9]+$");
                //MAIG - CH4 - BEGIN - Added Trim to defer any white space
                if (this.txtReceiptNbr.Text.Trim() == string.Empty || (rx.IsMatch(this.txtReceiptNbr.Text.Trim())))
                {
                    //START --> Code added by COGNIZANT - 07/08/2004 - for adding Receipt Number in Search Criteria
                    srchCrit1.ReceiptNbr = this.txtReceiptNbr.Text.Trim();
                    //MAIG - CH4 - END - Added Trim to defer any white space
                    //END
                    //START --> Code added by COGNIZANT - 07/08/2004
                    //Changed by Cognizant to search based on App_Name and Description
                    /* Modified by Cognizant on Feb 1 2005 to search based on App_Name and display test as Description */
                }
                else
                {
                    rptLib.SetMessage(lblErrMsg, "Please specify a valid Receipt Number", true);
                    InvisibleControls();
                    return;
                }
                //CHG0078293 - PT enhancement CH3 END- Added regex condition for Receipt Number and Account Number Textbox validations.


                if (this._Application.SelectedItem.Text == "All")
                {
                    srchCrit1.App = "-1";
                }
                else
                {
                    srchCrit1.App = Convert.ToString(this._Application.SelectedItem.Text.Trim());
                }
                srchCrit1.App         = Convert.ToString(this._Application.SelectedItem.Value);
                srchCrit1.ProductCode = Convert.ToString(this._ProductType.SelectedItem.Value);
                //Begin PC Phase II Changes CH1 - Removed the Relevant code for the Fields removed for Transaction Search UI
                //CHG0078293 - PT enhancement CH2 START- Added the below condition to restrict the date condition to two days to search with the new search fields and assign the values  to the search criteria
                //MAIG - CH5 - BEGIN - for adding Agent & User IDs in Search Criteria and trim functionality
                if (this.txtAmount.Text.Trim() != "" || this.txtEcheckAcc.Text.Trim() != "" || this.txtCCSuffix.Text.Trim() != "" || this.txtDO.Text.Trim() != "" || this.txtAgentId.Text.Trim() != "" || this.txtUserId.Text.Trim() != "")
                //MAIG - CH5 - END - for adding Agent & User IDs in Search Criteria and trim functionality
                {
                    try
                    {
                        //MAIG - CH6 - BEGIN - Added Trim to defer any white space
                        if (this.txtAmount.Text.Trim() != "" && Convert.ToDecimal(this.txtAmount.Text.Trim()) <= 0)
                        //MAIG - CH6 - END - Added Trim to defer any white space
                        {
                            throw new FormatException();
                        }
                        else
                        {
                            if ((dt_start_date.AddDays(2)) >= (dt_end_date))
                            {
                                if (this.txtAmount.Text.Trim() != "")
                                {
                                    srchCrit1.Amount = Convert.ToDecimal(this.txtAmount.Text.Trim());
                                }
                                if (this.txtCCSuffix.Text.Trim() != "")
                                {
                                    srchCrit1.CCNumber = this.txtCCSuffix.Text.Trim();
                                }
                                if (this.txtEcheckAcc.Text.Trim() != "")
                                {
                                    srchCrit1.eChckAccNbr = this.txtEcheckAcc.Text.Trim();
                                }
                                if (this.txtDO.Text.Trim() != "")
                                {
                                    srchCrit1.DO = this.txtDO.Text.Trim();
                                }

                                //MAIG - CH7 - BEGIN - for adding Agent & User IDs in Search Criteria and trim functionality
                                if (this.txtAgentId.Text.Trim() != "")
                                {
                                    srchCrit1.AgentID = this.txtAgentId.Text.Trim();
                                }
                                if (this.txtUserId.Text.Trim() != "")
                                {
                                    srchCrit1.UserID = this.txtUserId.Text.Trim();
                                }
                                //MAIG - CH7 - END - for adding Agent & User IDs in Search Criteria and trim functionality
                            }
                            else if (this.txtAmount.Text.Trim() != "")
                            {
                                rptLib.SetMessage(lblErrMsg, "Please limit the date range to two days for searching by Amount", true);
                                InvisibleControls();
                                return;
                            }
                            else if (this.txtCCSuffix.Text.Trim() != "")
                            {
                                rptLib.SetMessage(lblErrMsg, "Please limit the date range to two days for searching by Credit card number", true);
                                InvisibleControls();
                                return;
                            }
                            else if (this.txtEcheckAcc.Text.Trim() != "")
                            {
                                //CHG0109406 - CH5 - Begin - Change to update ECHECK to ACH - 01202015
                                rptLib.SetMessage(lblErrMsg, "Please limit the date range to two days for searching by ACH Account number", true);
                                //CHG0109406 - CH5 - End - Change to update ECHECK to ACH - 01202015
                                InvisibleControls();
                                return;
                            }
                            else if (this.txtDO.Text.Trim() != "")
                            {
                                rptLib.SetMessage(lblErrMsg, "Please limit the date range to two days for searching by Location", true);
                                InvisibleControls();
                                return;
                            }
                            //MAIG - CH8 - BEGIN - for adding Agent & User IDs in Search Criteria and trim functionality
                            else if (this.txtAgentId.Text.Trim() != "")
                            {
                                rptLib.SetMessage(lblErrMsg, "Please limit the date range to two days for searching by AgentID", true);
                                InvisibleControls();
                                return;
                            }
                            else if (this.txtUserId.Text.Trim() != "")
                            {
                                rptLib.SetMessage(lblErrMsg, "Please limit the date range to two days for searching by UserID", true);
                                InvisibleControls();
                                return;
                            }
                            //MAIG - CH8 - END - for adding Agent & User IDs in Search Criteria and trim functionality
                            // END
                        }
                    }
                    catch (FormatException)
                    {
                        rptLib.SetMessage(lblErrMsg, "Please specify a valid amount", true);
                        InvisibleControls();
                        return;
                    }
                    //CHG0078293 - PT enhancement CH2 END- Added the below condition to restrict the date condition to two days to search with the new search fields and assign the values  to the search criteria
                }
                //End PC Phase II Changes CH1 - Removed the Relevant code for the Fields removed for Transaction Search UI
                //srchCrit1.MerchantRef = this.txtMerchantRefNbr.Text;
                //END
                // .Modified by Cognizant based on new SP Changes
                //CHG0078293 - PT enhancement CH4 START- Added regex condition for Receipt Number and Account Number Textbox validations.
                //MAIG - CH9 - BEGIN - Added Trim to defer any white space
                if (this.txtAccountNbr.Text.Trim() == string.Empty || rx.IsMatch(this.txtAccountNbr.Text.Trim()))
                {
                    srchCrit1.AccountNbr = this.txtAccountNbr.Text.Trim();
                    //MAIG - CH9 - END - Added Trim to defer any white space
                }
                else
                {
                    rptLib.SetMessage(lblErrMsg, "Please specify a valid Account Number", true);
                    InvisibleControls();
                    return;
                }
                //CHG0078293 - PT enhancement CH4 END- Added regex condition for Receipt Number and Account Number Textbox validations.
                //PC Phase II Changes CH1 - Removed the Relevant code for the Fields removed for Transaction Search UI
                //srchCrit1.LastName = this.txtLastName.Text;
                //srchCrit1.CCAuthCode = this.txtCCAuthCode.Text;
                //srchCrit1.CCNumber = sCCSignature;
                //HO6.Ch1:Added echeck account number to search with account number with encrypted format as a part of HO6 on 04-21-2010.
                //srchCrit1.eChckAccNbr=sEcheckSignature;
                InsuranceClasses.Service.Insurance InsSvc = new InsuranceClasses.Service.Insurance();
                //Transaction Search Log Enable - Start.
                if (ConfigurationManager.AppSettings["TransactionSearchLogEnable"] != "0")
                {
                    Logger.Log(CSAAWeb.Constants.TRANS_SEARCH_USERID + Page.User.Identity.Name.ToString() + CSAAWeb.Constants.PARAMETER + srchCrit1);
                }
                //Transaction Search Log Enable - End.
                DataSet ds = InsSvc.NewSearchOrders(srchCrit1);
                Logger.Log(CSAAWeb.Constants.TRANS_SEARCH_DATASET);
                //.Modified by Cognizant based on new SP Changes
                if (ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    rptLib.SetMessage(lblErrMsg, "No Data Found. Please specify a valid criteria.", true);
                    InvisibleControls();
                    return;
                }
                else
                {
                    VisibleControls();
                }

                Session["MyDataSet"] = ds;
                //CHG0109406 - CH1 - BEGIN - Modified the timezone from "MST Arizona" to Arizona
                //Start-TimeZoneChange.Ch1-Added Text MST Arizona at the end of the current date and time  by cognizant.
                lblRunDate.Text   = DateTime.Now.ToString() + " " + "Arizona";
                lblDateRange.Text = srchCrit1.StartDate + " - " + srchCrit1.EndDate.AddSeconds(-1) + " " + "Arizona";
                //End-TimeZoneChange.Ch1-Added Text MST Arizona at the end of the current date and time  by cognizant.
                //CHG0109406 - CH1 - END - Modified the timezone from "MST Arizona" to Arizona
                //CHG0110069 - CH1 - BEGIN - Appended the /Time along with the Date Label
                lblDate.Text  = "Run Date/Time:";
                lblDates.Text = "Date/Time Range:";
                //CHG0110069 - CH1 - END - Appended the /Time along with the Date Label
                // For printing and converting to Excel only, folowing session variables are declared.
                Session["DateRange"] = dt_start_date + " - " + dt_end_date.AddSeconds(-1);
                // START - Added by Cognizant on 13/12/2010 as part of .NET 3.5 Migration
                this.dgSearch2.RowDataBound      += new GridViewRowEventHandler(this.ItemDataBound2);
                this.dgSearch2.PageIndexChanging += new GridViewPageEventHandler(this.PageIndexChanged2);
                // END
                UpdateDataView();
            }


            catch (FormatException)
            {
                string invalidDate = @"<Script>alert('Please put in a valid date.')</Script>";
                Response.Write(invalidDate);
                lblPageNum1.Visible = false;
                lblPageNum2.Visible = false;
                return;
            }
            catch (Exception ex)
            {
                rptLib.SetMessage(lblErrMsg, MSCRCore.Constants.MSG_GENERAL_ERROR, true);
                //SR # 8494956 :Added  method  InvisibleControls() to btn_submitclick  by cognizant on Oct 20 2009 as a part of Transaction Search Deadlock issue.
                InvisibleControls();
                Logger.Log(ex);
            }
        }