39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using Newtonsoft.Json;
|
|
using Services.Cache;
|
|
using Services.Manager;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
|
|
namespace UI.Controllers
|
|
{
|
|
public class OrgController : BaseController
|
|
{
|
|
public OrgController()
|
|
{
|
|
base.ViewBag.Select = 1;
|
|
}
|
|
public ActionResult Index(int id)
|
|
{
|
|
try
|
|
{
|
|
ViewBag.SelectOrg = id;
|
|
var org = CacheHelp.cacheSysOrganization.FirstOrDefault(x => x.Id == id && x.IsValid == 0);
|
|
if (org == null)
|
|
throw new Exception();
|
|
ViewBag.OrgName = org.OrganizationName;
|
|
ViewBag.HotelList = JsonConvert.SerializeObject(SyncHotelServer.FindGroup(org));
|
|
return View();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelp.WriteExceptionLog(ex);
|
|
HttpContext.Response.StatusCode = 500;
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
} |