|
|
@ -42,23 +42,27 @@ namespace EasyBL.WEBAPP.SYS |
|
|
|
var sPhone = _fetchString(i_crm, @"Phone"); |
|
|
|
var bExcel = _fetchBool(i_crm, @"Excel"); |
|
|
|
|
|
|
|
pml.DataList = db.Queryable<SETB_CMS_Member, SETB_SYS_Country, OTB_SYS_Arguments>((t1, t2, t3) => new object[]{ |
|
|
|
pml.DataList = db.Queryable<SETB_CMS_Member, SETB_SYS_Country, OTB_SYS_Arguments>((t1, t2, t3) => new object[] { |
|
|
|
JoinType.Left, t1.OrgID == t2.OrgID && t1.CountryID == t2.CountryID, |
|
|
|
JoinType.Left,t1.OrgID == t3.OrgID && t1.ArgumentID == t3.ArgumentID |
|
|
|
JoinType.Left, t1.OrgID == t3.OrgID && t1.ArgumentID == t3.ArgumentID |
|
|
|
}) |
|
|
|
.Where((t1, t2, t3) => t1.OrgID == i_crm.ORIGID && t1.MemberID.Contains(sMemberID) && t1.FirstName.Contains(sFirstName) && t1.LastName.Contains(sLastName) && t1.Phone.Contains(sPhone)) |
|
|
|
.WhereIF(!string.IsNullOrEmpty(sCountryID), (t1, t2, t3) => t1.CountryID == sCountryID) |
|
|
|
.WhereIF(!string.IsNullOrEmpty(sArgumentID), (t1, t2, t3) => t1.ArgumentID == sArgumentID) |
|
|
|
.Where((t1, t2, t3) => t1.OrgID == i_crm.ORIGID && t1.MemberID.Contains(sMemberID)) |
|
|
|
.WhereIF(!string.IsNullOrEmpty(sCountryID), (t1, t2, t3) => t1.CountryID == t2.CountryID) |
|
|
|
.WhereIF(!string.IsNullOrEmpty(sArgumentID), (t1, t2, t3) => t1.ArgumentID == t3.ArgumentID) |
|
|
|
|
|
|
|
|
|
|
|
.Select((t1, t2, t3) => new View_CMS_Member |
|
|
|
{ |
|
|
|
MemberID = SqlFunc.GetSelfAndAutoFill(t1.MemberID), |
|
|
|
CountryName = t2.CountryName, |
|
|
|
Country_ENCode = t2.Country_ENCode, |
|
|
|
ArgumentValue = t3.ArgumentValue, |
|
|
|
ArgumentValue = t3.ArgumentValue |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
.OrderBy(sSortField, sSortOrder) |
|
|
|
.ToPageList(pml.PageIndex, bExcel ? 100000 : pml.PageSize, ref iPageCount); |
|
|
|
|
|
|
|
|
|
|
|
pml.Total = iPageCount; |
|
|
|
|
|
|
|
rm = new SuccessResponseMessage(null, i_crm); |
|
|
|