示例#1
0
        private void BindGrdResult()
        {
            try
            {
                BL_UploadResult  objBL  = new BL_UploadResult();
                EWA_UploadResult objEWA = new EWA_UploadResult();
                objEWA.Action   = "FatchResultPDF";
                objEWA.OrgId    = Session["OrgId"].ToString();
                objEWA.CourseId = ddlCourse.SelectedValue.ToString();
                objEWA.BranchId = ddlBranch.SelectedValue.ToString();
                objEWA.ClassId  = ddlClass.SelectedValue.ToString();
                DataSet ds = objBL.FatchResultPDF_BL(objEWA);

                grdResults.DataSource = ds;
                grdResults.DataBind();
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
        private void BindGrdResult()
        {
            try
            {
                BL_UploadResult  objBL  = new BL_UploadResult();
                EWA_UploadResult objEWA = new EWA_UploadResult();
                objEWA.Action   = "FatchResultPDF";
                objEWA.OrgId    = Session["OrgId"].ToString();
                objEWA.CourseId = Session["CourseId"].ToString();
                objEWA.BranchId = Session["BranchId"].ToString();
                objEWA.ClassId  = Session["ClassId"].ToString();

                DataSet ds = objBL.FatchResultPDF_BL(objEWA);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    lblNodata.Visible  = false;
                    grdResults.Visible = true;

                    grdResults.DataSource = ds;
                    grdResults.DataBind();
                }
                else
                {
                    DataTable dt = new DataTable();
                    grdResults.DataSource = dt;
                    grdResults.DataBind();
                    lblNodata.Visible = true;
                    //grdResults.Visible = false;
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }