//public List<Recommendation_Meta_Item> GetListRecommendC6_ForTraditionalUser() //{ // Predict_DAO_MC a = new Predict_DAO_MC(); // List<Recommendation_Meta_Item> list = new List<Recommendation_Meta_Item>(); // List<Recommendation_Meta_Item> RC = new List<Recommendation_Meta_Item>(); // try // { // a.beginTransaction(); // List<User> list_users_tra = a.getTraditionalUser_UnBlocked(); // foreach (User u in list_users_tra) // { // RC = a.GetRecommendC6_ForTraditionalUser(u, 1); // list.AddRange(RC); // } // a.commitTransaction(); // return list; // } // catch (Exception ex) // { // a.rollbackTransaction(); // throw ex; // } //} //---------------------------------------------------------------------------------------------- //This function calls GetRecommendC6_ForTraditionalUser from Predict_DAO_MC to give R1 //Created by MC. NGUYEN //Corrected by MC. NGUYEN, 22.10.2014 //Changed: 24.10.2014: the formule to calculate SCORE for each Meta Produit (based on Count(*)). //---------------------------------------------------------------------------------------------- public List<Recommendation_Meta_Item> getListRecommendation_R1_TraditionalUsers(Predict_DAO_MC a, int nbR1) { //Predict_DAO_MC a = new Predict_DAO_MC(); List<Recommendation_Meta_Item> list = new List<Recommendation_Meta_Item>(); List<Recommendation_Meta_Item> RC = new List<Recommendation_Meta_Item>(); List<string> lstCluster = new List<string>(); List<string> User_OfCluster = new List<string>(); //Settings r = GetRecommendationSeting(a); lstCluster = a.GetListClusterID(); //Check number of recommendations if (nbR1 <= 0) nbR1 = 1; //int i = 0; foreach (string cluster in lstCluster) { User_OfCluster = a.GetListUser_OfCluster(cluster); foreach (string u in User_OfCluster) { RC = a.GetRecommendC6_ForTraditionalUser(u, nbR1);//2 list.AddRange(RC); } } return list; }