Files
Web_AuthorityManagement_Mvc…/UI/Controllers/OrgController.cs

39 lines
1.1 KiB
C#
Raw Normal View History

2025-11-20 09:50:21 +08:00
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;
}
}
}
}