Ejemplo n.º 1
0
 protected void gvDanhSach_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "ChonLSP")
     {
         GiaoDien(true);
         LoaiSanPhamDTO loaiSanPham = LoaiSanPhamBUS.LayLoaiSP(e.CommandArgument.ToString());
         txtMaLoaiSP.Text  = loaiSanPham.MaLoaiSP;
         txtTenLoaiSP.Text = loaiSanPham.TenLoaiSP;
     }
     if (e.CommandName == "XoaLSP")
     {
         string malsp = e.CommandArgument.ToString();
         if (LoaiSanPhamBUS.XoaLoaiSP(malsp) > 0)
         {
             Response.Write("<script>alert('Xoá thành công');</script>");
             LoadDS();
         }
     }
 }