public eTheLoai GetTheLoaiByID(int id) { eTheLoai tam = new eTheLoai(); TheLoai item = tldal.Find(id); if (item != null) { tam.id_TheLoai = item.id_TheLoai; tam.tenTheLoai = item.tenTheLoai; tam.thoiGianThue = item.thoiGianThue; tam.giaThue = item.giaThue; return(tam); } return(null); }
public eTheLoai FindDVDById(int id) { TheLoai t = tldal.Find(id); eTheLoai e = new eTheLoai(); e.id_TheLoai = t.id_TheLoai; e.tenTheLoai = t.tenTheLoai; e.giaThue = t.giaThue; e.thoiGianThue = t.thoiGianThue; return(e); }