Пример #1
0
        protected void GVDSKhoa_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataRow rowSelected = ((SqldsKhoa.Select(DataSourceSelectArguments.Empty) as DataView).ToTable()).Rows[GVDSKhoa.SelectedIndex];

            //Gan noi dung den tung text box
            txtMaKhoa.Text  = rowSelected.ItemArray[0].ToString();
            txtTenKhoa.Text = rowSelected.ItemArray[1].ToString();
            ChonAnButton();
        }
Пример #2
0
 protected void btncapnhat_Click(object sender, EventArgs e)
 {
     if (btnthem.Visible == false && btnxoa.Visible == false)
     {
         SqldsKhoa.Insert();
     }
     else
     {
         SqldsKhoa.Update();
     }
     XoaAnButton();
     ResetNoiDung();
 }
Пример #3
0
 protected void btnxoa_Click(object sender, EventArgs e)
 {
     SqldsKhoa.Delete();
     ResetNoiDung();
     XoaAnButton();
 }