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.
117 lines
3.3 KiB
117 lines
3.3 KiB
using EasyBL.WebApi.Filters;
|
|
using EasyBL.WebApi.Message;
|
|
using EasyBL.WEBAPP.SYS;
|
|
using Entity.ShowEasyDtos;
|
|
using Entity.Sugar;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Net.Http;
|
|
using System.Web.Http;
|
|
|
|
namespace WebApp.Controllers
|
|
{
|
|
public class ExhibitionController : ApiController
|
|
{
|
|
|
|
|
|
[HttpGet]
|
|
public HttpResponseMessage Statuses(string Lang)
|
|
{
|
|
return new ExhibitionService().GetStatusList(Lang);
|
|
}
|
|
|
|
[HttpGet]
|
|
public HttpResponseMessage Exhibitions(
|
|
string Lang,
|
|
string RegionIDs,
|
|
string CountryIDs,
|
|
string CityIDs,
|
|
string MainCategoryIDs,
|
|
string SubCategoryIDs,
|
|
string Status,
|
|
string Date )
|
|
{
|
|
List<string> rsRegionIDs = new List<string>();
|
|
List<string> rsCountryIDs = new List<string>();
|
|
List<string> rsCityIDs = new List<string>();
|
|
List<string> rsMainCategoryIDs = new List<string>();
|
|
List<string> rsSubCategoryIDs = new List<string>();
|
|
List<string> rsStatus = new List<string>();
|
|
|
|
if (!string.IsNullOrEmpty(RegionIDs)) {
|
|
rsRegionIDs = JsonConvert.DeserializeObject<List<string>>(RegionIDs);
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(CountryIDs))
|
|
{
|
|
rsCountryIDs = JsonConvert.DeserializeObject<List<string>>(CountryIDs);
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(CityIDs))
|
|
{
|
|
rsCityIDs = JsonConvert.DeserializeObject<List<string>>(CityIDs);
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(MainCategoryIDs))
|
|
{
|
|
rsMainCategoryIDs = JsonConvert.DeserializeObject<List<string>>(MainCategoryIDs);
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(SubCategoryIDs))
|
|
{
|
|
rsSubCategoryIDs = JsonConvert.DeserializeObject<List<string>>(SubCategoryIDs);
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(Status))
|
|
{
|
|
rsStatus = JsonConvert.DeserializeObject<List<string>>(Status);
|
|
}
|
|
|
|
|
|
|
|
return new ExhibitionService().GetExhibitionList(Lang, rsRegionIDs, rsCountryIDs, rsCityIDs, rsMainCategoryIDs, rsSubCategoryIDs, rsStatus, Date);
|
|
}
|
|
|
|
[HttpGet]
|
|
public HttpResponseMessage Exhibition(string Lang, string ExhibitionID)
|
|
{
|
|
|
|
return new ExhibitionService().GetOneExhibition(Lang, ExhibitionID);
|
|
|
|
}
|
|
|
|
[HttpGet]
|
|
public HttpResponseMessage Info(string Lang, string ExhibitionID, string Year)
|
|
{
|
|
|
|
return new ExhibInfoService().GetOneExhibInfo(Lang, ExhibitionID, Year);
|
|
}
|
|
|
|
[HttpGet]
|
|
public HttpResponseMessage Statistics(string Lang, string ExhibitionID)
|
|
{
|
|
|
|
return new ExhibStatService().GetExhibStatisticsList(Lang, ExhibitionID);
|
|
}
|
|
|
|
[HttpGet]
|
|
public HttpResponseMessage Media(string Lang, string ExhibitionID, string Type)
|
|
{
|
|
|
|
return new ExhibMediaService().GetMediaList(Lang, ExhibitionID, Type);
|
|
}
|
|
|
|
[HttpGet]
|
|
public HttpResponseMessage Files(string ExhibitionID)
|
|
{
|
|
|
|
return new ExhibMediaService().GetMediaFileList(ExhibitionID);
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|