以下是引用片段:
string ycj = "0";
if (this.Textbox9.Text.Trim() != "") ycj = this.Textbox9.Text.Trim();
string hydj = "普通会员"; if (Convert.ToDecimal(ycj) >= 500) hydj = "VIP会员";
if (Session["UserID"] == null) { //添加注册的会员信息到数据库中 DataBase.ExecSql("insert into hyxx(hydlm,mm,xb,xm,dz,dh,sr,Email,ycj,ljycj,sfzh,hydj) " + " 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 + "'," + ycj + "," + ycj + ",'" + Textbox10.Text.Trim() + "', '" + hydj + "')");
} 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() + "', hydj = '" + hydj + "', " + " 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() + "', hydj = '" + hydj + "', " + " dh='" + this.TextBox4.Text.Trim() + "',sr='" + this.Textbox7.Text.Trim() + "'," + " email='" + this.Textbox8.Text + "' where hydlm= '" + Session["UserID"].ToString() + "'");
} }
|