private void LoadSMSMemberList() { BusinessLayer.Common.SMSMemberMaster objSMSMember = new BusinessLayer.Common.SMSMemberMaster(); DataTable dt = objSMSMember.GetAllMember("", "", 0, 0, 0); if (dt != null && dt.Rows.Count > 0) { dt.AsEnumerable().ToList().ForEach(r => r["MemberName"] = r["MemberName"].ToString() + " [" + r["MemberCode"].ToString() + "] [" + r["MobileNo"].ToString() + "]"); } DataView dv = new DataView(dt); string DataViewFilter = "IsNull(IsActive,0) = 1 And MemberType = 'PAID'"; if (txtMobileNo.Text.Trim().Length > 0) { DataViewFilter = DataViewFilter + " And MobileNo = '" + txtMobileNo.Text.Trim() + "'"; } if (Session["UserType"].ToString().Equals("Member")) { DataViewFilter += " AND ParentMemberId = " + Session["UserId"].ToString(); } dv.RowFilter = DataViewFilter; ddlSMSMember.DataSource = dv; ddlSMSMember.DataBind(); ddlSMSMember.Items.Insert(0, new ListItem("--Select Member--", "0")); }
protected void LoadSMSMember() { string MemberName = txtSearchMemberName.Text.Trim(); string MobileNo = txtSearchMobileNo.Text.Trim(); int MemberType = Convert.ToInt32(ddlSearchRegType.SelectedValue); int DistrictId = Convert.ToInt32(ddlDistrict.SelectedValue); BusinessLayer.Common.SMSMemberMaster objSMSMember = new BusinessLayer.Common.SMSMemberMaster(); DataTable dt = objSMSMember.GetAllMember(MemberName, MobileNo, MemberType, DistrictId, 0); if (dt != null) { dgvSMSMember.DataSource = dt; dgvSMSMember.DataBind(); } }
protected void LoadSMSMemberList() { string MemberName = txtMemberName.Text.Trim(); string MobileNo = txtMobile.Text.Trim(); int DistrictId = Convert.ToInt32(ddlDistrict.SelectedValue); BusinessLayer.Common.SMSMemberMaster objSMSMember = new BusinessLayer.Common.SMSMemberMaster(); DataTable dt = objSMSMember.GetAllMember(MemberName, MobileNo, 0, DistrictId, 0); DataView dv = new DataView(dt); dv.RowFilter = "IsNull(IsActive,0) = 1 And MemberType = 'PAID'"; { dgvMemberMaster.DataSource = dv.ToTable(); dgvMemberMaster.DataBind(); } }
protected void LoadSMSMember() { string MemberName = txtSearchMemberName.Text.Trim(); string MobileNo = txtSearchMobileNo.Text.Trim(); int MemberType = Convert.ToInt32(ddlSearchRegType.SelectedValue); //int DistrictId = Convert.ToInt32(ddlDistrict.SelectedValue); int DistrictId = Convert.ToInt32(ddlSearchDistrict.SelectedValue); // Change on 25.07.19 _ Sayantani (Ref. Search by district was not working) int MemberCategoryId = Convert.ToInt32(ddlNECCOrNot.SelectedValue); BusinessLayer.Common.SMSMemberMaster objSMSMember = new BusinessLayer.Common.SMSMemberMaster(); DataTable dt = objSMSMember.GetAllMember(MemberName, MobileNo, MemberType, DistrictId, MemberCategoryId); if (dt != null) { dgvSMSMember.DataSource = dt; dgvSMSMember.DataBind(); } }
private void LoadSMSMemberList() { BusinessLayer.Common.SMSMemberMaster objSMSMember = new BusinessLayer.Common.SMSMemberMaster(); DataTable dt = objSMSMember.GetAllMember("", "", 0, 0, 0); DataView dv = new DataView(dt); string DataViewFilter = "IsNull(IsActive,0) = 1 And MemberType = 'PAID'"; if (Session["UserType"].ToString().Equals("Member")) { DataViewFilter += " AND ParentMemberId = " + Session["UserId"].ToString(); } dv.RowFilter = DataViewFilter; ddlSMSMember.DataSource = dv; ddlSMSMember.DataBind(); ddlSMSMember.Items.Insert(0, new ListItem("--Any Member--", "0")); }