コード例 #1
0
 public static int kiemTraTonTai(string MaHDN)
 {
     return(Unility.AExcuteSQL(string.Format("SELECT count(*) FROM tb_HoaDonNhap WHERE MaHoaDonNhap = N'{0}'", MaHDN)));
 }
コード例 #2
0
 public static void xoa(string MaNCC)
 {
     Unility.ExcuteSQL(string.Format("DELETE FROM tb_NhaCungCap WHERE MaNhaCungCap =N'{0}'", MaNCC));
 }
コード例 #3
0
 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 + "%' "));
 }
コード例 #4
0
 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"));
 }
コード例 #5
0
 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));
 }
コード例 #6
0
 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));
 }
コード例 #7
0
 public static int kiemTraTonTai(string MaPhongBan)
 {
     return(Unility.AExcuteSQL(string.Format("SELECT count(*) FROM tb_PhongBan WHERE MaPhongBan =N'{0}'", MaPhongBan)));
 }
コード例 #8
0
 public static void xoa(string MaKH)
 {
     Unility.ExcuteSQL(string.Format("DELETE FROM tb_KhachHang WHERE MaKhachHang = N'{0}'", MaKH));
 }
コード例 #9
0
 public static int kiemTraTonTai(string MaKH)
 {
     return(Unility.AExcuteSQL(string.Format("SELECT count(*) FROM tb_KhachHang WHERE MaKhachHang = N'{0}'", MaKH)));
 }
コード例 #10
0
 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));
 }
コード例 #11
0
 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));
 }
コード例 #12
0
 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)));
 }
コード例 #13
0
 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"));
 }
コード例 #14
0
 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 + "%'"));
 }
コード例 #15
0
 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)));
 }
コード例 #16
0
 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 + "%'"));
 }
コード例 #17
0
 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));
 }
コード例 #18
0
 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)));
 }
コード例 #19
0
 public static void xoa(string MaPhongBan)
 {
     Unility.ExcuteSQL(string.Format("DELETE FROM tb_PhongBan WHERE MaPhongBan =N'{0}'", MaPhongBan));
 }
コード例 #20
0
 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));
 }
コード例 #21
0
 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 + "%'"));
 }
コード例 #22
0
 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));
 }
コード例 #23
0
 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)));
 }
コード例 #24
0
 public static void xoa(tb_ChiTietHoaDonNhapDBO obj)
 {
     Unility.ExcuteSQL(string.Format("DELETE FROM tb_ChiTietHoaDonNhap WHERE MaCTHDN=N'{0}'", obj.MaCTHDN));
 }
コード例 #25
0
 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));
 }
コード例 #26
0
 public static int kiemTraTonTai(tb_ChiTietHoaDonNhapDBO obj)
 {
     return(Unility.AExcuteSQL(string.Format("SELECT COUNT(*) FROM tb_ChiTietHoaDonNhap WHERE MaCTHDN=N'{0}'", obj.MaCTHDN)));
 }
コード例 #27
0
 public static int kiemTraTonTai(string MaNCC)
 {
     return(Unility.AExcuteSQL(string.Format("SELECT count(*) FROM tb_NhaCungCap WHERE MaNhaCungCap =N'{0}'", MaNCC)));
 }
コード例 #28
0
 public static DataTable layDuLieu()
 {
     return(Unility.GetDataTable("SELECT MaPhongBan 'Mã phòng ban',TenPhongBan 'Tên phòng ban' FROM tb_PhongBan"));
 }
コード例 #29
0
 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"));
 }
コード例 #30
0
 public static void xoa(string MaHDN)
 {
     Unility.ExcuteSQL(string.Format("DELETE FROM tb_HoaDonNhap WHERE MaHoaDonNhap = N'{0}'", MaHDN));
 }