public List<DTO.DTOKIEUPHONG> TimkiemKIEUPHONG(string Keyword) { List<DTO.DTOKIEUPHONG> list = new List<DTO.DTOKIEUPHONG>(); DataTable dt = kieuphong.TimkiemKIEUPHONG(Keyword); foreach(DataRow row in dt.Rows) { DTO.DTOKIEUPHONG e =new DTO.DTOKIEUPHONG(); e.MAKP=Int32.Parse(row["MAKP"].ToString()); e.TENKP=row["TENKP"].ToString(); list.Add(e); } return list; }
public List<DTO.DTOKIEUPHONG> LayTheoMaKIEUPHONG(int MAKP) { List<DTO.DTOKIEUPHONG> list = new List<DTO.DTOKIEUPHONG>(); DataTable dt = kieuphong.LayTheoMaKIEUPHONG(MAKP); foreach(DataRow row in dt.Rows) { DTO.DTOKIEUPHONG e =new DTO.DTOKIEUPHONG(); e.MAKP=Int32.Parse(row["MAKP"].ToString()); e.TENKP=row["TENKP"].ToString(); list.Add(e); } return list; }