public static bool SuaHDN(HoaDonNhapHang_DTO hd) { string sTruyVan = string.Format(@"update hdnhang set mancc=N'{0}', manv='{1}', sotien='{2}', datra=N'{3}', conno=N'{4}' where shhd='{5}'", hd.SMaNCC, hd.SMaNV, hd.SSoTien, hd.SDaTra, hd.SConNo, hd.SSHHD); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Xóa hóa Don Nhap public static bool XoaHDN(HoaDonNhapHang_DTO hd) { string sTruyVan = string.Format(@"delete from hdnhang where shhd=N'{0}'", hd.SSHHD); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Xóa giảng viên public static bool XoaNhaCC(NhaCC_DTO cc) { string sTruyVan = string.Format(@"delete from nhacungcap where mancc='{0}'", cc.SMaNCC); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Thêm hoa dơn nhap public static bool ThemHDN(HoaDonNhapHang_DTO hd) { string sTruyVan = string.Format(@"insert into hdnhang values('{0}',N'{1}',N'{2}','{3}',N'{4}',N'{5}')", hd.SSHHD, hd.SMaNCC, hd.SMaNV, hd.SSoTien, hd.SDaTra, hd.SConNo); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Sửa NhaCC public static bool SuaNhaCC(NhaCC_DTO cc) { string sTruyVan = string.Format(@"update nhacungcap set tenncc=N'{0}', diachi=N'{1}', dienthoai=N'{2}', ghichu=N'{3}' where mancc='{4}'", cc.STenNCC, cc.SDiaChi, cc.SDienThoai, cc.SGhiChu, cc.SMaNCC); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Thêm Nha Cung Cấp public static bool ThemNhaCC(NhaCC_DTO cc) { string sTruyVan = string.Format(@"insert into nhacungcap values('{0}',N'{1}',N'{2}',N'{3}',N'{4}')", cc.SMaNCC, cc.STenNCC, cc.SDiaChi, cc.SDienThoai, cc.SGhiChu); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Xóa nhân viên public static bool XoaHang(Hang_DTO h) { string sTruyVan = string.Format(@"delete from hang where mah=N'{0}'", h.SMaHang); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Thêm giảng viên public static bool ThemNhanVien(NhanVien_DTO nv) { string sTruyVan = string.Format(@"insert into nhanvien values('{0}',N'{1}',N'{2}',N'{3}',N'{4}',N'{5}',N'{6}')", nv.SMaNV, nv.STenNV, nv.SChucVU, nv.SGioiTinh1, nv.SDiaChi, nv.SDienThoai, nv.SNgaySinh); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Sửa giảng viên public static bool SuaNhanVien(NhanVien_DTO nv) { string sTruyVan = string.Format(@"update nhanvien set tennv=N'{0}',chucvu=N'{1}' ,gioitinh=N'{2}',diachi=N'{3}',dienthoai=N'{4}',ngaysinh=N'{5}' where manv='{6}'", nv.STenNV, nv.SChucVU, nv.SGioiTinh1, nv.SDiaChi, nv.SDienThoai, nv.SNgaySinh, nv.SMaNV); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
public static bool XoaCTHD(CTHD_DTO cthd) { string sTruyVan = string.Format(@"delete from cthd where mahd=N'{0}'", cthd.SMaHD); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Sửa khách hàng public static bool SuaKhachHang(KhachHang_DTO kh) { string sTruyVan = string.Format(@"update khachhang set tenkh=N'{0}',diachi=N'{1}',dienthoai=N'{2}' where makh='{3}'", kh.STenKH, kh.SDiaChi, kh.SDienThoai, kh.SMaKH); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Thêm nhân viên public static bool ThemHang(Hang_DTO h) { string sTruyVan = string.Format(@"insert into hang values(N'{0}',N'{1}',N'{2}',N'{3}','{4}',N'{5}')", h.SMaHang, h.STenHang, h.SMaNCC, h.SSoLuong, h.SDonGiaNhap, h.SDonGiaBan); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
public static bool ThemCTHD(CTHD_DTO cthd) { string sTruyVan = string.Format(@"insert into cthd values('{0}',N'{1}','{2}','{3}',N'{4}')", cthd.SMaHD, cthd.SMaHang, cthd.SSoLuong, cthd.SDonGia, cthd.SGiamGia); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Thêm giảng viên public static bool ThemKhachHang(KhachHang_DTO kh) { string sTruyVan = string.Format(@"insert into khachhang values('{0}',N'{1}',N'{2}',N'{3}')", kh.SMaKH, kh.STenKH, kh.SDiaChi, kh.SDienThoai); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Xóa giảng viên public static bool XoaKhachHang(KhachHang_DTO kh) { string sTruyVan = string.Format(@"delete from khachhang where makh='{0}'", kh.SMaKH); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
public static bool XoaHDB(HoaDonBan_DTO hdb) { string sTruyVan = string.Format(@"delete from hoadonban where mahd=N'{0}'", hdb.SMaHD); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
public static bool SuaHDB(HoaDonBan_DTO hdb) { string sTruyVan = string.Format(@"update hoadonban set manv=N'{0}', ngayban='{1}', makh=N'{2}', soluong='{3}', tongtien='{4}' where mahd='{5}'", hdb.SMaNV, hdb.SNgayBan, hdb.SMaKH, hdb.SSoLuong, hdb.STongTien, hdb.SMaHD); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
public static bool ThemHDB(HoaDonBan_DTO hdb) { string sTruyVan = string.Format(@"insert into hoadonban values('{0}','{1}','{2}','{3}','{4}','{5}')", hdb.SMaHD, hdb.SMaNV, hdb.SNgayBan, hdb.SMaKH, hdb.SSoLuong, hdb.STongTien); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
public static bool XoaNhanVien(NhanVien_DTO nv) { string sTruyVan = string.Format(@"delete from nhanvien where manv='{0}'", nv.SMaNV); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
public static bool SuaCTHD(CTHD_DTO cthd) { //(@"update hdnhang set mancc=N'{0}', manv='{1}', sotien='{2}', datra=N'{3}', conno=N'{4}' where shhd='{5}'", hd.SMaNCC, hd.SMaNV, hd.SSoTien, hd.SDaTra, hd.SConNo, hd.SSHHD); string sTruyVan = string.Format(@"update cthd set mah='{0}', soluong='{1}', dongia='{2}', giamgia=N'{3}' where mahd='{4}'", cthd.SMaHang, cthd.SSoLuong, cthd.SDonGia, cthd.SGiamGia, cthd.SMaHD); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }
// Sửa hàng public static bool SuaHang(Hang_DTO h) { //(@"update hdnhang set mancc=N'{0}', manv='{1}', sotien='{2}', datra=N'{3}', conno=N'{4}' where shhd='{5}'", hd.SMaNCC, hd.SMaNV, hd.SSoTien, hd.SDaTra, hd.SConNo, hd.SSHHD); string sTruyVan = string.Format(@"update hang set tenh=N'{0}', mancc='{1}', soluong='{2}', dongianhap=N'{3}', dongiaban=N'{4}' where mah='{5}'", h.STenHang, h.SMaNCC, h.SSoLuong, h.SDonGiaNhap, h.SDonGiaBan, h.SMaHang); con = DataProvider.MoKetNoi(); bool kq = DataProvider.TruyVanKhongLayDuLieu(sTruyVan, con); DataProvider.DongKetNoi(con); return(kq); }