public ActionResult Index()
 {
     var users = ClinikeUserEx.GetAll();
     var model = new List<EditUserViewModel>();
     foreach (var user in users)
     {
         var u = new EditUserViewModel(user);
         model.Add(u);
     }
     return View(model);
 }
 public ActionResult Delete(string id)
 {
     var user = ClinikeUserEx.Find(u => u.Id == id);
     var model = new EditUserViewModel(user);
     if (user == null)
     {
         return HttpNotFound();
     }
     return View(model);
 }
        public async Task<ActionResult> Edit(EditUserViewModel model)
        {
            if (ModelState.IsValid)
            {
                var user = ClinikeUserEx.Find(u => u.Id == model.Id);
                user.Email = model.Email;
                await ClinikeUserEx.UpdateAsync(user.Id, user);
                return RedirectToRoute("AccountIndex");
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }
 public ActionResult Edit(string id, ManageMessageId? Message = null)
 {
     var user = ClinikeUserEx.Find(u => u.Id == id);
     var model = new EditUserViewModel(user);
     ViewBag.MessageId = Message;
     return View(model);
 }