Example #1
0
        public ActionResult SignUp(DoctorSign doctorSign)
        {
            try
            {
                IBL bl = new BlClass();
                Dictionary <string, string> errorMessege = bl.SignValidation(doctorSign);
                if (errorMessege.Count == 0)
                {
                    bl.SignUp(doctorSign);
                    ViewBag.TitlePopUp = "עבר בהצלחה";
                    ViewBag.Message    = "ההרשמה עברה בהצלחה, אישור נוסף תמצא בתיבת המייל האישית שלך.";
                    return(View("~/Views/Home/Index.cshtml"));
                }

                foreach (var item in errorMessege)
                {
                    ModelState.AddModelError(item.Key, item.Value);
                }
                return(View("LogIn"));
            }
            catch (System.Exception ex)
            {
                ViewBag.TitlePopUp = "שגיאה";
                ViewBag.Message    = ex.Message;
                return(View("~/Views/Home/Index.cshtml"));
            }
        }