public List<DTO.DTOPHONG> TimkiemPHONG(string Keyword) { List<DTO.DTOPHONG> list = new List<DTO.DTOPHONG>(); DataTable dt = phong.TimkiemPHONG(Keyword); foreach(DataRow row in dt.Rows) { DTO.DTOPHONG e =new DTO.DTOPHONG(); e.MAPHONG=Int32.Parse(row["MAPHONG"].ToString()); e.MAKP=Int32.Parse(row["MAKP"].ToString()); e.MATT=Int32.Parse(row["MATT"].ToString()); e.MALP=Int32.Parse(row["MALP"].ToString()); e.GHICHU=row["GHICHU"].ToString(); list.Add(e); } return list; }
public List<DTO.DTOPHONG> LayTheoMaPHONG(int MAPHONG) { List<DTO.DTOPHONG> list = new List<DTO.DTOPHONG>(); DataTable dt = phong.LayTheoMaPHONG(MAPHONG); foreach(DataRow row in dt.Rows) { DTO.DTOPHONG e =new DTO.DTOPHONG(); e.MAPHONG=Int32.Parse(row["MAPHONG"].ToString()); e.MAKP=Int32.Parse(row["MAKP"].ToString()); e.MATT=Int32.Parse(row["MATT"].ToString()); e.MALP=Int32.Parse(row["MALP"].ToString()); e.GHICHU=row["GHICHU"].ToString(); list.Add(e); } return list; }