public bool themCanHo(String maCanHo, String tenCanHo, String loaiCanHo, PictureBox hinhAnh, float giaCanHo, String trangThai, String ghiChu, String maKhu, String maHoGD) { byte[] arrayPictureCanHo = File.ReadAllBytes(hinhAnh.ImageLocation); SqlParameter prMaCanHo = new SqlParameter("@MACANHO", SqlDbType.NVarChar, 10); prMaCanHo.Value = maCanHo; SqlParameter prtenCanHo = new SqlParameter("@TENCANHO", SqlDbType.NVarChar, 20); prtenCanHo.Value = tenCanHo; SqlParameter prLoaiCanHo = new SqlParameter("@LOAICANHO", SqlDbType.NVarChar, 10); prLoaiCanHo.Value = loaiCanHo; SqlParameter prHinhAnh = new SqlParameter("@HINHANH", SqlDbType.Image); prHinhAnh.Value = arrayPictureCanHo; SqlParameter prGiaCanHo = new SqlParameter("@GIACANHO", SqlDbType.Float); prGiaCanHo.Value = giaCanHo; SqlParameter prTrangThai = new SqlParameter("@TRANGTHAI", SqlDbType.NVarChar, 30); prTrangThai.Value = trangThai; SqlParameter prGhiChu = new SqlParameter("@GHICHU", SqlDbType.NVarChar, 50); prGhiChu.Value = ghiChu; SqlParameter prMaKhu = new SqlParameter("@MAKHU", SqlDbType.NVarChar, 10); prMaKhu.Value = maKhu; SqlParameter prMaHoGD = new SqlParameter("@MAHOGD", SqlDbType.NVarChar, 10); prMaHoGD.Value = maHoGD; SqlParameter[] pr = { prMaCanHo, prtenCanHo, prLoaiCanHo, prHinhAnh, prGiaCanHo, prTrangThai, prGhiChu, prMaKhu, prMaHoGD }; return(xuLyDuLieu.thucThiThuTuc("psThemCanHo", pr)); }
public bool themThanhVien(String maTV, String hoTen, String gioiTinh, String soCMND, DateTime ngaySinh, String soDienThoai, String email, PictureBox hinhAnh, String maHoGD) { byte[] arrayPictureThanhVien = File.ReadAllBytes(hinhAnh.ImageLocation); SqlParameter prMaTV = new SqlParameter("@MATHANHVIEN", SqlDbType.NVarChar, 10); prMaTV.Value = maTV; SqlParameter prHoTen = new SqlParameter("@HOTENTHANHVIEN", SqlDbType.NVarChar, 50); prHoTen.Value = hoTen; SqlParameter prGioiTinh = new SqlParameter("@GIOITINHTV", SqlDbType.NVarChar, 10); prGioiTinh.Value = gioiTinh; SqlParameter prSoCMND = new SqlParameter("@SOCMND", SqlDbType.NVarChar, 20); prSoCMND.Value = soCMND; SqlParameter prNgaySinh = new SqlParameter("@NGAYSINH", SqlDbType.DateTime); prNgaySinh.Value = ngaySinh; SqlParameter prSoDT = new SqlParameter("@SDT", SqlDbType.NVarChar, 10); prSoDT.Value = soDienThoai; SqlParameter prEmail = new SqlParameter("@EMAIL", SqlDbType.NVarChar, 20); prEmail.Value = email; SqlParameter prHinhAnh = new SqlParameter("@HINHANH", SqlDbType.Image); prHinhAnh.Value = arrayPictureThanhVien; SqlParameter prMaHoGD = new SqlParameter("@MAHOGD", SqlDbType.NVarChar, 10); prMaHoGD.Value = maHoGD; SqlParameter[] pr = { prMaTV, prHoTen, prGioiTinh, prSoCMND, prNgaySinh, prSoDT, prEmail, prHinhAnh, prMaHoGD }; return(xuLyDuLieu.thucThiThuTuc("psThemThanhVienHoGD", pr)); }
public bool themDichVu(String madichvu, String tendichvu, String gia) { SqlParameter prmadichvu = new SqlParameter("@MADICHVU", SqlDbType.NVarChar, 10); prmadichvu.Value = madichvu; SqlParameter prtendichvu = new SqlParameter("@TENDICHVU", SqlDbType.NVarChar, 30); prtendichvu.Value = tendichvu; SqlParameter prgia = new SqlParameter("@GIADICHVU", SqlDbType.Float); prgia.Value = gia; SqlParameter[] pr2 = { prmadichvu, prtendichvu, prgia }; return(xuLyDuLieu.thucThiThuTuc("psThemDichVu", pr2)); }
public bool themHoGiaDinh(String maHoGD, String tenChuHo, String soCMND, int soLuongTV) { SqlParameter prMaHoGD = new SqlParameter("@MAHOGD", SqlDbType.NVarChar, 10); prMaHoGD.Value = maHoGD; SqlParameter prTenChuHo = new SqlParameter("@TENCHUHO", SqlDbType.NVarChar, 30); prTenChuHo.Value = tenChuHo; SqlParameter prSoCMND = new SqlParameter("@SOCMND", SqlDbType.NVarChar, 18); prSoCMND.Value = soCMND; SqlParameter prSoLuongTV = new SqlParameter("@SOLUONGTV", SqlDbType.Int); prSoLuongTV.Value = soLuongTV; SqlParameter[] pr = { prMaHoGD, prTenChuHo, prSoCMND, prSoLuongTV }; return(xuLyDuLieu.thucThiThuTuc("psThemHoGiaDinh", pr)); }
public bool themTaiKhoan(String maNhanVien, String tenDangNhap, String matKhau, String quyen) { SqlParameter prMaNhanVien = new SqlParameter("@MANHANVIEN", SqlDbType.NVarChar, 10); prMaNhanVien.Value = maNhanVien; SqlParameter prTenDangNhap = new SqlParameter("@TENDANGNHAP", SqlDbType.NVarChar, 30); prTenDangNhap.Value = tenDangNhap; SqlParameter prMatKhau = new SqlParameter("@MATKHAU", SqlDbType.NVarChar, 20); prMatKhau.Value = matKhau; SqlParameter prQuyen = new SqlParameter("@IDQUYEN", SqlDbType.NVarChar, 10); prQuyen.Value = quyen; SqlParameter[] pr = { prMaNhanVien, prTenDangNhap, prMatKhau, prQuyen }; return(xuLyDuLieu.thucThiThuTuc("psThemTaiKhoan", pr)); }
public bool themHopDong(String maHopDong, String tenHopDong, String loaiHopDong, String maCanHo, String maNhanVien, String mahoGiaDinh, float tongTien) { SqlParameter prMaHD = new SqlParameter("@MAHOPDONG", SqlDbType.NVarChar, 10); prMaHD.Value = maHopDong; SqlParameter prTenHopDong = new SqlParameter("@TENHOPDONG", SqlDbType.NVarChar, 50); prTenHopDong.Value = tenHopDong; SqlParameter prLoaiHopDong = new SqlParameter("@LOAIHOPDONG", SqlDbType.NVarChar, 10); prLoaiHopDong.Value = loaiHopDong; SqlParameter prMaCanHo = new SqlParameter("@MACANHO", SqlDbType.NVarChar, 10); prMaCanHo.Value = maCanHo; SqlParameter prMaNhanVien = new SqlParameter("@MANHANVIEN", SqlDbType.NVarChar, 10); prMaNhanVien.Value = maNhanVien; SqlParameter prMaHoGiaDinh = new SqlParameter("@MAHOGD", SqlDbType.NVarChar, 10); prMaHoGiaDinh.Value = mahoGiaDinh; SqlParameter prTongTien = new SqlParameter("@TONGTIEN", SqlDbType.Float); prTongTien.Value = tongTien; SqlParameter[] pr = { prMaHD, prTenHopDong, prLoaiHopDong, prMaCanHo, prMaNhanVien, prMaHoGiaDinh, prTongTien }; return(xuLyDuLieu.thucThiThuTuc("psThemMoiHopDong2", pr)); }
public bool themHoaDonDichVu(String mahoadondichvu, String tenHoaDon, String maNhanVien, String maHoGiaDinh, String maCanHo, String ngayIn, String tongTien, String ghiChu) { SqlParameter prmaHoaDonDichVu = new SqlParameter("@MAHOADONDV", SqlDbType.NVarChar, 10); prmaHoaDonDichVu.Value = mahoadondichvu; SqlParameter prtenHoaDon = new SqlParameter("@TENHOADON", SqlDbType.NVarChar, 30); prtenHoaDon.Value = tenHoaDon; SqlParameter prmaNhanVien = new SqlParameter("@MANHANVIEN", SqlDbType.NVarChar, 10); prmaNhanVien.Value = maNhanVien; SqlParameter prmaHoGiaDinh = new SqlParameter("@MAHOGD", SqlDbType.NVarChar, 10); prmaHoGiaDinh.Value = maHoGiaDinh; SqlParameter prmaCanHo = new SqlParameter("@MACANHO", SqlDbType.NVarChar, 10); prmaCanHo.Value = maCanHo; SqlParameter prngayIn = new SqlParameter("@NGAYIN", SqlDbType.DateTime); prngayIn.Value = ngayIn; SqlParameter prtongTien = new SqlParameter("@TONGTIEN", SqlDbType.Float); prtongTien.Value = tongTien; SqlParameter prghiChu = new SqlParameter("@GHICHU", SqlDbType.NVarChar, 50); prghiChu.Value = ghiChu; SqlParameter[] pr2 = { prmaHoaDonDichVu, prtenHoaDon, prmaNhanVien, prmaHoGiaDinh, prmaCanHo, prngayIn, prtongTien, prghiChu }; return(XuLyDuLieu.thucThiThuTuc("psThemHoaDonDichVu", pr2)); }
public bool themNhanVien(String maNhanVien, String hoTen, String gioiTinh, String diaChi, String SDT, DateTime ngaySinh, String Email, String soCMND, PictureBox anhNhanVien, String maPhongBan) { SqlParameter prMaNhanVien = new SqlParameter("@MANHANVIEN", SqlDbType.NChar, 10); prMaNhanVien.Value = maNhanVien; SqlParameter prHoTen = new SqlParameter("@HOTEN", SqlDbType.NVarChar, 30); prHoTen.Value = hoTen; SqlParameter prGioiTinh = new SqlParameter("@GIOITINH", SqlDbType.NVarChar, 10); prGioiTinh.Value = gioiTinh; SqlParameter prDiaChi = new SqlParameter("@DIACHI", SqlDbType.NVarChar, 50); prDiaChi.Value = diaChi; SqlParameter prSDT = new SqlParameter("@SDT", SqlDbType.NVarChar, 10); prSDT.Value = SDT; SqlParameter prNgaySinh = new SqlParameter("@NGAYSINH", SqlDbType.DateTime); prNgaySinh.Value = ngaySinh; SqlParameter prEmail = new SqlParameter("@EMAIL", SqlDbType.NVarChar, 30); prEmail.Value = Email; SqlParameter prSoCMND = new SqlParameter("@SOCMND", SqlDbType.NVarChar, 18); prSoCMND.Value = soCMND; byte[] arrayAnhNhanVien = File.ReadAllBytes(anhNhanVien.ImageLocation); SqlParameter prAnhNhanVien = new SqlParameter("@HINHANH", SqlDbType.Image); prAnhNhanVien.Value = arrayAnhNhanVien; SqlParameter prMaPhongBan = new SqlParameter("@MAPHONGBAN", SqlDbType.NChar, 10); prMaPhongBan.Value = maPhongBan; SqlParameter[] pr = { prMaNhanVien, prHoTen, prGioiTinh, prDiaChi, prSDT, prNgaySinh, prEmail, prSoCMND, prAnhNhanVien, prMaPhongBan }; return(xuLyDuLieu.thucThiThuTuc("psThemNhanVien", pr)); }
public bool doiMatKhau(String tenDangNhap, String matKhauCu, String matKhauMoi, String xacNhanMatKhauMoi) { SqlParameter prTenDangNhap = new SqlParameter("@TENDANGNHAP", SqlDbType.NVarChar, 30); prTenDangNhap.Value = tenDangNhap; SqlParameter prMatKhau = new SqlParameter("@MATKHAUCU", SqlDbType.NVarChar, 20); prMatKhau.Value = matKhauCu; SqlParameter prMatKhauMoi = new SqlParameter("@MATKHAUMOI", SqlDbType.NVarChar, 20); prMatKhauMoi.Value = matKhauMoi; SqlParameter prXacNhanMatKhauMoi = new SqlParameter("@XACNHANMATKHAUMOI", SqlDbType.NVarChar, 20); prXacNhanMatKhauMoi.Value = xacNhanMatKhauMoi; SqlParameter[] pr = { prTenDangNhap, prMatKhau, prMatKhauMoi, prXacNhanMatKhauMoi }; return(xuLyDuLieu.thucThiThuTuc("psDoiMatKhau", pr)); }
public bool themHoaDonNuoc(String maHoaDonNuoc, String tenHoaDon, String maNhanVien, String maHoGiaDinh, String maCanHo, String ngayIn, String tongTien, String ghiChu) { SqlParameter prmaHoaDonNuoc = new SqlParameter("@MAHOADONNUOC", SqlDbType.NVarChar, 10); prmaHoaDonNuoc.Value = maHoaDonNuoc; SqlParameter prtenHoaDon = new SqlParameter("@TENHOADON", SqlDbType.NVarChar, 30); prtenHoaDon.Value = tenHoaDon; SqlParameter prmaNhanVien = new SqlParameter("@MANHANVIEN", SqlDbType.NVarChar, 10); prmaNhanVien.Value = maNhanVien; SqlParameter prmaHoGiaDinh = new SqlParameter("@MAHOGD", SqlDbType.NVarChar, 10); prmaHoGiaDinh.Value = maHoGiaDinh; SqlParameter prmaCanHo = new SqlParameter("@MACANHO", SqlDbType.NVarChar, 10); prmaCanHo.Value = maCanHo; SqlParameter prngayIn = new SqlParameter("@NGAYIN", SqlDbType.DateTime); prngayIn.Value = ngayIn; SqlParameter prtongTien = new SqlParameter("@TONGTIEN", SqlDbType.Float); prtongTien.Value = tongTien; SqlParameter prghiChu = new SqlParameter("@GHICHU", SqlDbType.NVarChar, 50); prghiChu.Value = ghiChu; //String SQL = " insert into HOADONDIEN(MAHOADONDIEN, TENHOADON, MANHANVIEN, MAHOGD, MACANHO, NGAYIN, TONGTIEN, GHICHU)" // + " values (" // + "'" + maHoaDonDien + "'," // + "'" + tenHoaDon + "'," // + "'" + maNhanVien + "'," // + "'" + maHoGiaDinh + "'," // + "'" + maCanHo + "'," // + "'" + ngayIn + "'," // + "'" + tongTien + "'," // + "'" + ghiChu + "'" // + ")"; //return XuLyDuLieu.thucThiSQL(SQL); SqlParameter[] pr2 = { prmaHoaDonNuoc, prtenHoaDon, prmaNhanVien, prmaHoGiaDinh, prmaCanHo, prngayIn, prtongTien, prghiChu }; return(XuLyDuLieu.thucThiThuTuc("psThemHoaDonNuoc", pr2)); }