public ActionResult Edit( UserModel userModel)
 {
     Debug.WriteLine("C");
     if (ModelState.IsValid)
     {
         db.Entry(userModel).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(userModel);
 }
Esempio n. 2
0
 public UserRole GetUserValidity(UserModel u)
 {
     if (u.role == "Admin")
     {
         return UserRole.Admin;
     }
     else if (u.role == "PManager")
     {
         return UserRole.PManager;
     }
     else
     {
         return UserRole.Developer;
     }
 }