以下是引用片段: if (Session["UserID"] == null) { //添加注册的会员信息到数据库中 DataBase.ExecSql("insert into hyxx(hydlm,mm,xb,xm,dz,dh,sr,Email,sfzh) " + " values('" + this.TextBox1.Text.Trim() + "','" + this.Textbox5.Text.Trim() + "','" + this.txtxb.SelectedValue + "', " + " '" + this.Textbox2.Text.Trim() + "','" + this.TextBox3.Text.Trim() + "'," + " '" + this.TextBox4.Text.Trim() + "','" + this.Textbox7.Text.Trim() + "'," + " '" + this.Textbox8.Text + "','" + Textbox10.Text.Trim() + "')"); } else { //更新当前的会员信息 if (this.Textbox5.Text.Trim() != "********") { DataBase.ExecSql("update hyxx set mm='" + this.Textbox5.Text.Trim() + "'," + " xm='" + this.Textbox2.Text.Trim() + "',dz='" + this.TextBox3.Text.Trim() + "', " + " dh='" + this.TextBox4.Text.Trim() + "',sr='" + this.Textbox7.Text.Trim() + "'," + " email='" + this.Textbox8.Text + "' where hydlm= '" + Session["UserID"].ToString() + "'"); } else { DataBase.ExecSql("update hyxx set " + " xm='" + this.Textbox2.Text.Trim() + "',dz='" + this.TextBox3.Text.Trim() + "', " + " dh='" + this.TextBox4.Text.Trim() + "',sr='" + this.Textbox7.Text.Trim() + "'," + " email='" + this.Textbox8.Text + "' where hydlm= '" + Session["UserID"].ToString() + "'"); } } Session["UserName"] = this.Textbox2.Text.Trim(); Session["UserID"] = this.TextBox1.Text.Trim();
|