using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string connectionString = "Data Source=zf;Initial Catalog=SQL_Data;Integrated Security=True";
        DataClassesDataContext db = new DataClassesDataContext(connectionString);
        仓库信息 myck = new 仓库信息();
        myck.仓库号 = TextBox1.Text;
        myck.城市 = TextBox2.Text;
        myck.面积 = Convert.ToInt32(TextBox3.Text);
        myck.创建时间 = Convert.ToDateTime(TextBox4.Text);
        db.仓库信息.InsertOnSubmit(myck);
        db.SubmitChanges();
        Response.Write("<script language=javascript>alert('成功插入新记录信息！')</script>");
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        TextBox1.Text = "";
        TextBox2.Text = "";
        TextBox3.Text = "";
        TextBox4.Text = "";
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        Response.Redirect("Linqshow.aspx");
    }
}
