示例#1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            TraineeDataLayer t = new TraineeDataLayer();
            int    tid         = int.Parse(TextBox1.Text);
            string tname       = TextBox2.Text;

            t.update(tid, tname);
        }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         TraineeDataLayer t = new TraineeDataLayer();
         var list           = t.getallrecords();
         GridView1.DataSource = list;
         GridView1.DataBind();
     }
 }
示例#3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            TraineeDataLayer t  = new TraineeDataLayer();
            Trainee1         t1 = new Trainee1 {
                tid        = int.Parse(TextBox1.Text),
                tname      = TextBox2.Text,
                location   = TextBox3.Text,
                techdomain = TextBox4.Text,
                startdate  = DateTime.Parse(TextBox5.Text)
            };

            t.DInsert(t1);
        }