Esempio n. 1
0
 protected void btnXoa_Click(object sender, EventArgs e)
 {
     try
     {
         Xoa_Sach(txtMa.Text);
         GridInfor.DataSource = Sach_DS();
         GridInfor.DataBind();
         ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Xóa thành công!');", true);
     } catch
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Xóa lỗi!');", true);
     }
 }
Esempio n. 2
0
 protected void btnThem_Click(object sender, EventArgs e)
 {
     try
     {
         String anh = upAnh.FileName;
         Them_Sach(txtMa.Text, txtTen.Text, anh, txtTacGia.Text, txtNXB.Text, dropLoai.SelectedValue);
         GridInfor.DataSource = Sach_DS();
         GridInfor.DataBind();
         ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Nhập vào thành công!');", true);
     } catch
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Nhập vào lỗi!');", true);
     }
 }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     GridInfor.DataSource = Sach_DS();
     GridInfor.DataBind();
     UpdateList();
 }