public DataController() { Des = DES.Create(); Des.Mode = CipherMode.CFB; var bytes = Encoding.ASCII.GetBytes(FirstKey + SecondKey); Des.Key = bytes; Des.IV = bytes; RootPath = Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName; FilePath = Path.Combine(new String[] { RootPath, "IS_1", "Data", "user.json" }); var admin = new UserModel() { Login = "******", Password = String.Empty, AuthCnt = 0, Rule = true, PasswordRestriction = false }; if (!CreateDataFile()) { try { UserList.Add(admin); var add = UserList.Get(admin); BaseDESEncode(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); System.Environment.Exit(0); } } else { try { BaseDESDecode(); var add = UserList.Get(admin); } catch (Exception ex) { Console.WriteLine(ex.ToString()); System.Environment.Exit(0); } } }
public ActionResult UserList() { var m = UserListModel.Get(); ViewBag.Title = @Piranha.Resources.Settings.ListTitleUsers; return(View(@"~/Areas/Manager/Views/Settings/UserList.cshtml", m)); }
public ActionResult UserList() { var m = UserListModel.Get(); ViewBag.Title = @Piranha.Resources.Settings.ListTitleUsers; // Executes the user list loaded hook, if registered if (WebPages.Hooks.Manager.UserListModelLoaded != null) { WebPages.Hooks.Manager.UserListModelLoaded(this, WebPages.Manager.GetActiveMenuItem(), m); } return(View(@"~/Areas/Manager/Views/Settings/UserList.cshtml", m)); }
public UserListModel Get() { return(UserListModel.Get(_db)); }
public IActionResult List() { var model = UserListModel.Get(userManager); return(View(model)); }
public IActionResult List() { return(View(UserListModel.Get(_db))); }
public ActionResult UserList() { return(View("UserList", UserListModel.Get())); }