public JsonResult GetParkingPassRemarkOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK010103").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01010304": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "删除"; option.handler = "DeletePassRemark"; option.sort = 2; options.Add(option); break; } } } SystemOperatePurview roption = new SystemOperatePurview(); roption.text = "刷新"; roption.handler = "RefreshPassRemark"; roption.sort = 6; options.Add(roption); result.Data = options.OrderBy(p => p.sort); return(result); }
/// <summary> /// 获取车辆类型操作权限 /// </summary> /// <returns></returns> public JsonResult GetParkCarTypeOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK010201").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01020101": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "添加"; option.handler = "Add"; option.sort = 1; options.Add(option); break; } case "PK01020102": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "修改"; option.handler = "Update"; option.sort = 2; options.Add(option); break; } case "PK01020104": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "删除"; option.handler = "Deletetype"; option.sort = 3; options.Add(option); break; } } } SystemOperatePurview option1 = new SystemOperatePurview(); option1.text = "单双车牌配置"; option1.iconCls = "icon-add"; option1.handler = "AddCarTypeSingle"; option1.sort = 3; options.Add(option1); SystemOperatePurview roption = new SystemOperatePurview(); roption.text = "刷新"; roption.handler = "Refresh"; roption.sort = 6; options.Add(roption); result.Data = options.OrderBy(p => p.sort); return(result); }
public ActionResult Index() { ViewBag.CanAdd = GetLoginUserRoleAuthorize.FirstOrDefault(p => p.ModuleID == "PK01060101") != null; ViewBag.CanUpdate = GetLoginUserRoleAuthorize.FirstOrDefault(p => p.ModuleID == "PK01060102") != null; ViewBag.CanDelete = GetLoginUserRoleAuthorize.FirstOrDefault(p => p.ModuleID == "PK01060103") != null; ViewBag.CanaAuthorize = GetLoginUserRoleAuthorize.FirstOrDefault(p => p.ModuleID == "PK01060104") != null; return(View()); }
public ActionResult Index() { ViewBag.AddScope = GetLoginUserRoleAuthorize.FirstOrDefault(p => p.ModuleID == "PK01060201") != null; ViewBag.UpdateScope = GetLoginUserRoleAuthorize.FirstOrDefault(p => p.ModuleID == "PK01060202") != null; ViewBag.DeleteScope = GetLoginUserRoleAuthorize.FirstOrDefault(p => p.ModuleID == "PK01060203") != null; ViewBag.ScopeAuthorizeVillage = GetLoginUserRoleAuthorize.FirstOrDefault(p => p.ModuleID == "PK01060204") != null; return(View()); }
public ActionResult Main() { //车场首页权限 SysRoleAuthorize homeAuthorize = GetLoginUserRoleAuthorize.FirstOrDefault(p => p.ModuleID == "PK010507"); if (homeAuthorize == null) { return(RedirectToAction("Empty", "Home")); } return(View()); }
/// <summary> /// 获取线上订单操作权限 /// </summary> /// <returns></returns> public JsonResult GetOnlieOrderOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK011002").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01100201": { SystemOperatePurview option = new SystemOperatePurview(); option.id = "btnpayresult"; option.iconCls = "icon-edit"; option.text = "同步支付结果"; option.handler = "SynchPaymentResult"; option.sort = 0; options.Add(option); break; } case "PK01100202": { SystemOperatePurview option = new SystemOperatePurview(); option.id = "btnmanualrefund"; option.iconCls = "icon-edit"; option.text = "手动退款"; option.handler = "ManualRefund"; option.sort = 1; options.Add(option); break; } } } SystemOperatePurview roption = new SystemOperatePurview(); roption.text = "刷新"; roption.handler = "Refresh"; roption.sort = 3; options.Add(roption); SystemOperatePurview roption2 = new SystemOperatePurview(); roption2.id = "btnexport"; roption2.text = "导出"; roption2.handler = "Export"; roption2.iconCls = "icon-print"; roption2.sort = 12; options.Add(roption2); result.Data = options.OrderBy(p => p.sort); return(result); }
/// <summary> /// 获取小区操作权限 /// </summary> /// <returns></returns> public JsonResult GetVillageOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK010102").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01010201": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "添加"; option.handler = "Add"; option.sort = 1; options.Add(option); break; } case "PK01010202": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "修改"; option.handler = "Update"; option.sort = 2; options.Add(option); break; } case "PK01010203": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "删除"; option.handler = "Delete"; option.sort = 3; options.Add(option); break; } } } SystemOperatePurview soption = new SystemOperatePurview(); soption.text = "刷新"; soption.handler = "Refresh"; soption.sort = 4; options.Add(soption); result.Data = options.OrderBy(p => p.sort); return(result); }
/// <summary> /// 获取审核月租车申请操作权限 /// </summary> /// <returns></returns> public JsonResult GetAduitMonthlyCarApplyOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK010207").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01020701": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "审核"; option.handler = "Update"; option.iconCls = "icon-edit"; option.id = "btnUpdate"; option.sort = 2; options.Add(option); break; } case "PK01020702": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "拒绝"; option.iconCls = "icon-remove"; option.handler = "Delete"; option.id = "btnDelete"; option.sort = 3; options.Add(option); break; } } } SystemOperatePurview roption = new SystemOperatePurview(); roption.text = "刷新"; roption.handler = "Refresh"; roption.sort = 6; options.Add(roption); result.Data = options.OrderBy(p => p.sort); return(result); }
/// <summary> /// 获取微信其他配置操作权限 /// </summary> /// <returns></returns> public JsonResult GetWxOtherConfigOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK0109").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK010902": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "修改"; option.handler = "Update"; option.sort = 1; options.Add(option); break; } } } SystemOperatePurview option1 = new SystemOperatePurview(); option1.id = "btnformat"; option1.iconCls = "icon-wxconfig-format"; option1.text = "对应格式"; option1.handler = "Format"; option1.sort = 2; options.Add(option1); SystemOperatePurview roption = new SystemOperatePurview(); roption.text = "刷新"; roption.handler = "Refresh"; roption.sort = 6; options.Add(roption); result.Data = options.OrderBy(p => p.sort); return(result); }
/// <summary> /// 获取操作权限 /// </summary> /// <returns></returns> public JsonResult GetMessageOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK010109").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01010901": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "添加"; option.handler = "Add"; option.sort = 1; options.Add(option); break; } case "PK01010902": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "修改"; option.handler = "Update"; option.sort = 2; options.Add(option); break; } case "PK01010903": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "删除"; option.handler = "Delete"; option.sort = 3; options.Add(option); break; } case "PK01010904": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "发送通知"; option.handler = "send"; option.iconCls = "icon-ok"; option.sort = 4; options.Add(option); break; } } } SystemOperatePurview rtoolbar = new SystemOperatePurview(); rtoolbar.text = "刷新"; rtoolbar.handler = "Refresh"; rtoolbar.sort = 5; options.Add(rtoolbar); result.Data = options.OrderBy(p => p.sort); return(result); }
public JsonResult GetSellerOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK010301").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01030101": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "添加"; option.handler = "Add"; option.sort = 1; options.Add(option); break; } case "PK01030102": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "修改"; option.handler = "Update"; option.sort = 2; options.Add(option); break; } case "PK01030103": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "删除"; option.handler = "Delete"; option.sort = 5; options.Add(option); break; } case "PK01030104": { SystemOperatePurview option = new SystemOperatePurview(); option.id = "btncharge"; option.iconCls = "icon-charge"; option.text = "充值"; option.handler = "Charge"; option.sort = 3; options.Add(option); break; } case "PK01030105": { SystemOperatePurview option = new SystemOperatePurview(); option.id = "btnresetpassword"; option.iconCls = "icon-resetpassword"; option.text = "重置密码"; option.handler = "ResetPassword"; option.sort = 4; options.Add(option); break; } } } SystemOperatePurview roption = new SystemOperatePurview(); roption.text = "刷新"; roption.handler = "Refresh"; roption.sort = 6; options.Add(roption); result.Data = options.OrderBy(p => p.sort); return(result); }
/// <summary> /// 获取优免二维码操作权限 /// </summary> /// <returns></returns> public JsonResult GetParkDerateQRCodeOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK010303").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01030302": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "添加"; option.handler = "Add"; option.sort = 1; options.Add(option); break; } case "PK01030303": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "修改"; option.handler = "Update"; option.sort = 2; options.Add(option); break; } case "PK01030304": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "删除"; option.handler = "Delete"; option.sort = 3; options.Add(option); break; } case "PK01030305": { SystemOperatePurview option8 = new SystemOperatePurview(); option8.text = "发放优免券"; option8.id = "btngrantqrcode"; option8.handler = "GrantCarDerate"; option8.iconCls = "icon-add"; option8.sort = 4; options.Add(option8); SystemOperatePurview option9 = new SystemOperatePurview(); option9.text = "下载最后下发二维码"; option9.id = "btndownloadqrcode"; option9.handler = "DownloadQRCode"; option9.iconCls = "icon-import"; option9.sort = 5; options.Add(option9); break; } } } SystemOperatePurview roption = new SystemOperatePurview(); roption.text = "刷新"; roption.handler = "Refresh"; roption.sort = 6; options.Add(roption); result.Data = options.OrderBy(p => p.sort); return(result); }
/// <summary> /// 获取设备操作权限 /// </summary> /// <returns></returns> public JsonResult GetParkDevicesOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK010107").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01010701": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "添加"; option.handler = "AddDevice"; option.sort = 1; options.Add(option); break; } case "PK01010702": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "修改"; option.handler = "UpdateDevice"; option.sort = 2; options.Add(option); break; } case "PK01010704": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "修改设备参数"; option.iconCls = "icon-edit"; option.handler = "UpdateDeviceParam"; option.id = "btnupdatedeviceparam"; option.sort = 3; options.Add(option); break; } case "PK01010703": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "删除"; option.handler = "DeleteDevice"; option.sort = 3; options.Add(option); break; } } } SystemOperatePurview roption = new SystemOperatePurview(); roption.text = "刷新"; roption.handler = "RefreshDevice"; roption.sort = 6; options.Add(roption); result.Data = options.OrderBy(p => p.sort); return(result); }
/// <summary> /// 获取卡片操作权限 /// </summary> /// <returns></returns> public JsonResult GetParkGateOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PKBWY01").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PKBWY0101": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "添加"; option.handler = "Add"; option.sort = 1; options.Add(option); SystemOperatePurview option9 = new SystemOperatePurview(); option9.text = "导入塞菲姆车场"; option9.id = "btndownloadqrcode"; option9.handler = "DownloadSFMParking"; option9.iconCls = "icon-import"; option9.sort = 8; options.Add(option9); SystemOperatePurview option10 = new SystemOperatePurview(); option10.text = "塞菲姆车场编号"; option10.id = "btnupdateparkno"; option10.handler = "UpdateParkNo"; option10.iconCls = "icon-edit"; option10.sort = 10; options.Add(option10); break; } case "PKBWY0102": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "修改"; option.handler = "Update"; option.sort = 2; options.Add(option); break; } case "PKBWY0103": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "删除"; option.handler = "Delete"; option.sort = 3; options.Add(option); break; } case "PKBWY0104": { if (!string.IsNullOrWhiteSpace(SystemDefaultConfig.SystemDomain)) { SystemOperatePurview option8 = new SystemOperatePurview(); option8.text = "下载二维码"; option8.id = "btndownloadqrcode"; option8.handler = "DownloadQRCode"; option8.iconCls = "icon-import"; option8.sort = 7; options.Add(option8); } break; } } } SystemOperatePurview roption = new SystemOperatePurview(); roption.text = "刷新"; roption.handler = "Refresh"; roption.sort = 6; options.Add(roption); result.Data = options.OrderBy(p => p.sort); return(result); }
/// <summary> /// 获取关键字操作权限 /// </summary> /// <returns></returns> public JsonResult GetMenuOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK010905").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01090501": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "添加"; option.handler = "Add"; option.sort = 1; options.Add(option); break; } case "PK01090502": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "修改"; option.handler = "Update"; option.sort = 2; options.Add(option); break; } case "PK01090503": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "删除"; option.handler = "Delete"; option.sort = 3; options.Add(option); break; } case "PK01090504": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "发布菜单"; option.handler = "PublishMenu"; option.iconCls = "icon-edit"; option.id = "btnpublishmenu"; option.sort = 4; options.Add(option); break; } } } SystemOperatePurview roption = new SystemOperatePurview(); roption.text = "刷新"; roption.handler = "Refresh"; roption.sort = 6; options.Add(roption); result.Data = options.OrderBy(p => p.sort); return(result); }
public JsonResult GETtgOperatePurview() { JsonResult tg = new JsonResult(); List <tgOperatePurview> options = new List <tgOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK010108").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01010801": { tgOperatePurview option = new tgOperatePurview(); option.text = "增加"; option.sort = 1; option.handler = "Add"; options.Add(option); break; } case "PK01010802": { tgOperatePurview option = new tgOperatePurview(); option.text = "修改"; option.sort = 2; option.handler = "Update"; options.Add(option); break; } case "PK01010803": { tgOperatePurview option = new tgOperatePurview(); option.text = "删除"; option.sort = 3; option.handler = "Delete"; options.Add(option); break; } case "PK01010804": { tgOperatePurview option = new tgOperatePurview(); option.text = "刷新"; option.sort = 4; option.handler = "Refresh"; options.Add(option); break; } case "PK01010805": { tgOperatePurview option = new tgOperatePurview(); option.text = "下载二维码"; option.sort = 5; option.id = "btndownloadqrcode"; option.handler = "DownloadQRCode"; option.iconCls = "icon-import"; options.Add(option); break; } } } tg.Data = options.OrderBy(p => p.sort); return(tg); }
/// <summary> /// 获取关键字操作权限 /// </summary> /// <returns></returns> public JsonResult GetKeyWordOperatePurview() { JsonResult result = new JsonResult(); List <SystemOperatePurview> options = new List <SystemOperatePurview>(); List <SysRoleAuthorize> roleAuthorizes = GetLoginUserRoleAuthorize.Where(p => p.ParentID == "PK010904").ToList(); foreach (var item in roleAuthorizes) { switch (item.ModuleID) { case "PK01090401": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "添加"; option.handler = "Add"; option.sort = 1; options.Add(option); break; } case "PK01090402": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "修改"; option.handler = "Update"; option.sort = 2; options.Add(option); SystemOperatePurview option1 = new SystemOperatePurview(); option1.text = "设为默认回复"; option1.handler = "UpdateForDefault"; option1.iconCls = "icon-edit"; option1.id = "updatefordefault"; option1.sort = 3; options.Add(option1); SystemOperatePurview option2 = new SystemOperatePurview(); option2.text = "设为关注回复"; option2.handler = "UpdateForSubscribe"; option2.iconCls = "icon-edit"; option2.id = "updateforsubscribe"; option2.sort = 4; options.Add(option2); break; } case "PK01090403": { SystemOperatePurview option = new SystemOperatePurview(); option.text = "删除"; option.handler = "Delete"; option.sort = 5; options.Add(option); break; } } } SystemOperatePurview roption = new SystemOperatePurview(); roption.text = "刷新"; roption.handler = "Refresh"; roption.sort = 6; options.Add(roption); result.Data = options.OrderBy(p => p.sort); return(result); }