Exemple #1
0
        //Fees Category
        #region [Fees Category Grid Bind]

        private void GrdFeesCategoryBind()
        {
            try
            {
                // objEWA.OrgId = Convert.ToInt32(orgId.ToString());
                objEWA.OrgId = Convert.ToInt32(Session["OrgId"]);
                DataSet ds = objBL.FeesCategoryGridBind_BL(objEWA);
                if (ds.Tables[0].Rows.Count == 0 || ds == null)
                {
                    ds.Tables[0].Rows.Add(ds.Tables[0].NewRow());
                    GrdFeesCategory.DataSource = ds;
                    GrdFeesCategory.DataBind();
                    int columncount = GrdFeesCategory.Rows[0].Cells.Count;
                    GrdFeesCategory.Rows[0].Cells.Clear();
                    GrdFeesCategory.Rows[0].Cells.Add(new TableCell());
                    GrdFeesCategory.Rows[0].Cells[0].ColumnSpan = columncount;
                    GrdFeesCategory.Rows[0].Cells[0].Text       = "No Records Found";
                }
                else
                {
                    GrdFeesCategory.DataSource = ds;
                    GrdFeesCategory.DataBind();
                }
            }

            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
Exemple #2
0
        //Grid Index Changed
        #region GrdIndexChanged

        protected void GrdFeesCategory_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            try
            {
                GrdFeesCategory.PageIndex = e.NewPageIndex;
                objEWA.OrgId = Convert.ToInt32(orgId.ToString());
                GrdFeesCategory.DataSource = objBL.FeesCategoryGridBind_BL(objEWA);
                GrdFeesCategory.DataBind();
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }