|
@ -39,8 +39,6 @@ namespace EasyBL.WEBAPP.SYS |
|
|
var iCityID = _fetchInt(i_crm, @"CityID"); |
|
|
var iCityID = _fetchInt(i_crm, @"CityID"); |
|
|
var sVenueID = _fetchString(i_crm, @"VenueID"); |
|
|
var sVenueID = _fetchString(i_crm, @"VenueID"); |
|
|
var sVenueName = _fetchString(i_crm, @"VenueName"); |
|
|
var sVenueName = _fetchString(i_crm, @"VenueName"); |
|
|
var sVenueName_EN = _fetchString(i_crm, @"VenueName_EN"); |
|
|
|
|
|
var sVenueSlug = _fetchString(i_crm, @"VenueSlug"); |
|
|
|
|
|
var sEffective = _fetchString(i_crm, @"Effective"); |
|
|
var sEffective = _fetchString(i_crm, @"Effective"); |
|
|
var bExcel = _fetchBool(i_crm, @"Excel"); |
|
|
var bExcel = _fetchBool(i_crm, @"Excel"); |
|
|
pml.DataList = db.Queryable<SETB_ORG_Venue, SETB_SYS_Region, SETB_SYS_Country, SETB_UTL_City>( |
|
|
pml.DataList = db.Queryable<SETB_ORG_Venue, SETB_SYS_Region, SETB_SYS_Country, SETB_UTL_City>( |
|
@ -48,14 +46,12 @@ namespace EasyBL.WEBAPP.SYS |
|
|
JoinType.Left, t1.OrgID == t2.OrgID && t1.RegionID == t2.RegionID, |
|
|
JoinType.Left, t1.OrgID == t2.OrgID && t1.RegionID == t2.RegionID, |
|
|
JoinType.Left, t1.OrgID == t2.OrgID && t1.CountryID == t3.CountryID, |
|
|
JoinType.Left, t1.OrgID == t2.OrgID && t1.CountryID == t3.CountryID, |
|
|
JoinType.Left, t1.OrgID == t2.OrgID && t1.CityID == t4.CityID |
|
|
JoinType.Left, t1.OrgID == t2.OrgID && t1.CityID == t4.CityID |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
.Where((t1, t2, t3, t4) => t1.OrgID == i_crm.ORIGID && t1.DelStatus != "Y" && t1.VenueID.Contains(sVenueID) && t1.VenueName.Contains(sVenueName) && sEffective.Contains(t1.Effective)) |
|
|
|
|
|
|
|
|
.Where((t1, t2, t3, t4) => t1.OrgID == i_crm.ORIGID && t1.DelStatus != "Y" && t1.VenueID.Contains(sVenueID) && sEffective.Contains(t1.Effective)) |
|
|
.WhereIF(iRegionID != -1, (t1, t2, t3, t4) => t1.RegionID == iRegionID) |
|
|
.WhereIF(iRegionID != -1, (t1, t2, t3, t4) => t1.RegionID == iRegionID) |
|
|
.WhereIF(iCountryID != -1, (t1, t2, t3, t4) => t1.CountryID == iCountryID) |
|
|
.WhereIF(iCountryID != -1, (t1, t2, t3, t4) => t1.CountryID == iCountryID) |
|
|
.WhereIF(iCityID != -1, (t1, t2, t3, t4) => t1.CityID == iCityID) |
|
|
.WhereIF(iCityID != -1, (t1, t2, t3, t4) => t1.CityID == iCityID) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(sVenueName), (t1, t2, t3, t4) => (t1.VenueName + t1.VenueName_EN + t1.VenueSlug).Contains(sVenueName)) |
|
|
.Select((t1, t2, t3, t4) => new View_ORG_Venue |
|
|
.Select((t1, t2, t3, t4) => new View_ORG_Venue |
|
|
{ |
|
|
{ |
|
|
VenueID = SqlFunc.GetSelfAndAutoFill(t1.VenueID), |
|
|
VenueID = SqlFunc.GetSelfAndAutoFill(t1.VenueID), |
|
@ -67,7 +63,7 @@ namespace EasyBL.WEBAPP.SYS |
|
|
.MergeTable() |
|
|
.MergeTable() |
|
|
.OrderBy(sSortField, sSortOrder) |
|
|
.OrderBy(sSortField, sSortOrder) |
|
|
.ToPageList(pml.PageIndex, bExcel ? 100000 : pml.PageSize, ref iPageCount); |
|
|
.ToPageList(pml.PageIndex, bExcel ? 100000 : pml.PageSize, ref iPageCount); |
|
|
Console.WriteLine(pml.DataList); |
|
|
|
|
|
|
|
|
|
|
|
pml.Total = iPageCount; |
|
|
pml.Total = iPageCount; |
|
|
rm = new SuccessResponseMessage(null, i_crm); |
|
|
rm = new SuccessResponseMessage(null, i_crm); |
|
|
if (bExcel) |
|
|
if (bExcel) |
|
|