📄 addcustomer.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Addtype : System.Web.UI.Page
{
private string type=null;//客户类型编码
protected void Page_Load(object sender, EventArgs e)
{
type = Request.QueryString["type"];
if (type != null)
{
Type.Text = type;
Type.Enabled = false;
}
}
protected void Add_Click(object sender, EventArgs e)
{
if (ccode.Text.Trim().Equals(""))
{
Response.Write("<script>alert('" + "请填写资料!" + "');</script>");
}
else
{
String cmdtext = "insert into customer values("
+ "'" + ccode.Text.Trim() + "',"
+ "'" + Type.Text.Trim() + "',"
+ "'" + cname.Text.Trim() + "',"
+ "'" + caddress.Text.Trim() + "',"
+ "'" + cmail.Text.Trim() + "',"
+ "'" + cphone.Text.Trim() + "',"
+ "'" + ctel.Text.Trim() + "',"
+ "'" + cbirth.Text.Trim() + "',"
+ "'" + chobby.Text.Trim() + "',"
+ "'" + cnote.Text.Trim() + "')";
Session["customercode"] = ccode.Text.Trim();
ccode.Text = "";
Type.Text = "";
cname.Text = "";
caddress.Text = "";
cmail.Text = "";
cphone.Text = "";
ctel.Text = "";
cbirth.Text = "";
chobby.Text = "";
cnote.Text = "";
Type.Enabled = true;
Response.Write("<script>alert('" + "添加操作尚未完成,请继续填写负责人信息!" + "');</script>");
Response.Redirect("Addrelation.aspx?customer=" + cmdtext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -