Exemple #1
0
 public ActionResult Login(Manager manager)
 {
     ViewData["error"] = string.Empty;
     Manager m = ManagerService.GetInstance().Get(manager.username);
     if (m != null && m.password.Trim().Equals(manager.password) && m.islocked == false)
     {
         Session["alogin"] = m;
         return RedirectToAction("index", "admin");
     }
     else
         ViewData["error"] = "用户名或者密码错误";
     return View();
 }
Exemple #2
0
 public void Save(Manager manager)
 {
     if (manager.id > 0)
         _managerDao.Update(manager);else
     _managerDao.Insert(manager);
 }
 public ActionResult My(Manager manager)
 {
     ManagerService.GetInstance().Save(manager);
     return View(manager);
 }
 public ActionResult AddUser(Manager manager)
 {
     ManagerService.GetInstance().Save(manager);
     ViewData["user"] = ManagerService.GetInstance().GetList();
     return View();
 }
 partial void DeleteManager(Manager instance);
 partial void UpdateManager(Manager instance);
 partial void InsertManager(Manager instance);