public MenuController(MenuApp menuApp, MenuButtonApp menuButtonApp, RoleAuthorizeApp roleAuthorizeApp, RoleApp roleApp) { this.menuApp = menuApp; this.menuButtonApp = menuButtonApp; this.roleAuthorizeApp = roleAuthorizeApp; this.roleApp = roleApp; }
private void menuApplicationToolStripMenuItem_Click(object sender, EventArgs e) { MenuApp menuApp; menuApp = new MenuApp(); menuApp.MdiParent = this; menuApp.Show(); }
public ActionResult DeleteConfirmed(int id) { MenuApp menuApp = db.MenuApp.Find(id); db.MenuApp.Remove(menuApp); db.SaveChanges(); return(RedirectToAction("Index")); }
public PrivateMessageFromFriendReceivedMahuaEvent( IMahuaApi mahuaApi) { _mahuaApi = mahuaApi; _OverApp = new OverApp(mahuaApi); _ManagerApp = new ManagerApp(mahuaApi, _OverApp); _AdviseApp = new AdviseApp(mahuaApi, _ManagerApp); _PetCdApp = new PetCdApp(mahuaApi, _AdviseApp); _SignApp = new SignApp(mahuaApi, _PetCdApp); _MenuApp = new MenuApp(mahuaApi, _SignApp); }
public ClientsDataController(ItemsDetailApp itemDetailApp, ItemsApp itemsApp, OrganizeApp organizeApp, RoleApp roleApp, DutyApp dutyApp, RoleAuthorizeApp roleAuthorizeApp, MenuApp menuApp, MenuButtonApp menuButtonApp) { this.itemDetailApp = itemDetailApp; this.itemsApp = itemsApp; this.organizeApp = organizeApp; this.roleApp = roleApp; this.dutyApp = dutyApp; this.roleAuthorizeApp = roleAuthorizeApp; this.menuApp = menuApp; this.menuButtonApp = menuButtonApp; }
public ActionResult Edit([Bind(Include = "ID,RoleID,MenuText,IDParentMenu,IconMenu,OrderSort")] MenuApp menuApp) { if (ModelState.IsValid) { db.Entry(menuApp).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.parent = db.MenuApp.Where(a => a.IDParentMenu == null).ToList(); ViewBag.RoleID = new SelectList(db.Roles, "id", "name", menuApp.RoleID); return(View("~/Views/appdashboard/masterdata/Menu/Edit.cshtml", menuApp)); }
public GroupMessageReceivedMahuaEvent( IMahuaApi mahuaApi, IServerRemind serverRemind) { _mahuaApi = mahuaApi; _serverRemind = serverRemind; _OverApp = new OverApp(mahuaApi); _DayTaskApp = new DayTaskApp(_mahuaApi, _OverApp); _AdviseApp = new AdviseApp(mahuaApi, _DayTaskApp); _PetCdApp = new PetCdApp(mahuaApi, _AdviseApp); _SerOpenApp = new SerOpenApp(mahuaApi, serverRemind, _PetCdApp); _SignApp = new SignApp(mahuaApi, _SerOpenApp); _MenuApp = new MenuApp(mahuaApi, _SignApp); }
public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MenuApp menuApp = db.MenuApp.Find(id); if (menuApp == null) { return(HttpNotFound()); } return(View("~/Views/appdashboard/masterdata/Menu/Delete.cshtml", menuApp)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MenuApp menuApp = db.MenuApp.Find(id); if (menuApp == null) { return(HttpNotFound()); } ViewBag.parent = db.MenuApp.Where(a => a.IDParentMenu == null).ToList(); ViewBag.RoleID = new SelectList(db.Roles, "id", "name", menuApp.RoleID); return(View("~/Views/appdashboard/masterdata/Menu/Edit.cshtml", menuApp)); }
public IActionResult GetUserInfo() { CommonResult result = new CommonResult(); User user = _userService.Get(CurrentUser.UserId); YuebonCacheHelper yuebonCacheHelper = new YuebonCacheHelper(); SystemType systemType = _systemTypeService.Get(CurrentUser.ActiveSystemId); YuebonCurrentUser currentSession = new YuebonCurrentUser { UserId = user.Id, Account = user.Account, Name = user.RealName, NickName = user.NickName, AccessToken = CurrentUser.AccessToken, AppKey = CurrentUser.AppKey, CreateTime = DateTime.Now, HeadIcon = user.HeadIcon, Gender = user.Gender, ReferralUserId = user.ReferralUserId, MemberGradeId = user.MemberGradeId, Role = _roleService.GetRoleEnCode(user.RoleId), MobilePhone = user.MobilePhone, OrganizeId = user.OrganizeId, DeptId = user.DepartmentId, CurrentLoginIP = CurrentUser.CurrentLoginIP, IPAddressName = CurrentUser.IPAddressName, TenantId = "" }; CurrentUser = currentSession; CurrentUser.ActiveSystemId = systemType.Id; CurrentUser.ActiveSystem = systemType.FullName; CurrentUser.ActiveSystemUrl = systemType.Url; List <MenuOutputDto> listFunction = new List <MenuOutputDto>(); MenuApp menuApp = new MenuApp(); if (Permission.IsAdmin(CurrentUser)) { CurrentUser.SubSystemList = _systemTypeService.GetAllByIsNotDeleteAndEnabledMark().MapTo <SystemTypeOutputDto>(); //取得用户可使用的授权功能信息,并存储在缓存中 listFunction = menuApp.GetFunctionsBySystem(CurrentUser.ActiveSystemId); CurrentUser.MenusRouter = menuApp.GetVueRouter("", systemType.EnCode); } else { CurrentUser.SubSystemList = _systemTypeService.GetSubSystemList(user.RoleId); //取得用户可使用的授权功能信息,并存储在缓存中 listFunction = menuApp.GetFunctionsByUser(user.Id, CurrentUser.ActiveSystemId); CurrentUser.MenusRouter = menuApp.GetVueRouter(user.RoleId, systemType.EnCode); } UserLogOn userLogOn = _userLogOnService.GetByUserId(CurrentUser.UserId); CurrentUser.UserTheme = userLogOn.Theme == null ? "default" : userLogOn.Theme; TimeSpan expiresSliding = DateTime.Now.AddMinutes(120) - DateTime.Now; yuebonCacheHelper.Add("User_Function_" + user.Id, listFunction, expiresSliding, true); List <string> listModules = new List <string>(); foreach (MenuOutputDto item in listFunction) { listModules.Add(item.EnCode); } CurrentUser.Modules = listModules; yuebonCacheHelper.Add("login_user_" + user.Id, CurrentUser, expiresSliding, true); //该用户的数据权限 List <String> roleDateList = _roleDataService.GetListDeptByRole(user.RoleId); yuebonCacheHelper.Add("User_RoleData_" + user.Id, roleDateList, expiresSliding, true); result.ResData = CurrentUser; result.ErrCode = ErrCode.successCode; result.Success = true; return(ToJsonContent(result, true)); }
public static void Main(string [] args) { MenuApp app = new MenuApp(); app.Run(); }
public MenuButtonController(MenuApp menuApp, MenuButtonApp moduleButtonApp) { this.menuApp = menuApp; this.menuButtonApp = moduleButtonApp; }