using EasyBL; using EasyBL.WebApi; using EasyBL.WebApi.Common; using EasyBL.WebApi.Filters; using EasyBL.WebApi.Message; using EasyBL.WEBAPP; using EasyBL.WEBAPP.SYS; using Entity.ShowEasyDtos; using Entity.Sugar; using Entity.ViewModels; using Newtonsoft.Json; using SqlSugar.Base; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web; using System.Web.Http; namespace WebApp.Controllers { public class BookingOnlineController : ApiController { /// /// 子類別查詢API (服務有包含該類別才列出) /// /// /// [HttpGet] [SEApiSecurityFilter] public HttpResponseMessage GetBookingCategory(string LangType) { var SEToken = SETokenUtil.GetToken(this.Request); return new BookingOnlineService().GetBookingCategory(SEToken.Account, LangType); } /// /// 子類別查詢API (服務有包含該類別才列出) /// /// /// [HttpGet] [SEApiSecurityFilter] public HttpResponseMessage BookingCardList(string Lang, string SubCategoryIDs, string BookingStatuses, string PaymentStatuses) { var SEToken = SETokenUtil.GetToken(this.Request); List rsSubCategoryIDs = new List(); List rsBookingStatuses = new List(); List rsPaymentStatuses = new List(); if (!string.IsNullOrEmpty(SubCategoryIDs)) { rsSubCategoryIDs = JsonConvert.DeserializeObject>(SubCategoryIDs); } if (!string.IsNullOrEmpty(BookingStatuses)) { rsBookingStatuses = JsonConvert.DeserializeObject>(BookingStatuses); } if (!string.IsNullOrEmpty(PaymentStatuses)) { rsPaymentStatuses = JsonConvert.DeserializeObject>(PaymentStatuses); } return new BookingOnlineService().BookingCardList(SEToken.Account, Lang, rsSubCategoryIDs, rsBookingStatuses, rsPaymentStatuses); } /// /// 上傳匯款單 /// /// /// [HttpGet] [SEApiSecurityFilter] public HttpResponseMessage UploadRemittance(string BookingID) { var SEToken = SETokenUtil.GetToken(this.Request); return new BookingOnlineService().UploadRemittance(SEToken.OrgID, SEToken.Account, BookingID); } } }