protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (string.IsNullOrEmpty(Request["TYPE"])) { return; } string icNum = Request["ICNUM"]; string icPass = Request["ICPASS"]; ICParam par = new ICParam(); par.ChangeICPass(icNum, icPass); } }
protected void btnOK_Click(object sender, EventArgs e) { try { if (this.txtPassword.Text == "1") { this.lblResult.ForeColor = Color.Red; this.lblResult.Text = "修改口令失败:口令不能为初始值!"; return; } ICParam parm = new ICParam(); parm.ChangeICPass(this.lblICNum.Text, this.txtPassword.Text); this.lblResult.ForeColor = Color.Red; this.lblResult.Text = "修改口令成功!"; } catch { this.lblResult.ForeColor = Color.Red; this.lblResult.Text = "修改口令失败:数据访问失败!"; } }