41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using System.Web.Mvc;
|
|
using WX.CRM.IBLL.Res;
|
|
using WX.CRM.WebHelper;
|
|
|
|
namespace WX.CRM.WEB.Controllers.Res
|
|
{
|
|
public class SeniorSharedPoolController : BaseController
|
|
{
|
|
private readonly IRES_SENIORSHAREDPOOL _seniorSharedPool;
|
|
private static readonly object sync = new object();
|
|
|
|
public SeniorSharedPoolController(IRES_SENIORSHAREDPOOL seniorSharedPool)
|
|
{
|
|
this._seniorSharedPool = seniorSharedPool;
|
|
}
|
|
|
|
[HttpGet]
|
|
[AuthorizeRedirect(Roles = InitRights.CONST_高级共享池)]
|
|
public ActionResult Index()
|
|
{
|
|
ViewBag.PoolCount = _seniorSharedPool.GetCount();
|
|
return View();
|
|
}
|
|
|
|
[HttpPost]
|
|
[AuthorizeRedirect(Roles = InitRights.CONST_高级共享池)]
|
|
public JsonResult Find()
|
|
{
|
|
var resid = string.Empty;
|
|
|
|
lock (sync)
|
|
{
|
|
resid = _seniorSharedPool.FindSeniorSharedPoolRes(UserId, Eid);
|
|
}
|
|
|
|
return Json(new { resid }, JsonRequestBehavior.AllowGet);
|
|
}
|
|
|
|
}
|
|
}
|