private void LoadConsolidatedOutstandingList()
        {
            int      StateId    = Convert.ToInt32(ddlState.SelectedValue.Trim());
            int      DistrictId = Convert.ToInt32(ddlDistrict.SelectedValue.Trim());
            int      BlockId    = Convert.ToInt32(ddlBlock.SelectedValue.Trim());
            int      CategoryId = Convert.ToInt32(ddlMembershipCategory.SelectedValue.Trim());
            DateTime ToDate     = Convert.ToDateTime(txtToDate.Text.Split('/')[2] + "-" + txtToDate.Text.Split('/')[1] + "-" + txtToDate.Text.Split('/')[0]);
            DateTime FromDate   = Convert.ToDateTime(txtToDate.Text.Split('/')[2] + "-" + txtToDate.Text.Split('/')[1] + "-" + txtToDate.Text.Split('/')[0]);
            string   MemberName = txtMemberName.Text.Trim();
            string   MemberCode = txtMemberCode.Text.Trim();
            string   MobileNo   = txtMobileNo.Text.Trim();

            BusinessLayer.Common.MemberPayment objMemberPayment = new BusinessLayer.Common.MemberPayment();
            DataSet ds = objMemberPayment.GetOutstandingReportConsolidated(StateId, DistrictId, BlockId, CategoryId, ToDate, FromDate, MemberName, MemberCode, MobileNo, 0, 0);

            dgvMemberOutstanding.DataSource = ds.Tables[0];
            dgvMemberOutstanding.DataBind();

            if (ds.Tables[0].Rows.Count > 0)
            {
                btnDownload.Visible = true;
            }
            else
            {
                btnDownload.Visible = false;
            }
        }
        private void LoadConsolidatedOutstandingList()
        {
            int      StateId    = Convert.ToInt32(ddlState.SelectedValue.Trim());
            int      DistrictId = Convert.ToInt32(ddlDistrict.SelectedValue.Trim());
            int      BlockId    = Convert.ToInt32(ddlBlock.SelectedValue.Trim());
            int      CategoryId = Convert.ToInt32(ddlMembershipCategory.SelectedValue.Trim());
            DateTime ToDate     = Convert.ToDateTime(txtToDate.Text.Split('/')[2] + "-" + txtToDate.Text.Split('/')[1] + "-" + txtToDate.Text.Split('/')[0]);
            DateTime FromDate   = Convert.ToDateTime(txtFromDate.Text.Split('/')[2] + "-" + txtFromDate.Text.Split('/')[1] + "-" + txtFromDate.Text.Split('/')[0]);
            //string MemberName = txtMemberName.Text.Trim();
            string MemberName     = "";
            int    BusinessTypeId = Convert.ToInt32(ddlBusinessType.SelectedValue); //14/10/19-business type fieldfor search
            int    ReportType     = Convert.ToInt32(ddlReportType.SelectedValue.Trim());

            BusinessLayer.Common.MemberPayment objMemberPayment = new BusinessLayer.Common.MemberPayment();
            DataSet ds = objMemberPayment.GetOutstandingReportConsolidated(StateId, DistrictId, BlockId, CategoryId, ToDate, FromDate, MemberName, "", "", BusinessTypeId, ReportType);

            dgvMemberOutstanding.DataSource = ds.Tables[0];
            dgvMemberOutstanding.DataBind();

            Label1.Text = ds.Tables[1].Rows[0]["GrandTotal"].ToString();
            if (ds.Tables[0].Rows.Count > 0)
            {
                btnDownload.Visible  = true;
                btnSendEmail.Visible = true;
                Label1.Text          = "Grand Total : ";
                Label2.Text          = ds.Tables[1].Rows[0]["GrandTotal"].ToString();
            }
            else
            {
                btnDownload.Visible  = false;
                btnSendEmail.Visible = false;
                Label1.Text          = "Grand Total : ";
                Label2.Text          = "0.00";
            }
        }