protected void Commit_Click(object sender, EventArgs e) { string DefaultStr = @"ctl00$MainContent$"; Dictionary<string, string> userInfo = new Dictionary<string,string>(); userInfo.Add("Name",Request.Form[DefaultStr+"Name"]); userInfo.Add("IdentityID", Request.Form[DefaultStr + "IdentityID"]); userInfo.Add("Phone", Request.Form[DefaultStr + "Phone"]); userInfo.Add("Gender", Request.Form[DefaultStr + "Gender"]); userInfo.Add("Email", Request.Form[DefaultStr + "Email"]); userInfo.Add("Province", Request.Form[DefaultStr + "Province"]); userInfo.Add("University", Request.Form[DefaultStr + "University"]); userInfo.Add("Major", Request.Form[DefaultStr + "Major"]); userInfo.Add("English", Request.Form[DefaultStr + "English"]); userInfo.Add("Skill", Request.Form[DefaultStr + "Skill"]); UserManage um = new UserManage(); Dictionary<string, string> NULL = new Dictionary<string, string>(); if(um.SavaUserInfo(userInfo,user)) { //保存成功 //先清空显示错误数据 ErrorMessage.Text = string.Empty; SuccessMessage.Text = @"信息保存/修改成功"; string applicationID = string.Format(@"0"); ApplyManage am = new ApplyManage(); if (!am.isRepeat(applicationID, user)) { this.ErrorMessage.Text = @"<a href = '/WebForm/participateApply.aspx'>您尚未参加比赛申请,点击到参赛页面</a>"; } this._blindDataForForm(); } else { //业务逻辑错误,请联系技术人员 //先清空显示正确数据 SuccessMessage.Text = string.Empty; ErrorMessage.Text = @"后台业务出现错误,请联系网站维护人员"; } }
protected void Commit_Click(object sender, EventArgs e) { string DefaultStr = @""; Dictionary<string, string> userInfo = new Dictionary<string, string>(); userInfo.Add("Name", Request.Form[DefaultStr + "Name"]); userInfo.Add("IdentityID", Request.Form[DefaultStr + "IdentityID"]); userInfo.Add("Phone", Request.Form[DefaultStr + "Phone"]); userInfo.Add("Gender", Request.Form[DefaultStr + "Gender"]); userInfo.Add("Email", Request.Form[DefaultStr + "Email"]); userInfo.Add("Province", Request.Form[DefaultStr + "Province"]); userInfo.Add("University", Request.Form[DefaultStr + "University"]); userInfo.Add("Major", Request.Form[DefaultStr + "Major"]); userInfo.Add("English", Request.Form[DefaultStr + "English"]); userInfo.Add("Skill", Request.Form[DefaultStr + "Skill"]); //以上为基本信息 Dictionary<string, string> userAddition = new Dictionary<string, string>(); userAddition.Add("universityone", Request.Form[DefaultStr + "universityone"]); userAddition.Add("degreeone", Request.Form[DefaultStr + "degreeone"]); userAddition.Add("lodone", Request.Form[DefaultStr + "lodone"]); userAddition.Add("academicdurationone", Request.Form[DefaultStr + "academicdurationone"]); userAddition.Add("majorone", Request.Form[DefaultStr + "majorone"]); userAddition.Add("minorone", Request.Form[DefaultStr + "minorone"]); userAddition.Add("gpaone", Request.Form[DefaultStr + "gpaone"]); userAddition.Add("universitytwo", Request.Form[DefaultStr + "universitytwo"]); userAddition.Add("degreetwo", Request.Form[DefaultStr + "degreetwo"]); userAddition.Add("lodtwo", Request.Form[DefaultStr + "lodtwo"]); userAddition.Add("academicdurationtwo", Request.Form[DefaultStr + "academicdurationtwo"]); userAddition.Add("majortwo", Request.Form[DefaultStr + "majortwo"]); userAddition.Add("minortwo", Request.Form[DefaultStr + "minortwo"]); userAddition.Add("gpatwo", Request.Form[DefaultStr + "gpatwo"]); userAddition.Add("universitythree", Request.Form[DefaultStr + "universitythree"]); userAddition.Add("degreethree", Request.Form[DefaultStr + "degreethree"]); userAddition.Add("lodthree", Request.Form[DefaultStr + "lodthree"]); userAddition.Add("academicdurationthree", Request.Form[DefaultStr + "academicdurationthree"]); userAddition.Add("majorthree", Request.Form[DefaultStr + "majorthree"]); userAddition.Add("minorthree", Request.Form[DefaultStr + "minorthree"]); userAddition.Add("gpathree", Request.Form[DefaultStr + "gpathree"]); userAddition.Add("projectname", Request.Form[DefaultStr + "projectname"]); userAddition.Add("projectdescription", Request.Form[DefaultStr + "projectdescription"]); userAddition.Add("projectduration", Request.Form[DefaultStr + "projectduration"]); userAddition.Add("papername", Request.Form[DefaultStr + "papername"]); userAddition.Add("journal", Request.Form[DefaultStr + "journal"]); userAddition.Add("advisor", Request.Form[DefaultStr + "advisor"]); userAddition.Add("workdescription", Request.Form[DefaultStr + "workdescription"]); userAddition.Add("raduration", Request.Form[DefaultStr + "raduration"]); userAddition.Add("jobtitle", Request.Form[DefaultStr + "jobtitle"]); userAddition.Add("company", Request.Form[DefaultStr + "company"]); userAddition.Add("responsibility", Request.Form[DefaultStr + "responsibility"]); userAddition.Add("weduration", Request.Form[DefaultStr + "weduration"]); userAddition.Add("eaname", Request.Form[DefaultStr + "eaname"]); userAddition.Add("eanameother", Request.Form[DefaultStr + "eanameother"]); userAddition.Add("eatitle", Request.Form[DefaultStr + "eatitle"]); userAddition.Add("awardnameone", Request.Form[DefaultStr + "awardnameone"]); userAddition.Add("awardlevelone", Request.Form[DefaultStr + "awardlevelone"]); userAddition.Add("awarddateone", Request.Form[DefaultStr + "awarddateone"]); userAddition.Add("awardnametwo", Request.Form[DefaultStr + "awardnametwo"]); userAddition.Add("awardleveltwo", Request.Form[DefaultStr + "awardleveltwo"]); userAddition.Add("awarddatetwo", Request.Form[DefaultStr + "awarddatetwo"]); userAddition.Add("awardnamethree", Request.Form[DefaultStr + "awardnamethree"]); userAddition.Add("awardlevelthree", Request.Form[DefaultStr + "awardlevelthree"]); userAddition.Add("awarddatethree", Request.Form[DefaultStr + "awarddatethree"]); userAddition.Add("languagename", Request.Form[DefaultStr + "languagename"]); userAddition.Add("languageproficiency",Request.Form[DefaultStr + "languageproficiency"]); userAddition.Add("testname", Request.Form[DefaultStr + "testname"]); userAddition.Add("testnameother", Request.Form[DefaultStr + "testnameother"]); userAddition.Add("testscore", Request.Form[DefaultStr + "testscore"]); userAddition.Add("codingablity", Request.Form[DefaultStr + "codingablity"]); UserManage um = new UserManage(); if (um.SavaUserInfo(userInfo,userAddition, user)) { //保存成功 //先清空显示错误数据 ErrorMessage.Text = string.Empty; SuccessMessage.Text = @"信息保存/修改成功"; string applicationID = string.Format(@"0"); ApplyManage am = new ApplyManage(); this._blindDataForForm(); } else { //业务逻辑错误,请联系技术人员 //先清空显示正确数据 SuccessMessage.Text = string.Empty; ErrorMessage.Text = @"后台业务出现错误,请联系网站维护人员"; } }