public ThueSach TraSach(int makhachhang, int masach) { if (GetSachById(masach) != null) { KhachHangService khachHangService = new KhachHangService(); if (khachHangService.GetKhachHangById(makhachhang) != null) { ThueSach thueSach = GetThueSachKhach(makhachhang, masach); if (thueSach != null) { thueSach.TinhTrang = "0"; Sach sach = GetSachById(masach); sach.SoLuong = (Convert.ToInt32(sach.SoLuong) + 1).ToString(); qLTV.SaveChanges(); return(thueSach); } ; return(null); } return(null); } return(null); }