// // GET: /Practice/ public ActionResult Index(string practiceId) { ClientModel model = new ClientModel(); if (practiceId == null) { UserProfile user; user = model.GetUser(WebSecurity.CurrentUserName); practiceId = user.PracticeId.ToString(); return RedirectToAction("Index", "Client", new { practiceId = practiceId }); } model.LoadData(practiceId); return View(model); }
public ActionResult GetClients(string practiceId) { ClientModel model = new ClientModel(); if (practiceId == null) { UserProfile user; user = model.GetUser(WebSecurity.CurrentUserName); practiceId = user.PracticeId.ToString(); return RedirectToAction("Index", "Client", new { practiceId = practiceId }); } model.LoadData(practiceId); return Json(model.Clients, JsonRequestBehavior.AllowGet); }