Example #1
0
 public static DataTable get_nhanvien()
 {
     return(DBConnect.GetData("get_nhanvien"));
 }
Example #2
0
 public DataTable GetData(TaiKhoan obj)
 {
     return(db.GetData("SELECT * FROM taikhoan WHERE taikhoan.TenDangNhap = '" + obj.TenDangNhap + "' and taikhoan.MatKhau = '" + obj.MatKhau + "'"));
 }
Example #3
0
 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"));
 }
Example #4
0
 public static DataTable get_cuonsach()
 {
     return(DBConnect.GetData("get_cuonsach"));
 }
Example #5
0
 public static DataTable get_nhaxuatban()
 {
     return(DBConnect.GetData("get_nhaxuatban"));
 }
Example #6
0
 public static DataTable get_hoadon()
 {
     return(DBConnect.GetData("get_hoadon"));
 }
Example #7
0
 public DataTable GetData()
 {
     return(db.GetData("phongban_Select_All", null));
 }
Example #8
0
 // 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 + "'"));
 }
Example #9
0
 // 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 + "'"));
 }
Example #10
0
 public static DataTable get_luuluongnhap_theongay(DateTime @tungay, DateTime @denngay)
 {
     return(DBConnect.GetData("get_luuluongnhap_theongay '" + @tungay + "'" + ",'" + @denngay + "'"));
 }
Example #11
0
 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 + "')"));
 }
Example #12
0
 public static DataTable get_nhapkho()
 {
     return(DBConnect.GetData("get_nhapkho"));
 }
Example #13
0
 public static DataTable get_makhachhang()
 {
     return(DBConnect.GetData("select max(ma) from khachhang"));
 }
Example #14
0
 public static DataTable get_khachhang(string ma)
 {
     return(DBConnect.GetData("select ma, ten, diachi, sdt from khachhang where ma = '" + ma + "'"));
 }
Example #15
0
 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)));
 }
Example #16
0
 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));
 }
Example #17
0
 public static DataTable get_mahoadon()
 {
     return(DBConnect.GetData("select max(ma) from hoadon"));
 }
Example #18
0
 public static DataTable get_mathang()
 {
     return(DBConnect.GetData("get_mathang"));
 }
Example #19
0
 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"));
 }
Example #20
0
 public static DataTable get_mathang1(string mamh)
 {
     return(DBConnect.GetData("get_mathang '" + mamh + "'"));
 }
Example #21
0
 public static DataTable get_tacgia()
 {
     return(DBConnect.GetData("get_tacgia"));
 }
Example #22
0
 public static DataTable get_muctieuthu_theongay(DateTime @tungay, DateTime @denngay)
 {
     return(DBConnect.GetData("get_muctieuthu_theongay '" + @tungay + "'" + ",'" + @denngay + "'"));
 }
Example #23
0
 public static DataTable get_theloai()
 {
     return(DBConnect.GetData("get_theloai"));
 }
Example #24
0
 public static DataTable get_muctieuthu()
 {
     return(DBConnect.GetData("get_muctieuthu"));
 }
Example #25
0
 public DataTable GetData()
 {
     return(db.GetData("DanhSachNhanVienNghiLam"));
 }
Example #26
0
 // 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 + "'"));
 }
Example #27
0
 public DataTable GetData()
 {
     return(db.GetData("SELECT nhanvien.MaNhanVien,nhanvien.TenNV FROM nhanvien "));
 }
Example #28
0
 // thong ke luong hang ban ra cua tung san pham
 public static DataTable get_chitiethoadon(string mahoadon)
 {
     return(DBConnect.GetData("get_chitiethoadon '" + mahoadon + "'"));
 }
Example #29
0
 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"));
 }
Example #30
0
 public DataTable GetData()
 {
     return(db.GetData("NhanVien_Select_All"));
 }