protected void Page_Load(object sender, EventArgs e) { //设置左边菜单 var mst = this.Master as Member_Manage_MasterPage; mst.SetMenuTitle("帐号管理", "密保问题管理"); //保存事件 Button1.Click += new EventHandler(Button1_Click); if (IsPostBack) { return; } var ud = Session["UserData"] as UserData; var bl = new DS_SafeQuestion_Br(); Com.DianShi.Model.Member.DS_SafeQuestion md = null; bool exists = bl.Exists(ud.Member.ID); if (exists) { md = bl.GetSingleByMemberID(ud.Member.ID); ViewState["question"] = md.Question1; } //处理动作 if (!string.IsNullOrEmpty(Request.QueryString["action"])) { string act = Request.QueryString["action"]; switch (act) { case "modify": string answer = Request.QueryString["a"]; if (md.Answer1 == answer) { Response.Write("true"); } else { Response.Write("false"); } Response.End(); break; } } else //没有任何动作时 { if (exists) { Common.MessageBox.ResponseScript(this, "window.vlsucc()"); } } }
partial void DeleteDS_SafeQuestion(DS_SafeQuestion instance);
partial void UpdateDS_SafeQuestion(DS_SafeQuestion instance);
partial void InsertDS_SafeQuestion(DS_SafeQuestion instance);