public void FillGrid()
        {
            try
            {
                LvwDetails.Items.Clear();
                string strCondi = "";
                //strSql = "  SELECT TOP 1000 MemberCode,ProfileId,MobileNo,MobileNo_Rel,MobileNo1,MobileNo1_Rel,LandlineNo,MobileNo2_Rel,LandlineNo1,LandlineNo1_Rel FROM tbl_membermaster WHERE isnull(MobileNo_Rel,'')='' ";
                strCondi += " AND MM.Gender =" + (rdbtnMale.Checked == true ? "0" : "1");
                if (Convert.ToString(ddlPAgeFrom.SelectedValue) != Convert.ToString(ddlPAgeTo.SelectedValue))
                {
                    strCondi += " AND Convert(varchar(4),MM.DateOfBirth,111) Between " + ddlPAgeFrom.Text + " AND " + ddlPAgeTo.Text + "";
                }
                if (Convert.ToInt32(ddlCaste.SelectedValue) > 0)
                {
                    strCondi += " AND MM.Caste = " + ddlCaste.SelectedValue;
                }

                if (ddlUpdateStatus.Text.ToUpper() == "NOT SEND LIST")
                {
                    strCondi += " and Married= -1 ";
                }
                else if (ddlUpdateStatus.Text.ToUpper() == "SEND LIST")
                {
                    strCondi += " and Married= 0 ";
                }
                else if (ddlUpdateStatus.Text.ToUpper() == "YES LIST")
                {
                    strCondi += " and Married= 1 ";
                }
                else if (ddlUpdateStatus.Text.ToUpper() == "NO LIST")
                {
                    strCondi += " and Married= 2 ";
                }
                if (txtProfileId.Text.Trim() != "")
                {
                    strCondi += " AND profileid='" + txtProfileId.Text.Trim() + "'";
                }
                tbl_MemberMasterBAL objMembermaster = new tbl_MemberMasterBAL();
                DataSet             dtDetails       = objMembermaster.GetMarriedConfirmationList(strCondi);
                if (dtDetails.Tables[0].Rows.Count > 0)
                {
                    lblTotalCnt.Text = "Total : " + Convert.ToString(dtDetails.Tables[0].Rows.Count);
                    FieldLength      = new int[] { 150, 200, 100, 120, 170, 80, 50, 50, 0 };
                    objGlobal.FillListView(LvwDetails, dtDetails.Tables[0], FieldLength);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #2
0
 public void FillGrid(string strCond)
 {
     try
     {
         tbl_MemberMasterBAL objtbl_MemberMasterBAL = new tbl_MemberMasterBAL();
         DataSet             dsdata = objtbl_MemberMasterBAL.GetMarriedConfirmationList(strCond);
         if (dsdata.Tables[0].Rows.Count > 0)
         {
             FieldLength = new int[] { 120, 150, 0, 150, 0, 80, 80, 0, 0 };
             objGlobal.FillListView(LvwDetails, dsdata.Tables[0], FieldLength);
             lblTotalCnt_A.Text = "Total : " + dsdata.Tables[0].Rows.Count;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }