Ejemplo n.º 1
0
        //
        // 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);
        }
Ejemplo n.º 2
0
        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);
        }