Browse Source

[WHAT] 增加展覽主辦單位API回傳值

Dev
berlin-tzen 2 years ago
parent
commit
f6face26c7
  1. 21
      EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs
  2. 48
      EuroTran/EasyBL.WEBAPP/ShowEasy/OrganizerMaintain_QryService.cs

21
EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs

@ -1337,6 +1337,9 @@ namespace EasyBL.WEBAPP.SYS
VenueMaintain_QryService vm_qry = new VenueMaintain_QryService(); VenueMaintain_QryService vm_qry = new VenueMaintain_QryService();
var VenueDic = vm_qry.FindAllByIDsAsDictionary(sLanguageID); var VenueDic = vm_qry.FindAllByIDsAsDictionary(sLanguageID);
OrganizerMaintain_QryService om_qry = new OrganizerMaintain_QryService();
var OrganizerDic = om_qry.FindAllByIDsAsDictionary(sLanguageID, "");
ExhibStatMaintain_QryService esm_qry = new ExhibStatMaintain_QryService(); ExhibStatMaintain_QryService esm_qry = new ExhibStatMaintain_QryService();
foreach (var Exhibition in ExhibitionList) { foreach (var Exhibition in ExhibitionList) {
@ -1440,12 +1443,30 @@ namespace EasyBL.WEBAPP.SYS
VenueDTO rsVenue = new VenueDTO(); VenueDTO rsVenue = new VenueDTO();
rsVenue.VenueID = Venue.VenueID; rsVenue.VenueID = Venue.VenueID;
rsVenue.VenueName = Venue.VenueName; rsVenue.VenueName = Venue.VenueName;
rsVenue.Address = Venue.Address;
rsExhibition.Venues.Add(rsVenue); rsExhibition.Venues.Add(rsVenue);
} }
} }
if (!string.IsNullOrEmpty(ExhibInfo.OrganizerIDs))
{
List<string> OrganizerIDList = JsonConvert.DeserializeObject<List<string>>(ExhibInfo.OrganizerIDs);
foreach (var OrganizerID in OrganizerIDList)
{
var Organizer = OrganizerDic[OrganizerID];
OrganizerDTO rsOrganizer = new OrganizerDTO();
rsOrganizer.OrganizerID = Organizer.OrganizerID;
rsOrganizer.OrganizerName = Organizer.OrganizerName;
rsExhibition.Organizers.Add(rsOrganizer);
}
}
} }
if (Location != null) if (Location != null)

48
EuroTran/EasyBL.WEBAPP/ShowEasy/OrganizerMaintain_QryService.cs

@ -288,6 +288,54 @@ namespace EasyBL.WEBAPP.ShowEasy
#endregion 主辦單位管理(以ID查詢) #endregion 主辦單位管理(以ID查詢)
#region 主辦單位管理(以ID查詢)
/// 主辦單位管理(以ID查詢)
/// </summary>
/// <param name="i_crm"></param>
/// <returns></returns>
///
public Dictionary<string, SETB_ORG_Organizer> FindAllByIDsAsDictionary(string sLanguageID, string sOrganizerID)
{
ResponseMessage rm = null;
string sMsg = null;
var db = SugarBase.GetIntance();
Dictionary<string, SETB_ORG_Organizer> rsOrganizerDic = new Dictionary<string, SETB_ORG_Organizer>();
try
{
do
{
if (string.IsNullOrEmpty(sLanguageID)) {
sLanguageID = WebAppGlobalConstWord.DEFAULT_LANGUAGE;
}
var rsOrganizer = db.Queryable<SETB_ORG_Organizer>()
.WhereIF(!string.IsNullOrEmpty(sOrganizerID), (t1) => t1.OrganizerID == sOrganizerID)
.Where((t1) => t1.LangType == sLanguageID)
.ToList();
foreach (var Organizer in rsOrganizer) {
rsOrganizerDic[Organizer.OrganizerID] = Organizer;
}
} while (false);
}
catch (Exception ex)
{
sMsg = Util.GetLastExceptionMsg(ex);
}
return rsOrganizerDic;
}
#endregion 主辦單位管理(以ID查詢)
} }
} }
Loading…
Cancel
Save