Exemple #1
0
        protected void LoadMemberList()
        {
            int    StateId        = Convert.ToInt32(ddlState.SelectedValue);
            int    DistrictId     = Convert.ToInt32(ddlDistrict.SelectedValue);
            int    BlockId        = Convert.ToInt32(ddlBlock.SelectedValue);
            int    CategoryId     = Convert.ToInt32(ddlMembershipCategory.SelectedValue);
            int    BusinessTypeId = Convert.ToInt32(ddlBusinessType.SelectedValue);
            string MemberName     = txtMemberName.Text.Trim();
            string MobileNo       = txtMobile.Text.Trim();
            int    FinYearId      = Convert.ToInt32(Session["FinYrID"]);

            BusinessLayer.Common.MemberMaster objMemberMaster = new BusinessLayer.Common.MemberMaster();
            DataTable dt = objMemberMaster.RenewalMemberUpdateGetAll(StateId, DistrictId, BlockId, CategoryId, MemberName, MobileNo, BusinessTypeId, FromDate, ToDate);

            if (dt != null)
            {
                DataView dv = new DataView(dt);
                dgvMemberMaster.DataSource = dv;
                dgvMemberMaster.DataBind();
                lblTotalMemberCount.Text = Server.HtmlDecode("<b>Total Member Count: " + dv.ToTable().Rows.Count.ToString() + "</b>");
            }
            if (dt.Rows.Count > 0)
            {
                btnDownload.Visible = true;
                btnPrint.Visible    = true;
            }
            else
            {
                btnDownload.Visible = false;
                btnPrint.Visible    = false;
            }
        }