Exemplo n.º 1
0
 protected void PopulateDataInGrid(string reportType)
 {
     try
     {
         DataSet       ds = new DataSet();
         clsBALReports objclsBALReport = new clsBALReports();
         ds = objclsBALReport.GetLoadExceptionReports(reportType);
         if (ds.Tables[0].Rows.Count > 0)
         {
             gv_MappingReport.DataSource       = ds;
             Session[clsEALSession.ReportData] = ds;
             gv_MappingReport.DataBind();
             ds = null;
         }
         else
         {
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "aa", "javascript:alert('No data found');", true);
             return;
         }
     }
     catch (Exception ex_pending)
     {
         Console.WriteLine("Pending Approval Report Error:" + ex_pending.Message);
     }
 }
Exemplo n.º 2
0
        protected void PopulateDataInGrid(string approverName, string reportType)
        {
            if (userRole == "Compliance Administrator")
            {
                if ((ddlReportType.SelectedIndex == 0 | ddlApprover.SelectedIndex == 0))
                {
                    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "aa", "javascript:alert('Please select both filters');", true);
                    return;
                }
            }

            SetReportVisibility(reportType);

            try
            {
                clsBALReports objclsBALReport = new clsBALReports();
                ds = objclsBALReport.GetPendingApprovalReports(approverName, reportType);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    Session[clsEALSession.ReportData] = ds;
                    BindDataToReport(ds);
                    ds = null;
                }
                else
                {
                    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "aa", "javascript:alert('No data found');", true);
                    return;
                }
            }
            catch (Exception ex_pending)
            {
                Console.WriteLine("Pending Approval Report Error:" + ex_pending.Message);
            }
        }
Exemplo n.º 3
0
        protected void populateGrid()
        {
            string strQuarter = ddlQuarter.SelectedValue.ToString();

            reportType = ddlRepType.SelectedValue.ToString();
            DataSet ds = new DataSet();

            SetReportVisibility(reportType);

            try
            {
                clsBALReports objclsBALReport = new clsBALReports();
                ds = objclsBALReport.GetTicketReports(strQuarter, reportType);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    Session[clsEALSession.ReportData] = ds;
                    BindDataToReport(ds);
                    ds = null;
                    btnExport.Visible = true;
                }
                else
                {
                    btnExport.Visible = false;
                    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "aa", "javascript:alert('No data found');", true);
                    return;
                }
            }
            catch (Exception ex_pending)
            {
                Console.WriteLine("Pending Approval Report Error:" + ex_pending.Message);
            }
        }
Exemplo n.º 4
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            //if (!IsPostBack)
            //{
            gv_UnmappedSecGrp.Visible = true;

            try
            {
                clsBALReports objclsBALReport = new clsBALReports();
                DataSet       ds = new DataSet();
                ds = objclsBALReport.GetUnmappedSecGrpReport();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    gv_UnmappedSecGrp.DataSource      = ds;
                    Session[clsEALSession.ReportData] = ds;
                    gv_UnmappedSecGrp.DataBind();
                    ds = null;

                    //objCustomPager2 = new clsCustomPager(gv_UnmappedSecGrp, no_Rows, "Page", "of");
                    //objCustomPager2.CreateCustomPager(gv_UnmappedSecGrp.TopPagerRow);
                    //objCustomPager2.CreateCustomPager(gv_UnmappedSecGrp.BottomPagerRow);
                }
                else
                {
                    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "aa", "javascript:alert('No data found');", true);
                    return;
                }
            }
            catch (Exception ex_pending)
            {
                Console.WriteLine("Pending Approval Report Error:" + ex_pending.Message);
            }
            //}
            //else
            //{
            //objCustomPager2 = new clsCustomPager(gv_UnmappedSecGrp, no_Rows, "Page", "of");
            //objCustomPager2.CreateCustomPager(gv_UnmappedSecGrp.TopPagerRow);
            //objCustomPager2.CreateCustomPager(gv_UnmappedSecGrp.BottomPagerRow);
            //gv_UnmappedSecGrp.PageSize = gv_UnmappedSecGrp.PageSize;
            //}
        }
Exemplo n.º 5
0
        public void PopulateGrid()
        {
            clsBALCommon  objclsBALComm    = new clsBALCommon();
            string        strLatestQuarter = objclsBALComm.GetLatestQuarter();
            clsBALReports objclsBALReport  = new clsBALReports();
            DataSet       ds = objclsBALReport.GetAllRecievedReports(strLatestQuarter);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                if (ds.Tables[0].Rows[i]["ReportName"] != null)
                {
                    ds.Tables[0].Rows[i]["ReportName"] = Server.HtmlEncode(ds.Tables[0].Rows[i]["ReportName"].ToString());
                }
                if (ds.Tables[0].Rows[i]["ApplicationName"] != null)
                {
                    ds.Tables[0].Rows[i]["ApplicationName"] = Server.HtmlEncode(ds.Tables[0].Rows[i]["ApplicationName"].ToString());
                }
            }

            gvRecievedReports.DataSource = ds;
            gvRecievedReports.DataBind();
            Session[clsEALSession.ReportData] = ds;
        }