初始化项目
This commit is contained in:
39
UI/Controllers/OrgController.cs
Normal file
39
UI/Controllers/OrgController.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user