Ejemplo n.º 1
0
        public ActionResult Create(UserInfo userInfo)
        {
            Stopwatch sw = Stopwatch.StartNew();



            //bool ret;
            //bool email;
            string         errorMsg;
            RegisterFacade registerUser = new RegisterFacade();

            if (ModelState.IsValid)
            {
                //validate if email exists
                /* email = EmailExist(userInfo)*/;
                errorMsg = registerUser.UserRegistration(userInfo);

                ViewBag.Message = errorMsg;


                //sending email

                //if (email == true)
                //{
                //    //user registration
                //    ret = RegisterAccount(userInfo);
                //    SendConfirmationEmail(userInfo);
                //    return RedirectToAction("Index");
                //}
                //else
                //{
                //    ViewBag.Message = "Email Already Exists in the System";
                //}

                //db.UserInfoes.Add(userInfo);
                //db.SaveChanges();
            }

            sw.Stop();
            ViewBag.ExecutionTime = sw.Elapsed.Milliseconds;
            // Console.WriteLine("Time taken: {0}ms", sw.Elapsed.TotalMilliseconds);
            return(View(userInfo));
        }