Пример #1
0
        public static void CapNhatTrangThaiPhieuMuaNL(string maPhieu)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("CAP_NHAT_TRANG_THAI_PHIEU_MUA_NL");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaPhieu", maPhieu);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #2
0
        public static void XoaHoatDong(HoatDongNgoaiKhoa hoatDong)
        {
            DataAccessHelper db = new DataAccessHelper();

            SqlCommand cmd = db.Command("XoaHoatDong");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaHoatDong", hoatDong.MaHoatDong);
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #3
0
        public static DataTable LayDanhSachTenVaMaLop()
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("LAY_DANH_SACH_TEN_VA_MA_LOP");

            cmd.CommandType = CommandType.StoredProcedure;

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
            return(db.dt);
        }
Пример #4
0
        public static DataTable LayDanhSachPhieuMuaNL()
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("LAY_DANH_SACH_PHIEU_MUA");

            cmd.CommandType = CommandType.StoredProcedure;

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
            return(db.dt);
        }
Пример #5
0
        public static void XoaNV(string maNV)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("XOANV");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaNV", maNV);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #6
0
        public static void XoaDichVu(DichVuSucKhoe dichVu)
        {
            DataAccessHelper db = new DataAccessHelper();

            SqlCommand cmd = db.Command("XoaDichVu");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaDichVu", dichVu.MaDV);
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #7
0
        public static DataTable LayDanhSachMaThucDon()
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("LAY_DANH_SACH_MA_THUC_DON");

            cmd.CommandType = CommandType.StoredProcedure;

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
            return(db.dt);
        }
Пример #8
0
        public static DataTable LayDanhSachMaNguyenLieuVaSoLuongTrongMonAn(string maMonAn)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("LAY_MA_NGUYEN_LIEU_VA_SO_LUONG_CAN_TU_MON_AN");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaMonAn", maMonAn);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
            return(db.dt);
        }
Пример #9
0
        public static DataTable LayDanhSachMaMonAnTheoThucDon(string maThucDon)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("LAY_DANH_SACH_MA_MON_AN_TRONG_THUC_DON");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaThucDon", maThucDon);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
            return(db.dt);
        }
Пример #10
0
        public static void XoaDanhSachChiTietPhieuMuaNL(string maPhieuMua)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("XOA_DANH_SACH_CHI_TIET_PHIEU_MUA");

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.AddWithValue("@MaPhieu", maPhieuMua);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #11
0
        public static void XoaKetQuaHoatDong(string maHD, string maTre)
        {
            DataAccessHelper db = new DataAccessHelper();

            SqlCommand cmd = db.Command("XoaKetQuaThamGiaHoatDong");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaHoatDong", maHD);
            cmd.Parameters.AddWithValue("@MaTre", maTre);
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #12
0
        public static DataTable LayDanhSachNguyenLieu()
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("LAY_DANH_SACH_THONG_TIN_NGUYEN_LIEU");

            cmd.CommandType = CommandType.StoredProcedure;

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);

            return(db.dt);
        }
Пример #13
0
        public static void XoaThongTinSucKhoe(string maDV, string maTre)
        {
            DataAccessHelper db = new DataAccessHelper();

            SqlCommand cmd = db.Command("XoaThongTinSucKhoe");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaDichVu", maDV);
            cmd.Parameters.AddWithValue("@MaTre", maTre);
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #14
0
        public static void XoaPhieuMuaNL(string MaPhieuMua)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("XOA_PHIEU_MUA_NGUYEN_LIEU");

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.AddWithValue("@MaPhieu", MaPhieuMua);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #15
0
        public static void XoaLopThamGia(string maDV, string maLop)
        {
            DataAccessHelper db = new DataAccessHelper();

            SqlCommand cmd = db.Command("XoaLopThamGiaDichVu");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaDichVu", maDV);
            cmd.Parameters.AddWithValue("@MaLop", maLop);
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #16
0
        public static void CapNhatTonNguyenLieuTheoMa(string maNguyenLieu, int soLuongDung)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("CAP_NHAT_SO_LUONG_NGUYEN_LIEU_THEO_MA");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaNguyenLieu", maNguyenLieu);
            cmd.Parameters.AddWithValue("@SoLuongDung", soLuongDung);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #17
0
        public static void ThemTreVaoLop(string maTre, string maLop)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("THEMTREVAOLOP");

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.AddWithValue("@MaTre", maTre);
            cmd.Parameters.AddWithValue("@MaLop", maLop);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #18
0
        public static DataTable GetListSucKhoeKoTheoLop(string maDV)
        {
            DataAccessHelper db = new DataAccessHelper();

            SqlCommand cmd = db.Command("GetKetQuaKhamKoTheoLop");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaDichVu", maDV);
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);

            return(db.dt);
        }
Пример #19
0
        public static DataTable GetThongTinNV(string maNV)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("GETTHONGTINNV");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaNV", maNV);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);

            return(db.dt);
        }
Пример #20
0
        public static DataTable TimNV(string tuKhoa)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("TIMKIEMNV");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@TUKHOA", tuKhoa);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);

            return(db.dt);
        }
Пример #21
0
        public static DataTable LayDanhSachNguyenLieu(string tuKhoa)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("TIM_KIEM_NGUYEN_LIEU");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@TuKhoa", tuKhoa);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);

            return(db.dt);
        }
Пример #22
0
        public static void CapNhatMonAn(MonAn monAn)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("CAP_NHAT_MON_AN");

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.AddWithValue("@MaMonAn", monAn.MaMonAn);
            cmd.Parameters.AddWithValue("@TenMonAn", monAn.TenMonAn);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #23
0
        public static DataTable layDanhSachLoaiNguyenLieu()
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("LAY_DANH_SACH_LOAI_NGUYEN_LIEU");

            cmd.CommandType = CommandType.StoredProcedure;

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);

            //DataTable dt = db.GetDataTable("SELECT * FROM NGUYENLIEU");
            return(db.dt);
        }
Пример #24
0
        public static void XoaChiTietThucDon(string maThucDon, string maMonAn)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("XOA_CHI_TIET_THUC_DON");

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.AddWithValue("@MaThucDon", maThucDon);
            cmd.Parameters.AddWithValue("@MaMonAn", maMonAn);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #25
0
        public static DataTable LayDanhSachApDungThucDonTheoThoiGian(DateTime NgayApDung, string Buoi)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("LAY_CHI_TIET_AP_DUNG_THEO_THUC_DON");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@NgayApDung", NgayApDung);
            cmd.Parameters.AddWithValue("@Buoi", Buoi.Trim());

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
            return(db.dt);
        }
Пример #26
0
        public static DataTable TreChuaCoLop(string namSinh)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("TRECHUACOLOP");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@NamSinh", namSinh);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);

            return(db.dt);
        }
Пример #27
0
        public static void CapNhatTreThamGiaDichVu(string maDV, string maTre, int thamGia)
        {
            DataAccessHelper db = new DataAccessHelper();

            SqlCommand cmd = db.Command("CapNhatTreThamGiaDichVu");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaDichVu", maDV);
            cmd.Parameters.AddWithValue("@MaTre", maTre);
            cmd.Parameters.AddWithValue("@ThamGia", thamGia);
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #28
0
        public static void XoaNLTungMon(string maMon, string maNL)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("XOA_NGUYEN_LIEU_TUNG_MON");

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.AddWithValue("@MaMon", maMon);
            cmd.Parameters.AddWithValue("@MaNL", maNL);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);
        }
Пример #29
0
        public static DataTable GetHoTenTre(string maTre)
        {
            DataAccessHelper db  = new DataAccessHelper();
            SqlCommand       cmd = db.Command("GetHoTenTre");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaTre", maTre);

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);

            return(db.dt);
        }
Пример #30
0
        public static DataTable GetListDiemKoTheoLop(string maHD)
        {
            DataAccessHelper db = new DataAccessHelper();

            SqlCommand cmd = db.Command("GetListDiemHoatDongKoTheoLop");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaHoatDong", maHD);
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            db.dt = new DataTable();
            da.Fill(db.dt);

            return(db.dt);
        }