Example #1
0
        protected void Unnamed3_Click(object sender, EventArgs e)
        {
            adodatalayer ad1    = new adodatalayer();
            int          idno   = Convert.ToInt32(TextBox1.Text);
            var          update = ad1.DeleteStudent(idno);

            GridView1.DataSource = update;
            GridView1.Dispose();
        }
Example #2
0
        protected void Button1_Click(Object sender, EventArgs e)
        {
            adodatalayer ad1           = new adodatalayer();
            int          idno          = Convert.ToInt32(TextBox1.Text);
            var          singlestudent = ad1.GetaStudent(idno);

            GridView1.DataSource = singlestudent;
            GridView1.DataBind();
        }
Example #3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            adodatalayer ad1    = new adodatalayer();
            int          idno   = Convert.ToInt32(TextBox1.Text);
            string       name   = (TextBox2.Text);
            string       course = (TextBox3.Text);
            string       date   = (TextBox4.Text);
            var          insert = ad1.InsertData(idno, name, course, date);

            GridView1.DataSource = insert;
            GridView1.Dispose();
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                adodatalayer al     = new adodatalayer();
                var          stlist = al.Getallrecords();
                GridView1.DataSource = stlist;
                GridView1.DataBind();

                /*adodatalayer a2 = new adodatalayer();
                 * var stlist1 = a2.Insertrecords();
                 * GridView1.DataSource = stlist1;
                 * GridView1.Dispose()*/
            }
        }