protected void Page_Load(object sender, EventArgs e) { #region 分页参数 pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);; #endregion type = (CrmType)Utils.GetInt(Utils.GetQueryStringValue("currType")); MLBCrmSearchInfo queryString = new MLBCrmSearchInfo(); queryString.CityId = Utils.GetIntNull(Utils.GetQueryStringValue("cId")); queryString.ProvinceId = Utils.GetIntNull(Utils.GetQueryStringValue("pId")); queryString.CrmName = Utils.GetQueryStringValue("currName"); queryString.SellerName = Utils.GetQueryStringValue("txtSellers"); if (!string.IsNullOrEmpty(queryString.SellerName) && queryString.SellerName == SiteUserInfo.Name) { queryString.SellerId = SiteUserInfo.UserId; } IList <EyouSoft.Model.CrmStructure.MLBCrmXuanYongInfo> ls = new EyouSoft.BLL.CrmStructure.BCrm().GetCrmsXuanYong(CurrentUserCompanyID, pageSize, pageIndex, ref recordCount, type, queryString); if (ls != null && ls.Count > 0) { this.lbemptymsg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); BindPage(pageSize, pageIndex); } else { this.lbemptymsg.Visible = true; this.phdPages.Visible = false; } }
void GetCustomerUnit() { int recordCount = 0; MLBCrmSearchInfo queryString = new MLBCrmSearchInfo(); queryString.CrmName = Utils.GetQueryStringValue("q"); StringBuilder sb = new StringBuilder(); IList <EyouSoft.Model.CrmStructure.MLBCrmXuanYongInfo> ls = new EyouSoft.BLL.CrmStructure.BCrm().GetCrmsXuanYong(CurrentUserCompanyID, 35, 1, ref recordCount, null, queryString); if (ls != null && ls.Count > 0) { foreach (MLBCrmXuanYongInfo item in ls) { sb.Append(item.Name + "|" + item.CrmId + "|" + (int)item.CrmType + "|" + item.KeHuDengJiBH); if (item.Lxrs != null && item.Lxrs.Count > 0) { sb.Append("|" + item.Lxrs[0].Id + "|" + item.Lxrs[0].Name + "|" + item.Lxrs[0].MobilePhone + "|" + item.Lxrs[0].Telephone + "\n"); } else { sb.Append("|-1|无联系人|-1|-1 \n"); } } } else { sb.Append("无匹配项|-1|-1|无联系人|-1|-1|"); } AjaxResponse(sb.ToString()); }