示例#1
0
        public DataTable layDanhSachTour()
        {
            var tours = db.Database.SqlQuery <Models.Tour>("sp_layDanhSachTour").ToList();

            DataTable dt = List_to_DataTable.ToDataTable <Models.Tour>(tours);

            return(dt);
        }
        public DataTable layThongKeTinhHinh(int matour)
        {
            object[] parameters =
            {
                new SqlParameter("@MaTour", matour),
            };

            var data = db.Database.SqlQuery <Models.ThongKeTinhHinh>("sp_layThongKeTinhHinh @MaTour", parameters).ToList();

            DataTable dt = List_to_DataTable.ToDataTable <Models.ThongKeTinhHinh>(data);

            return(dt);
        }
示例#3
0
        public DataTable timkiemDanhSachTour(string keyword)
        {
            object[] parameters =
            {
                new SqlParameter("@keyword", keyword)
            };

            var tours = db.Database.SqlQuery <Models.Tour>("sp_timkiemDanhSachTour @keyword", parameters).ToList();

            DataTable dt = List_to_DataTable.ToDataTable <Models.Tour>(tours);

            return(dt);
        }
示例#4
0
        public DataTable layDanhSachCacDiaDiem(int maTour)
        {
            object[] parameters =
            {
                new SqlParameter("@MaTour", maTour)
            };

            var tours = db.Database.SqlQuery <Models.DiaDiemDL>("sp_layDanhSachCacDiaDiem @MaTour", parameters).ToList();

            DataTable dt = List_to_DataTable.ToDataTable <Models.DiaDiemDL>(tours);

            return(dt);
        }
        public DataTable layThongKeDoanhThu(int matour, DateTime tungay, DateTime denngay)
        {
            object[] parameters =
            {
                new SqlParameter("@MaTour",  matour),
                new SqlParameter("@TuNgay",  tungay),
                new SqlParameter("@DenNgay", denngay)
            };

            var data = db.Database.SqlQuery <Models.ThongKeDoanhThu>("sp_layThongKeDoanhThu @MaTour,@TuNgay,@DenNgay", parameters).ToList();

            DataTable dt = List_to_DataTable.ToDataTable <Models.ThongKeDoanhThu>(data);

            return(dt);
        }