You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
127 lines
3.8 KiB
127 lines
3.8 KiB
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 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 BookingController : ApiController
|
|
{
|
|
|
|
/// <summary>
|
|
/// 獲取類別數據
|
|
/// </summary>
|
|
/// <param name="argumentClassID"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public HttpResponseMessage GetArgumentClassList(string argumentClassID)
|
|
{
|
|
return new BookingService().GetArgumentClassList(argumentClassID);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 獲取類別數據
|
|
/// </summary>
|
|
/// <param name="argumentClassID"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[SEApiSecurityFilter]
|
|
|
|
public HttpResponseMessage GetBookingCategory(string Account, string LangType)
|
|
{
|
|
|
|
var SEToken = SETokenUtil.GetToken(this.Request);
|
|
|
|
return new BookingService().GetBookingCategory(SEToken.Account, LangType);
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name=""></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[SEApiSecurityFilter]
|
|
public HttpResponseMessage Bookings(
|
|
string Lang,
|
|
string SubCategoryIDs,
|
|
string BookingStatuses,
|
|
string PaymentStatuses)
|
|
{
|
|
|
|
List<string> rsSubCategoryIDs = new List<string>();
|
|
List<string> rsBookingStatuses = new List<string>();
|
|
List<string> rsPaymentStatuses = new List<string>();
|
|
|
|
var SEToken = SETokenUtil.GetToken(this.Request);
|
|
|
|
if (!string.IsNullOrEmpty(SubCategoryIDs)) {
|
|
rsSubCategoryIDs = JsonConvert.DeserializeObject<List<string>>(SubCategoryIDs);
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(BookingStatuses))
|
|
{
|
|
rsBookingStatuses = JsonConvert.DeserializeObject<List<string>>(BookingStatuses);
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(PaymentStatuses))
|
|
{
|
|
rsPaymentStatuses = JsonConvert.DeserializeObject<List<string>>(PaymentStatuses);
|
|
}
|
|
|
|
return new BookingService().GetBookings(SEToken.Account, Lang, rsSubCategoryIDs, rsBookingStatuses, rsPaymentStatuses);
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name=""></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public HttpResponseMessage TestBookings(
|
|
string Account,
|
|
string Lang,
|
|
string SubCategoryIDs,
|
|
string BookingStatuses,
|
|
string PaymentStatuses)
|
|
{
|
|
|
|
List<string> rsSubCategoryIDs = new List<string>();
|
|
List<string> rsBookingStatuses = new List<string>();
|
|
List<string> rsPaymentStatuses = new List<string>();
|
|
|
|
if (!string.IsNullOrEmpty(SubCategoryIDs))
|
|
{
|
|
rsSubCategoryIDs = JsonConvert.DeserializeObject<List<string>>(SubCategoryIDs);
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(BookingStatuses))
|
|
{
|
|
rsBookingStatuses = JsonConvert.DeserializeObject<List<string>>(BookingStatuses);
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(PaymentStatuses))
|
|
{
|
|
rsPaymentStatuses = JsonConvert.DeserializeObject<List<string>>(PaymentStatuses);
|
|
}
|
|
|
|
return new BookingService().GetBookings(Account, Lang, rsSubCategoryIDs, rsBookingStatuses, rsPaymentStatuses);
|
|
}
|
|
|
|
|
|
}
|
|
}
|