public static int kiemTraTonTai(string MaHDN) { return(Unility.AExcuteSQL(string.Format("SELECT count(*) FROM tb_HoaDonNhap WHERE MaHoaDonNhap = N'{0}'", MaHDN))); }
public static void xoa(string MaNCC) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_NhaCungCap WHERE MaNhaCungCap =N'{0}'", MaNCC)); }
public static DataTable timKiem(string MaNhaCungCap) { return(Unility.GetDataTable("SELECT MaNhaCungCap 'Mã nhà cung cấp' ,TenNhaCungCap 'Tên nhà cung cấp' ,DiaChi 'Địa chỉ' ,SDT 'Số điện thoại' FROM tb_NhaCungCap where MaNhaCungCap like '%" + MaNhaCungCap + "%' or TenNhaCungCap like '%" + MaNhaCungCap + "%' ")); }
public static DataTable layDuLieu() { return(Unility.GetDataTable("SELECT MaNhaCungCap 'Mã nhà cung cấp' ,TenNhaCungCap 'Tên nhà cung cấp' ,DiaChi 'Địa chỉ' ,SDT 'Số điện thoại' FROM tb_NhaCungCap")); }
public static void them(tb_NhaCungCapDBO obj) { Unility.ExcuteSQL(string.Format("INSERT INTO tb_NhaCungCap (MaNhaCungCap ,TenNhaCungCap ,DiaChi ,SDT) VALUES(N'{0}',N'{1}',N'{2}',N'{3}')", obj.MaNhaCungCap, obj.TenNhaCungCap, obj.DiaChi, obj.SDT)); }
public static void sua(tb_PhongBanDBO obj) { Unility.ExcuteSQL(string.Format("UPDATE tb_PhongBan SET TenPhongBan = N'{1}' WHERE MaPhongBan = N'{0}'", obj.MaPhongBan, obj.TenPhongBan)); }
public static int kiemTraTonTai(string MaPhongBan) { return(Unility.AExcuteSQL(string.Format("SELECT count(*) FROM tb_PhongBan WHERE MaPhongBan =N'{0}'", MaPhongBan))); }
public static void xoa(string MaKH) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_KhachHang WHERE MaKhachHang = N'{0}'", MaKH)); }
public static int kiemTraTonTai(string MaKH) { return(Unility.AExcuteSQL(string.Format("SELECT count(*) FROM tb_KhachHang WHERE MaKhachHang = N'{0}'", MaKH))); }
public static void them(tb_KhachHangDBO obj) { Unility.ExcuteSQL(string.Format("INSERT INTO tb_KhachHang (MaKhachHang ,TenKhachHang ,DiaChi ,SDT) VALUES (N'{0}',N'{1}',N'{2}',N'{3}')", obj.MaKhachHang, obj.TenKhachHang, obj.DiaChi, obj.SDT)); }
public static void sua(tb_KhachHangDBO obj) { Unility.ExcuteSQL(string.Format("UPDATE tb_KhachHang SET TenKhachHang = N'{1}' ,DiaChi = N'{2}',SDT = N'{3}' WHERE MaKhachHang = N'{0}'", obj.MaKhachHang, obj.TenKhachHang, obj.DiaChi, obj.SDT)); }
public static DataTable layDuLieuSoDieuKien(string MaKH) { return(Unility.GetDataTable(string.Format("SELECT MaKhachHang 'Mã khách hàng',TenKhachHang 'Tên khách hàng',DiaChi 'Địa chỉ',SDT 'Số điện thoại' FROM tb_KhachHang where MaKhachHang = '{0}'", MaKH))); }
public static DataTable layDuLieu() { return(Unility.GetDataTable("SELECT MaKhachHang 'Mã khách hàng',TenKhachHang 'Tên khách hàng',DiaChi 'Địa chỉ',SDT 'Số điện thoại' FROM tb_KhachHang")); }
public static DataTable timKiem(string MaHoaDonNhap) { return(Unility.GetDataTable("SELECT MaHoaDonNhap 'Mã hóa đơn nhập',tb_NhaCungCap.TenNhaCungCap 'Nhà cung cấp',tb_NhanVien.TenNhanVien 'Nhân viên',NgayLap 'Ngày lập' FROM tb_HoaDonNhap join tb_NhaCungCap on tb_HoaDonNhap.MaNhaCungCap = tb_NhaCungCap.MaNhaCungCap join tb_NhanVien on tb_HoaDonNhap.MaNhanVien =tb_NhanVien.MaNhanVien where MaHoaDonNhap like '%" + MaHoaDonNhap + "%'")); }
public static DataTable layDuLieuSoDieuKien(string MaPhongBan) { return(Unility.GetDataTable(string.Format("SELECT MaPhongBan 'Mã phòng ban',TenPhongBan 'Tên phòng ban' FROM tb_PhongBan where MaPhongBan = '{0}'", MaPhongBan))); }
public static DataTable timKiem(string MaKhachHang) { return(Unility.GetDataTable("SELECT MaKhachHang 'Mã khách hàng',TenKhachHang 'Tên khách hàng',DiaChi 'Địa chỉ',SDT 'Số điện thoại' FROM tb_KhachHang where MaKhachHang like '%" + MaKhachHang + "%' or TenKhachHang like '%" + MaKhachHang + "%' or DiaChi like '%" + MaKhachHang + "%'")); }
public static void them(tb_PhongBanDBO obj) { Unility.ExcuteSQL(string.Format("INSERT INTO tb_PhongBan (MaPhongBan,TenPhongBan) VALUES(N'{0}',N'{1}')", obj.MaPhongBan, obj.TenPhongBan)); }
public static DataTable layDuLieuSoDieuKien(string TenChiTietHoaDonNhap) { return(Unility.GetDataTable(string.Format("SELECT MaCTHDN 'Mã chi tiết hóa đơn',MaHoaDonNhap 'Mã hóa đơn',tb_MatHang.TenMatHang 'Mặt hàng',DonGia 'Đơn giá',tb_ChiTietHoaDonNhap.SoLuong 'Số lượng' FROM tb_ChiTietHoaDonNhap join tb_MatHang on tb_ChiTietHoaDonNhap.MaMatHang = tb_MatHang.MaMatHang where MaHoaDonNhap = '{0}'", TenChiTietHoaDonNhap))); }
public static void xoa(string MaPhongBan) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_PhongBan WHERE MaPhongBan =N'{0}'", MaPhongBan)); }
public static void them(tb_ChiTietHoaDonNhapDBO obj) { Unility.ExcuteSQL(string.Format("INSERT INTO tb_ChiTietHoaDonNhap (MaCTHDN,MaHoaDonNhap,MaMatHang,DonGia,SoLuong) VALUES (N'{0}',N'{1}',N'{2}',N'{3}',N'{4}')", obj.MaCTHDN, obj.MaHoaDonNhap, obj.MaMatHang, obj.DonGia, obj.SoLuong)); }
public static DataTable timKiem(string MaPhongBan) { return(Unility.GetDataTable("SELECT MaPhongBan 'Mã phòng ban',TenPhongBan 'Tên phòng ban' FROM tb_PhongBan where MaPhongBan like '%" + MaPhongBan + "%' or TenPhongBan like '%" + MaPhongBan + "%'")); }
public static void sua(tb_ChiTietHoaDonNhapDBO obj, string MaMatHang) { Unility.ExcuteSQL(string.Format("UPDATE tb_ChiTietHoaDonNhap SET DonGia = N'{1}',SoLuong = N'{2}' WHERE MaCTHDN=N'{0}' ", obj.MaCTHDN, obj.DonGia, obj.SoLuong)); }
public static DataTable layDuLieuSoDieuKien(string MaNCC) { return(Unility.GetDataTable(string.Format("SELECT MaNhaCungCap 'Mã nhà cung cấp' ,TenNhaCungCap 'Tên nhà cung cấp' ,DiaChi 'Địa chỉ' ,SDT 'Số điện thoại' FROM tb_NhaCungCap where MaNhaCungCap = '{0}'", MaNCC))); }
public static void xoa(tb_ChiTietHoaDonNhapDBO obj) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_ChiTietHoaDonNhap WHERE MaCTHDN=N'{0}'", obj.MaCTHDN)); }
public static void sua(tb_NhaCungCapDBO obj) { Unility.ExcuteSQL(string.Format("UPDATE tb_NhaCungCap SET TenNhaCungCap = N'{1}' ,DiaChi = N'{2}',SDT = N'{3}' WHERE MaNhaCungCap = N'{0}'", obj.MaNhaCungCap, obj.TenNhaCungCap, obj.DiaChi, obj.SDT)); }
public static int kiemTraTonTai(tb_ChiTietHoaDonNhapDBO obj) { return(Unility.AExcuteSQL(string.Format("SELECT COUNT(*) FROM tb_ChiTietHoaDonNhap WHERE MaCTHDN=N'{0}'", obj.MaCTHDN))); }
public static int kiemTraTonTai(string MaNCC) { return(Unility.AExcuteSQL(string.Format("SELECT count(*) FROM tb_NhaCungCap WHERE MaNhaCungCap =N'{0}'", MaNCC))); }
public static DataTable layDuLieu() { return(Unility.GetDataTable("SELECT MaPhongBan 'Mã phòng ban',TenPhongBan 'Tên phòng ban' FROM tb_PhongBan")); }
public static DataTable layDuLieu() { return(Unility.GetDataTable("SELECT MaCTHDB 'Mã chi tiết hóa đơn bán',MaHoaDonBan 'Mã hóa đơn',tb_MatHang.TenMatHang 'Mặt hàng',DonGia 'Đơn giá',tb_ChiTietHoaDonBan.SoLuong 'Số lượng' FROM tb_ChiTietHoaDonBan join tb_MatHang on tb_ChiTietHoaDonBan.MaMatHang = tb_MatHang.MaMatHang")); }
public static void xoa(string MaHDN) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_HoaDonNhap WHERE MaHoaDonNhap = N'{0}'", MaHDN)); }