コード例 #1
0
        public ActionResult RegisterUser()
        {
            var flag = false;

            try
            {
                var model = new UserInfoModel()
                {
                    Account           = Normal.ListStr(Request["Account"]),
                    Password          = Normal.CheckPoint(PwdUtil.MD5Encrypt(Request["Password"])),
                    Email             = Normal.ListStr(Request["Email"]),
                    Name              = Normal.ListStr(Request["Name"]),
                    Sex               = Normal.ListStr(Request["Sex"]),
                    BirthDay          = Normal.ListStr(Request["BirthDay"]),
                    HomeTown          = Normal.ListStr(Request["HomeTown"]),
                    Marriage          = Normal.ListStr(Request["Marriage"]),
                    TheLatter         = Normal.ListStr(Request["TheLatter"]),
                    Position          = Normal.ListStr(Request["Position"]),
                    Company           = Normal.ListStr(Request["Company"]),
                    WorkingConditions = Normal.ParseInt(Request["WorkingConditions"]),
                    InterestIn        = Normal.ListStr(Request["InterestIn"]),
                    QQ = Normal.ListStr(Request["QQ"]),
                    IntroduceMyself = Normal.ListStr(Request["IntroduceMyself"])
                };
                var personService = new PersonService();
                flag = personService.AddUserInfo(model);
                return(flag ? Content("修改成功!") : Content("修改失败!"));
            }
            catch (Exception)
            {
                return(Content("修改失败!"));
            }
        }