Ejemplo n.º 1
0
        protected void Commit_Click(object sender, EventArgs e)
        {
            ApplyManage am = new ApplyManage();

            if (!am.isRepeat(applicationID, user))
            {
                //添加一个申请记录
                string DefaultStr = @"ctl00$MainContent$";
                string message = Request.Form[DefaultStr + "Info"];
                string detail = Request.Form[DefaultStr + "detailposition"];

                if (am.AddApplication(applicationID, user, message,detail))
                {
                    //添加成功
                    this.ErrorMessage.Text = string.Empty;
                    if (!UserManage.isFullProfile(user))
                    {
                        this.SuccessMessage.Text = @"申请成功,请尽快完善个人详细信息";
                    }
                    else
                        this.SuccessMessage.Text = @"申请成功";
                }
                else
                {
                    //添加失败
                    this.SuccessMessage.Text = string.Empty;
                    this.ErrorMessage.Text = @"申请失败";
                }
            }
            else
            {   //若重复,则什么都不做
                this.SuccessMessage.Text = string.Empty;
                this.ErrorMessage.Text = @"请勿重复申请,并关闭此网页";
                this.title.Visible = false;
                this.Info.Visible = false;
                this.button.Visible = false;
                this.tip.Visible = false;
                this.detailposition.Visible = false;
                this.Label1.Visible = false;
            }
        }
Ejemplo n.º 2
0
        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 = @"后台业务出现错误,请联系网站维护人员";
            }
        }