private void btnSua_Click(object sender, EventArgs e) { kt = false; openControl(); btnThem.Enabled = false; btnXoa.Enabled = false; ENTITY.LoaiPhong lp = new ENTITY.LoaiPhong(txtMaPhong.Text.Trim(), txtTenLP.Text.Trim(), txtTrangBi.Text.Trim()); DAL.LoaiPhong_Controler l = new DAL.LoaiPhong_Controler(); l.EditLoaiPhong(lp); showLsvLoaiPhong(); }
private void btnLuu_Click(object sender, EventArgs e) { lockControl(); ENTITY.LoaiPhong lp = new ENTITY.LoaiPhong(txtMaPhong.Text.Trim(), txtTenLP.Text.Trim(), txtTrangBi.Text.Trim()); DAL.LoaiPhong_Controler l = new DAL.LoaiPhong_Controler(); if (kt == true) { l.insertLoaiPhong(lp); } showLsvLoaiPhong(); resetControl(); }