コード例 #1
0
        private void GridDataBind()
        {
            try
            {
                ApplicationResult objResult = new ApplicationResult();
                FeesCategoryBL    objFeesBl = new FeesCategoryBL();

                objResult = objFeesBl.FeesCategory_SelectAll(Convert.ToInt32(Session[ApplicationSession.SCHOOLID]));
                if (objResult != null)
                {
                    if (objResult.resultDT.Rows.Count > 0)
                    {
                        gvFeesCategory.DataSource = objResult.resultDT;
                        gvFeesCategory.DataBind();
                        PanelGrid_VisibilityMode(1);
                    }
                    else
                    {
                        PanelGrid_VisibilityMode(2);
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error("Error", ex);
                ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>");
            }
        }
コード例 #2
0
        public void BindFeesCategory()
        {
            try
            {
                FeesCategoryBL    objFeesCategoryBL = new FeesCategoryBL();
                ApplicationResult objResult         = new ApplicationResult();

                objResult = objFeesCategoryBL.FeesCategory_SelectAll(Convert.ToInt32(Session[ApplicationSession.SCHOOLID]));
                if (objResult != null)
                {
                    if (objResult.resultDT.Rows.Count > 0)
                    {
                        gvFees.DataSource = objResult.resultDT;
                        gvFees.DataBind();
                        //PanelGrid_VisibilityMode(1);
                    }
                    else
                    {
                        //PanelGrid_VisibilityMode(2);
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }