diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/OnsiteService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/OnsiteService.cs index 418ac13..f20dcda 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/OnsiteService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/OnsiteService.cs @@ -1196,9 +1196,45 @@ namespace EasyBL.WEBAPP.ShowEasy var objBookingOnline = db.Queryable() //搜尋條件 .Where(x => x.OrgID == sORIGID && x.BookingID == strBookingID) - .Single(); - + .Select((t1) => new View_SAL_BookingOnline + { + BookingID = SqlFunc.GetSelfAndAutoFill(t1.BookingID), + //ServiceID = t1.ServiceID, + //ServiceNo = t1.ServiceNo, + //ServiceName = t1.ServiceName, + //ConfirmDays = t2.ArgumentValue, + //ExhibitionID = t1.ExhibitionID, + //CancelPolicy = t1.CancelPolicy, + //Features = t1.Features, + //Details = t1.Details, + //MinPrice = t1.MinPrice, + //CurrencyID = t1.CurrencyID, + //ExpenseDescription = "" + + }).Single(); + + + if (objBookingOnline != null) { + + + //ServicePictrue + + var objFiles = db.Queryable((t1, t2) => + new object[] { + JoinType.Inner, t1.OrgID == t2.OrgID && t1.ParentID == t2.PreviewFile && t2.ServiceID==objBookingOnline.ServiceID && t2.LangID==objBookingOnline.LangType + + } + ) + //搜尋條件 + .Where((t1,t2) => t1.OrgID == sORIGID && t2.ServiceID == objBookingOnline.ServiceID && t2.LangID == objBookingOnline.LangType) + .Single(); + + if (objFiles != null) { + string requestUrl = Common.ConfigGetValue("", "ida:RedirectUri"); + objBookingOnline.ServicePictrue = requestUrl + "/" + objFiles.FilePath.Replace("\\", "/"); + } + } srm = new SuccessResponseMessage(null, null); srm.DATA.Add(BLWording.REL, objBookingOnline); diff --git a/EuroTran/Entity/ViewModels/View_SAL_BookingOnline.cs b/EuroTran/Entity/ViewModels/View_SAL_BookingOnline.cs index 45ade66..fc14f6e 100644 --- a/EuroTran/Entity/ViewModels/View_SAL_BookingOnline.cs +++ b/EuroTran/Entity/ViewModels/View_SAL_BookingOnline.cs @@ -10,7 +10,7 @@ namespace Entity.ViewModels public string MemberEmail { get; set; } public string SupplierName { get; set; } public string ServiceName { get; set; } - //public string MemberName { get; set; } + public string ServicePictrue { get; set; } //public string MemberName { get; set; } //public string MemberName { get; set; } }