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 rsRegionIDs = new List(); List rsCountryIDs = new List(); List rsCityIDs = new List(); List rsMainCategoryIDs = new List(); List rsSubCategoryIDs = new List(); List rsStatus = new List(); if (!string.IsNullOrEmpty(RegionIDs)) { rsRegionIDs = JsonConvert.DeserializeObject>(RegionIDs); } if (!string.IsNullOrEmpty(CountryIDs)) { rsCountryIDs = JsonConvert.DeserializeObject>(CountryIDs); } if (!string.IsNullOrEmpty(CityIDs)) { rsCityIDs = JsonConvert.DeserializeObject>(CityIDs); } if (!string.IsNullOrEmpty(MainCategoryIDs)) { rsMainCategoryIDs = JsonConvert.DeserializeObject>(MainCategoryIDs); } if (!string.IsNullOrEmpty(SubCategoryIDs)) { rsSubCategoryIDs = JsonConvert.DeserializeObject>(SubCategoryIDs); } if (!string.IsNullOrEmpty(Status)) { rsStatus = JsonConvert.DeserializeObject>(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); } } }