Example #1
0
        public ActionResult AcceptDoctor()
        {
            try
            {
                string url = Request.Url.AbsolutePath;
                url = url.Substring(url.LastIndexOf('/') + 1, (url.Length - 1) - url.LastIndexOf('/'));

                PezeshkPlusEntities db = new PezeshkPlusEntities();
                db.USP_UPD_ActiveDoctor(Convert.ToInt32(url));

                TempData["ActiveDoctor"] = "دکتر تایید شد";
            }
            catch (Exception)
            {
                TempData["ActiveDoctor"] = "خطا دکتر تایید نشد";
            }
            return(RedirectToAction("Panel"));
        }