public static DataTable get_nhanvien() { return(DBConnect.GetData("get_nhanvien")); }
public DataTable GetData(TaiKhoan obj) { return(db.GetData("SELECT * FROM taikhoan WHERE taikhoan.TenDangNhap = '" + obj.TenDangNhap + "' and taikhoan.MatKhau = '" + obj.MatKhau + "'")); }
public DataTable XemThongTin() { return(db.GetData("SELECT nhanvien.MaNhanVien,nhanvien.TenNV,chamcong.TinhTrang,chamcong.Ngay FROM nhanvien INNER JOIN chamcong on nhanvien.MaNhanVien = chamcong.MaNhanVien")); }
public static DataTable get_cuonsach() { return(DBConnect.GetData("get_cuonsach")); }
public static DataTable get_nhaxuatban() { return(DBConnect.GetData("get_nhaxuatban")); }
public static DataTable get_hoadon() { return(DBConnect.GetData("get_hoadon")); }
public DataTable GetData() { return(db.GetData("phongban_Select_All", null)); }
// thong ke luu luong nhap hang cua tat ca cac loai hang hoa public static DataTable get_chitietnhapkho(string ma) { return(DBConnect.GetData("get_chitietnhapkho '" + ma + "'")); }
// thong ke luu luong nhap cua tung hang hoa public static DataTable get_chitietnhapsanpham(string nhapkhoma, string mathangma) { return(DBConnect.GetData("get_chitietnhapsanpham '" + nhapkhoma + "'" + "'" + mathangma + "'")); }
public static DataTable get_luuluongnhap_theongay(DateTime @tungay, DateTime @denngay) { return(DBConnect.GetData("get_luuluongnhap_theongay '" + @tungay + "'" + ",'" + @denngay + "'")); }
public static DataTable giamachuacoCT(string nhapkhoma) { return(DBConnect.GetData("select ma,gianhap from mathang where ma not in (select ma from mathang , chitietnhapkho where mathang.ma= mathangma and nhapkhoma='" + nhapkhoma + "')")); }
public static DataTable get_nhapkho() { return(DBConnect.GetData("get_nhapkho")); }
public static DataTable get_makhachhang() { return(DBConnect.GetData("select max(ma) from khachhang")); }
public static DataTable get_khachhang(string ma) { return(DBConnect.GetData("select ma, ten, diachi, sdt from khachhang where ma = '" + ma + "'")); }
public static DataTable get_hoadon(DateTime tu_ngay, DateTime den_ngay) { return(DBConnect.GetData("select hoadon.ma as [Mã hóa đơn], khachhang.ma as [Mã khách hàng], khachhang.ten as [Tên khách hàng], ngaylap as [Ngày lập], tongtien as [Tổng tiền], nhanvienma as [Mã NV bán hàng], nhanvien.ten as [Tên nhân viên] from hoadon join khachhang on hoadon.khachhangma = khachhang.ma join nhanvien on hoadon.nhanvienma = nhanvien.ma where ngaylap >= " + string.Format("'{0}-{1}-{2}'", tu_ngay.Year, tu_ngay.Month, tu_ngay.Day) + " and ngaylap <= " + string.Format("'{0}-{1}-{2}'", den_ngay.Year, den_ngay.Month, den_ngay.Day))); }
public static void update_soluongmathang(string ma_mathang) { DBConnect.GetData(string.Format("declare @soluong float select @soluong = SUM(soluong) from chitietnhapkho where mathangma = '{0}' if exists (select * from chitiethoadon where mathangma = '{0}') select @soluong = @soluong - SUM(soluong) from chitiethoadon where mathangma = '{0}' update mathang set soluongtrongkho = @soluong where ma = '{0}'", ma_mathang)); }
public static DataTable get_mahoadon() { return(DBConnect.GetData("select max(ma) from hoadon")); }
public static DataTable get_mathang() { return(DBConnect.GetData("get_mathang")); }
public DataTable GetData() { return(db.GetData("SELECT nhanvien.MaNhanVien,nhanvien.TenNV,nhanvien.SoCM,phongban.TenPB,chucvu.TenCV,luong.LuongCB FROM `nhanvien` INNER JOIN phongban ON nhanvien.MaPB = phongban.MaPB INNER JOIN chucvu on nhanvien.MaCV = chucvu.MaCV INNER JOIN luong ON nhanvien.HeSoLuong = luong.HeSoLuong")); }
public static DataTable get_mathang1(string mamh) { return(DBConnect.GetData("get_mathang '" + mamh + "'")); }
public static DataTable get_tacgia() { return(DBConnect.GetData("get_tacgia")); }
public static DataTable get_muctieuthu_theongay(DateTime @tungay, DateTime @denngay) { return(DBConnect.GetData("get_muctieuthu_theongay '" + @tungay + "'" + ",'" + @denngay + "'")); }
public static DataTable get_theloai() { return(DBConnect.GetData("get_theloai")); }
public static DataTable get_muctieuthu() { return(DBConnect.GetData("get_muctieuthu")); }
public DataTable GetData() { return(db.GetData("DanhSachNhanVienNghiLam")); }
// thong ke luong hang ban ra cua moi mot san pham nhat dinh public static DataTable get_chitietbansanpham(string mahoadon, string mathangma) { return(DBConnect.GetData("get_chitietbansanpham '" + mahoadon + "'" + "'" + mathangma + "'")); }
public DataTable GetData() { return(db.GetData("SELECT nhanvien.MaNhanVien,nhanvien.TenNV FROM nhanvien ")); }
// thong ke luong hang ban ra cua tung san pham public static DataTable get_chitiethoadon(string mahoadon) { return(DBConnect.GetData("get_chitiethoadon '" + mahoadon + "'")); }
public DataTable GetData() { return(db.GetData("SELECT nhanvien.MaNhanVien,nhanvien.TenNV,nhanvien.GioiTinh,chucvu.TenCV FROM chucvu inner JOIN nhanvien ON chucvu.MaCV = nhanvien.MaCV")); }
public DataTable GetData() { return(db.GetData("NhanVien_Select_All")); }