public HopDongSVPhong Layhopdongtheoma(string MaHD) { DataTable dt = HDDAL.LayHDTheoMa(MaHD); HopDongSVPhong hd = new HopDongSVPhong(); hd.Mahopdong = dt.Rows[0][0].ToString(); hd.Masinhvien = dt.Rows[0][1].ToString(); hd.Maphong = dt.Rows[0][2].ToString(); hd.Ngayvao = dt.Rows[0][3].ToString(); hd.Ngayra = dt.Rows[0][4].ToString(); hd.Ngaylap = dt.Rows[0][5].ToString(); hd.Manhanvien = dt.Rows[0][6].ToString(); hd.Ghichu = dt.Rows[0][7].ToString(); return hd; }
public void Xoahopdong(HopDongSVPhong hd) { strSQL = "Delete HDSinhVienPhong where MaHD='" + hd.Mahopdong + "'"; helper.ThucThiKN(strSQL); }
public void Suahopdong(HopDongSVPhong hd) { strSQL = "Update HDSinhVienPhong set MaSV='" + hd.Masinhvien + "',MaPhong='" + hd.Maphong + "',NgayVao='" + hd.Ngayvao + "',NgayRa='" + hd.Ngayra + "',NgayLap='" + hd.Ngaylap + "',MaNV='" + hd.Manhanvien + "',GhiChu=N'" + hd.Ghichu + "' where MaHD='" + hd.Mahopdong + "'"; helper.ThucThiKN(strSQL); }
public void Themhopdong(HopDongSVPhong hd) { strSQL = "Insert into HDSinhVienPhong values('" + hd.Mahopdong + "','" + hd.Masinhvien + "','" + hd.Maphong + "','" + hd.Ngayvao + "','" + hd.Ngayra + "','" + hd.Ngaylap + "','" + hd.Masinhvien + "',N'" + hd.Ghichu + "' )"; helper.ThucThiKN(strSQL); }
public void XoaHopDong(string MaHD) { HD = new HopDongSVPhong(MaHD, "", "","", "", "", "",""); HDDAL.Xoahopdong(HD); }
public void SuaHopDong(string mahopdong, string masinhvien,string maphong,string ngayvao, string ngayra, string ngaylap, string manhanvien,string ghichu) { HD = new HopDongSVPhong(mahopdong, masinhvien, maphong, ngayvao,ngayra, ngaylap,manhanvien,Chuanhoaxau(ghichu)); HDDAL.Suahopdong(HD); }