public List<DTO.DTOBANGGIA> TimkiemBANGGIA(string Keyword) { List<DTO.DTOBANGGIA> list = new List<DTO.DTOBANGGIA>(); DataTable dt = banggia.TimkiemBANGGIA(Keyword); foreach(DataRow row in dt.Rows) { DTO.DTOBANGGIA e =new DTO.DTOBANGGIA(); e.MALP=Int32.Parse(row["MALP"].ToString()); e.MAKP=Int32.Parse(row["MAKP"].ToString()); e.GIA=Int32.Parse(row["GIA"].ToString()); list.Add(e); } return list; }
public List<DTO.DTOBANGGIA> LayTheoMaBANGGIA(int MALP,int MAKP) { List<DTO.DTOBANGGIA> list = new List<DTO.DTOBANGGIA>(); DataTable dt = banggia.LayTheoMaBANGGIA(MALP,MAKP); foreach(DataRow row in dt.Rows) { DTO.DTOBANGGIA e =new DTO.DTOBANGGIA(); e.MALP=Int32.Parse(row["MALP"].ToString()); e.MAKP=Int32.Parse(row["MAKP"].ToString()); e.GIA=Int32.Parse(row["GIA"].ToString()); list.Add(e); } return list; }
DTO.DTOBANGGIA LayThongTin() { DTO.DTOBANGGIA _bg = new DTO.DTOBANGGIA(); _bg.MALP = (int)grdvGia.GetRowCellValue(grdvGia.FocusedRowHandle, colMaLP); _bg.MAKP = (int)grdvGia.GetRowCellValue(grdvGia.FocusedRowHandle, colMaKP); _bg.GIA = int.Parse(txtGiaPhong.Text); return _bg; }