Esempio n. 1
0
        public ActionResult Edit()
        {
            Employer         employer         = GetEmployerDetailsByAccount();
            EmployerRegister employerRegister = employer.GetEmployerRegister();

            CreateDropDownList();   //各个DropDownList生成
            //设置各个ddl个默认选项
            ViewBag.CompanyNature   = new SelectList(ViewBag.CompanyNature, "Value", "Text", employer.CompanyNature);
            ViewBag.CompanyBusiness = new SelectList(ViewBag.CompanyBusiness, "Value", "Text", employer.CompanyBusiness);
            ViewBag.CompanySize     = new SelectList(ViewBag.CompanySize, "Value", "Text", employer.CompanySize);
            ViewBag.CityClass       = new SelectList(ViewBag.CityClass, "Value", "Text", employer.CityClass);
            ViewBag.IsTop500        = new SelectList(ViewBag.IsTop500, "Value", "Text", employer.IsTop500);
            //性别radio选择值
            ViewBag.ContactPersonSex = employerRegister.ContactPersonSex;
            //单位所在地select选择值
            ViewBag.CompanyAreaProvince = employerRegister.CompanyAreaProvince;
            ViewBag.CompanyAreaCity     = employerRegister.CompanyAreaCity;
            //给密码和确认密码解密再显示
            employerRegister.EmployerPwd        = Common.Text.DeCrypt(employerRegister.EmployerPwd);
            employerRegister.ConfirmEmployerPwd = employerRegister.EmployerPwd;
            if (employerRegister == null)
            {
                return(HttpNotFound());
            }
            return(View(employerRegister));
        }