public ActionResult ContractorProfile()
        {
            var states = samedayservicez.Utils.Extensions.GetStatesList();

            var model = new Models.ContractorRegistrationForm();

            model.States = GetSelectListItems(states);


            ViewBag.Message = "Your ContractorProfile page.";


            return(View(model));
        }
        public ActionResult ContractorProfileConfirm()
        {
            ViewBag.Message = "Your ContractorProfileConfirm page.";

            var model = Session["ContractorSignupModel"] as Models.ContractorRegistrationForm;

            if (model == null)
            {
                var states = samedayservicez.Utils.Extensions.GetStatesList();

                model = new Models.ContractorRegistrationForm();

                model.States = GetSelectListItems(states);
            }

            // Display Done.html page that shows Name and selected state.
            return(View(model));
        }
        public ActionResult ContractorProfile(Models.ContractorRegistrationForm model)
        {
            var states = samedayservicez.Utils.Extensions.GetStatesList();

            model.States = GetSelectListItems(states);

            if (ModelState.IsValid)
            {
                Session["ContractorSignupModel"] = model;
                model.Password        = Encrypt(model.Password);
                model.ConfirmPassword = Encrypt(model.ConfirmPassword);

                CreateContractorProfile(model);

                return(RedirectToAction("ContractorProfileConfirm"));
            }

            return(View("ContractorProfile", model));
        }