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; }
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; }
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; }
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; }
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; }
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; } }