From 99ee75539b8d87f6691bb2f3957a721251f14f5e Mon Sep 17 00:00:00 2001 From: alina <1449359159@qq.com> Date: Fri, 24 Feb 2023 16:09:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=8D=E5=8B=99=E5=9C=96?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EasyBL.WEBAPP/ShowEasy/OnsiteService.cs | 40 ++++++++++++++++++- .../ViewModels/View_SAL_BookingOnline.cs | 2 +- 2 files changed, 39 insertions(+), 3 deletions(-) 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; } }