public ActionResult ManageUsers()
 {
     UserModels user = new UserModels();
     ViewBag.UserList = user.GetAllUsers();
     ViewBag.Reports = m_embedService.ReportList;
     return View();
 }
 public ActionResult ManageUsers(FormCollection collection)
 {
     UserModels user = new UserModels();
     if (collection["action"] == "CREATE")
     {
         ViewBag.Message = user.CreateUser(collection["email"], collection["password"], PasswordHash.HashPassword(collection["password"]), collection["first_name"], collection["last_name"], collection["contact"], Convert.ToInt32(collection["role"]));
     }
     if (collection["action"] == "UPDATE")
     {
         ViewBag.Message = user.UpdateUser(collection["email"], collection["first_name"], collection["last_name"], collection["contact"], Convert.ToInt32(collection["role"]), Convert.ToInt32(collection["isactive"]));
     }
     ViewBag.UserList = user.GetAllUsers();
     ViewBag.Reports = m_embedService.ReportList;
     return View();
 }