예제 #1
0
        public void PopulateGrid()
        {
            clsBALCommon objclsBALComm  = new clsBALCommon();
            string       strCurQuarter  = objclsBALComm.GetLatestQuarter();
            string       strPrevQuarter = PreviousQuarter(strCurQuarter);
            clsBALUsers  objclsBALUsers = new clsBALUsers();
            //DataSet ds = objclsBALUsers.GetNewUsers(strCurQuarter,strPrevQuarter);
            DataSet ds = objclsBALUsers.GetNewUsers(ddlQuarter.SelectedItem.Text, strPrevQuarter);


            if (ds.Tables[0].Rows.Count > 0)
            {
                gvNewUsers.DataSource = ds;
                gvNewUsers.DataBind();
                Session[clsEALSession.ReportUsers] = ds;
                btnExport.Visible = true;
            }
            else
            {
                gvNewUsers.DataSource = null;
                gvNewUsers.DataBind();
                Session[clsEALSession.ReportUsers] = null;
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "aa", "javascript:alert('No records found');", true);
            }
        }
예제 #2
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;
        }