Example #1
0
 public List<String> GetTopForDate(String date, int quantity, int idUser)
 {
     Dictionary<int, int> dictionaryTops = new Dictionary<int, int>();
     List<String> tops = new List<String>();
     DBMaster dbMaster = new DBMaster();
     JSONMaster JSON = new JSONMaster();
     dictionaryTops = dbMaster.FindByDate(date, quantity, idUser);
     tops = JSON.GetListTop(dictionaryTops);
     return tops;
 }
Example #2
0
        public List <String> GetTopForDate(String date, int quantity, int idUser)
        {
            Dictionary <int, int> dictionaryTops = new Dictionary <int, int>();
            List <String>         tops           = new List <String>();
            DBMaster   dbMaster = new DBMaster();
            JSONMaster JSON     = new JSONMaster();

            dictionaryTops = dbMaster.FindByDate(date, quantity, idUser);
            tops           = JSON.GetListTop(dictionaryTops);
            return(tops);
        }
Example #3
0
 public List<String> GetListTop(Dictionary<int, int> dictionaryTops)
 {
     List<String> Tops = new List<String>();
     String html = "";
     JObject jsonObj = new JObject();
     HttpMaster httpMaster = new HttpMaster();
     DBMaster dbMaster = new DBMaster();
     foreach (var elementTop in dictionaryTops)
     {
         html = httpMaster.PageData("groups.getById", "group_id=" + dbMaster.FindByIdGroup(elementTop.Key));
         jsonObj = JObject.Parse(html);
         foreach (var result in jsonObj["response"])
         {
             Tops.Add((String)result["name"]);
         }
     }
     return Tops;
 }
Example #4
0
        public List <String> GetListTop(Dictionary <int, int> dictionaryTops)
        {
            List <String> Tops       = new List <String>();
            String        html       = "";
            JObject       jsonObj    = new JObject();
            HttpMaster    httpMaster = new HttpMaster();
            DBMaster      dbMaster   = new DBMaster();

            foreach (var elementTop in dictionaryTops)
            {
                html    = httpMaster.PageData("groups.getById", "group_id=" + dbMaster.FindByIdGroup(elementTop.Key));
                jsonObj = JObject.Parse(html);
                foreach (var result in jsonObj["response"])
                {
                    Tops.Add((String)result["name"]);
                }
            }
            return(Tops);
        }