private void BtnLUU_Click(object sender, EventArgs e)
 {
     if (stt == 1)
     {
         if (txtTenTheLoai.Text.Trim() == "")
         {
             XtraMessageBox.Show("Bạn chưa nhập thể loại sách", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             Theloai_DTO TL = new Theloai_DTO();
             TL.MaLoai  = txtMaLoai.Text;
             TL.TenLoai = txtTenTheLoai.Text;
             if (TheLoai_BUS.TimTL_TheoMa(txtMaLoai.Text.Trim()) != null)
             {
                 XtraMessageBox.Show("Mã loại không được trùng ", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
             else if (TheLoai_BUS.ThemTL(TL))
             {
                 frmTheLoai_Load(sender, e);
                 XtraMessageBox.Show("Bạn đã thêm thành công " + txtTenTheLoai.Text, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
     }
     else if (stt == 2)
     {
         if (txtMaLoai.Text.Trim() == "")
         {
             XtraMessageBox.Show("Bạn chưa chọn dòng cần sửa", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else if (txtTenTheLoai.Text.Trim() == "")
         {
             XtraMessageBox.Show("Thể loại sách không được rỗng", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             Theloai_DTO TL = new Theloai_DTO();
             TL.MaLoai  = txtMaLoai.Text;
             TL.TenLoai = txtTenTheLoai.Text;
             if (TheLoai_BUS.TimTL_TheoMa(txtMaLoai.Text.Trim()) == null)
             {
                 XtraMessageBox.Show("Mã loại không được sửa ", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
             else
             if (TheLoai_BUS.SuaTL(TL))
             {
                 frmTheLoai_Load(sender, e);
                 XtraMessageBox.Show("Bạn đã sửa thành công " + txtTenTheLoai.Text, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             else
             {
                 XtraMessageBox.Show("Không sửa được", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
 }