public static void sua(tb_TonDauKyDBO obj) { Unility.ExcuteSQL(string.Format("UPDATE tb_TonDauKy SET NgayCapNhat =N'{1}' ,SoLuong = N'{2}' ,GiaTriTon = N'{3}' WHERE MaMatHang =N'{0}'", obj.MaMatHang, obj.NgayCapNhat.ToString("yyyy-MM-dd"), obj.SoLuong.ToString(), obj.GiaTriTon.ToString())); }
public static void them(tb_DangNhapDBO obj) { Unility.ExcuteSQL(string.Format("INSERT INTO tb_DangNhap (TenDangNhap,MatKhau,MaNhanVien,Role) VALUES(N'{0}',N'{1}',N'{2}',N'{3}')", obj.TenDangNhap, obj.MatKhau, obj.MaNhanVien, obj.Role)); }
public static void xoa(string TenDangNhap) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_DangNhap WHERE TenDangNhap = N'{0}'", TenDangNhap)); }
public static void xoa(string MaMH) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_MatHang WHERE MaMatHang =N'{0}'", MaMH)); }
public static void sua(tb_HoaDonBanDBO obj) { Unility.ExcuteSQL(string.Format("UPDATE tb_HoaDonBan SET MaKhachHang = N'{1}' ,MaNhanVien = N'{2}',NgayLap = N'{3}',TongThanhToan = N'{4}',DaThanhToan = N'{5}' WHERE MaHoaDonBan = N'{0}'", obj.MaHoaDonBan, obj.MaKhachHang, obj.MaNhanVien, obj.NgayLap, obj.TongThanhToan, obj.DaThanhToan)); }
public static void sua(tb_ChiTietHoaDonBanDBO obj, string MaMatHang) { Unility.ExcuteSQL(string.Format("UPDATE tb_ChiTietHoaDonBan SET MaMatHang = N'{5}' ,DonGia = N'{3}',SoLuong = N'{4}' WHERE MaCTHDB=N'{0}' and MaHoaDonBan = N'{1}' and MaMatHang = N'{2}'", obj.MaCTHDB, obj.MaHoaDonBan, obj.MaMatHang, obj.DonGia, obj.SoLuong, MaMatHang)); }
public static void them(tb_MatHangDBO obj) { Unility.ExcuteSQL(string.Format("INSERT INTO tb_MatHang (MaMatHang ,TenMatHang ,MaNhaCungCap ,MaNhomHang ,DVT ,GiaBan ,NgayCapNhat) VALUES (N'{0}',N'{1}',N'{2}',N'{3}',N'{4}',N'{5}',N'{6}')", obj.MaMatHang, obj.TenMatHang, obj.MaNhaCungCap, obj.MaNhomHang, obj.DVT, obj.GiaBan, obj.NgayCapNhat)); }
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 void them(tb_HoaDonNhapDBO obj) { Unility.ExcuteSQL(string.Format("INSERT INTO tb_HoaDonNhap (MaHoaDonNhap ,MaNhaCungCap ,MaNhanVien ,NgayLap) VALUES (N'{0}',N'{1}',N'{2}',N'{3}')", obj.MaHoaDonNhap, obj.MaNhaCungCap, obj.MaNhanVien, obj.NgayLap)); }
public static void sua(tb_HoaDonNhapDBO obj) { Unility.ExcuteSQL(string.Format("UPDATE tb_HoaDonNhap SET MaNhaCungCap = N'{1}' ,MaNhanVien = N'{2}',NgayLap = N'{3}' WHERE MaHoaDonNhap = N'{0}'", obj.MaHoaDonNhap, obj.MaNhaCungCap, obj.MaNhanVien, obj.NgayLap)); }
public static void xoa(string MaNV) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_NhanVien WHERE MaNhanVien =N'{0}'", MaNV)); }
public static void sua(tb_NhanVienDBO obj) { Unility.ExcuteSQL(string.Format("UPDATE tb_NhanVien SET TenNhanVien=N'{1}',NgaySinh=N'{2}',GioiTinh=N'{3}',DiaChi=N'{4}',SDT=N'{5}',MaPhongBan=N'{6}' WHERE MaNhanVien = N'{0}'", obj.MaNhanVien, obj.TenNhanVien, obj.NgaySinh, obj.GioiTinh, obj.DiaChi, obj.SDT, obj.MaPhongBan)); }
public static void them(tb_NhanVienDBO obj) { Unility.ExcuteSQL(string.Format("INSERT INTO tb_NhanVien (MaNhanVien,TenNhanVien,NgaySinh,GioiTinh,DiaChi,SDT,MaPhongBan) VALUES (N'{0}',N'{1}',N'{2}',N'{3}',N'{4}',N'{5}',N'{6}')", obj.MaNhanVien, obj.TenNhanVien, obj.NgaySinh, obj.GioiTinh, obj.DiaChi, obj.SDT, obj.MaPhongBan)); }
public static void xoa(string MaNCC) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_NhaCungCap WHERE MaNhaCungCap =N'{0}'", MaNCC)); }
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 void them(tb_ChiTietHoaDonBanDBO obj) { Unility.ExcuteSQL(string.Format("INSERT INTO tb_ChiTietHoaDonBan (MaCTHDB,MaHoaDonBan,MaMatHang,DonGia,SoLuong) VALUES (N'{0}',N'{1}',N'{2}',N'{3}',N'{4}')", obj.MaCTHDB, obj.MaHoaDonBan, obj.MaMatHang, obj.DonGia, obj.SoLuong)); }
public static void xoa(tb_ChiTietHoaDonNhapDBO obj) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_ChiTietHoaDonNhap WHERE MaCTHDN=N'{0}'", obj.MaCTHDN)); }
public static void xoa(tb_ChiTietHoaDonBanDBO obj) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_ChiTietHoaDonBan WHERE MaCTHDB=N'{0}' and MaHoaDonBan = N'{1}' and MaMatHang = N'{2}'", obj.MaCTHDB, obj.MaHoaDonBan, obj.MaMatHang)); }
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 void sua(tb_MatHangDBO obj) { Unility.ExcuteSQL(string.Format("UPDATE tb_MatHang SET TenMatHang = N'{1}' ,MaNhaCungCap = N'{2}',MaNhomHang = N'{3}',DVT = N'{4}',GiaBan = N'{5}',NgayCapNhat = N'{6}' WHERE MaMatHang = N'{0}'", obj.MaMatHang, obj.TenMatHang, obj.MaNhaCungCap, obj.MaNhomHang, obj.DVT, obj.GiaBan, obj.NgayCapNhat)); }
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 void them(tb_HoaDonBanDBO obj) { Unility.ExcuteSQL(string.Format("INSERT INTO tb_HoaDonBan (MaHoaDonBan,MaKhachHang,MaNhanVien,NgayLap,TongThanhToan,DaThanhToan)VALUES(N'{0}',N'{1}',N'{2}',N'{3}',N'{4}',N'{5}')", obj.MaHoaDonBan, obj.MaKhachHang, obj.MaNhanVien, obj.NgayLap, obj.TongThanhToan, obj.DaThanhToan)); }
public static void xoa(string MaPhongBan) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_PhongBan WHERE MaPhongBan =N'{0}'", MaPhongBan)); }
public static void xoa(string MaHDB) { Unility.ExcuteSQL(string.Format("DELETE FROM tb_HoaDonBan WHERE MaHoaDonBan = N'{0}'", MaHDB)); }
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_DangNhapDBO obj) { Unility.ExcuteSQL(string.Format("UPDATE tb_DangNhap SET MatKhau = N'{1}' ,MaNhanVien = N'{2}',Role = N'{3}' WHERE TenDangNhap = N'{0}'", obj.TenDangNhap, obj.MatKhau, obj.MaNhanVien, obj.Role)); }
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 void DoiMK(string TenTaiKhoan, string MK) { Unility.ExcuteSQL(string.Format("UPDATE tb_DangNhap SET MatKhau = N'{1}' WHERE TenDangNhap = N'{0}'", TenTaiKhoan, MK)); }
public static void them(tb_TonDauKyDBO obj) { Unility.ExcuteSQL(string.Format("INSERT INTO tb_TonDauKy (MaMatHang,NgayCapNhat,SoLuong,GiaTriTon)VALUES(N'{0}',N'{1}',N'{2}',N'{3}')", obj.MaMatHang, obj.NgayCapNhat.ToString("yyyy-MM-dd"), obj.SoLuong.ToString(), obj.GiaTriTon.ToString())); }