以下是引用片段:
其主要代码实现如下: protected void Button2_Click(object sender, EventArgs e) { //添加 或修改客户信息 if (Request.QueryString["ID"] == null) { //判断信息是否正确 if (this.txtID.Text == "") { this.Terr.>"; return; } DataBase.ExecSql("insert into 客户信息(帐号,客户名称,地址,电话,联系人,联系电话,备注,客户来源,密码) values('" + this.txtID.Text + "','" + this.txtXm.Text + "','" + TextBox5.Text + "','" + TextBox2.Text + "','" + TextBox1.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','管理员维护', 'ninhao')"); } else { DataBase.ExecSql("update 客户信息 set 客户名称='" + this.txtXm.Text + "',地址='"+ TextBox5.Text +"',电话='"+ TextBox2.Text +"',联系人='"+ TextBox1.Text +"',联系电话='"+ TextBox3.Text +"',备注='"+ TextBox4.Text +"' where 帐号='" + this.txtID.Text + "'"); } Response."); } protected void txtXm_TextChanged(object sender, EventArgs e) { }
|