Esempio n. 1
0
        public DateTime getCurrentTime()
        {
            Predict_DAO dao = null;

            try
            {
                dao = new Predict_DAO();
                dao.beginTransaction();
                DateTime date = dao.getCurrentTime();
                dao.commitTransaction();
                return(date);
            }
            catch (Exception ex)
            {
                dao.rollbackTransaction();
                throw ex;
            }
        }
Esempio n. 2
0
        //--------------------------------------------------------------

        #region get schedules , get Results of Recommendation - Sonnt
        public List <RecommdationSchedule> getListSchedules()
        {
            Predict_DAO dao = null;
            List <RecommdationSchedule> listSchedules = null;

            try
            {
                dao = new Predict_DAO();
                dao.beginTransaction();
                listSchedules = dao.getSchedules();
                dao.commitTransaction();
            }
            catch (Exception)
            {
                dao.rollbackTransaction();
            }
            return(listSchedules);
        }
Esempio n. 3
0
        public List <Recommendation_Item> searchRecommendations(string UserID, string UserName, string RecommendType, bool TraditionalUser)
        {
            Predict_DAO dao = null;
            List <Recommendation_Item> listSchedules = null;

            try
            {
                dao = new Predict_DAO();
                dao.beginTransaction();
                listSchedules = dao.searchRecommendations(UserID, UserName, RecommendType, TraditionalUser);
                dao.commitTransaction();
            }
            catch (Exception ex)
            {
                dao.rollbackTransaction();
                throw ex;
            }
            return(listSchedules);
        }
Esempio n. 4
0
        public List <string> getRecommendTypes()
        {
            Predict_DAO   dao           = null;
            List <string> listSchedules = null;

            try
            {
                dao = new Predict_DAO();
                dao.beginTransaction();
                listSchedules = dao.getRecommendTypes();
                dao.commitTransaction();
            }
            catch (Exception ex)
            {
                dao.rollbackTransaction();
                throw ex;
            }
            return(listSchedules);
        }
Esempio n. 5
0
        public List <string[]> getStaticData()
        {
            Predict_DAO     dao = null;
            List <string[]> listResult;

            try
            {
                dao = new Predict_DAO();
                dao.beginTransaction();
                listResult = dao.getStaticsData();
                dao.commitTransaction();
            }
            catch (Exception ex)
            {
                dao.rollbackTransaction();
                throw ex;
            }
            return(listResult);
        }
Esempio n. 6
0
        public bool checkRecommendationTableIsInProcess()
        {
            bool        result = true;
            Predict_DAO dao    = null;

            // List<Recommendation_Item> listSchedules = null;
            try
            {
                dao = new Predict_DAO();
                dao.beginTransaction();
                result = dao.checkLockedTable("RECOMMENDATION_TBL");
                dao.commitTransaction();
            }
            catch (Exception)
            {
                dao.rollbackTransaction();
                return(true);
            }
            return(result);
        }