示例#1
0
        public string Influencereport(string profileid, Guid userid, int days)
        {
            string strArray = string.Empty;

            try
            {
                //TwitterStatsRepository objtwtstatsRepo = new TwitterStatsRepository();
                //ArrayList alstTwt = objtwtstatsRepo.getTwitterStatsById(profileid,userid, days);
                TwitterEngagementRepository objTwitterEngagementRepository = new TwitterEngagementRepository();
                ArrayList alstTwt    = objTwitterEngagementRepository.getTwitterStatsById(profileid, userid, days);
                int       increament = 0;
                if (alstTwt.Count > 5)
                {
                    increament = alstTwt.Count / 5;
                }

                //  strArray = "[";
                string str = string.Empty;
                int    cnt = 0;
                if (alstTwt.Count > 0)
                {
                    if (increament > 0)
                    {
                        for (int i = 0; i < alstTwt.Count; i = i + increament)
                        {
                            Array temp = (Array)alstTwt[i];
                            strArray = strArray + temp.GetValue(7).ToString() + ",";
                            cnt++;
                        }
                    }
                    else
                    {
                        foreach (var itemTS in alstTwt)
                        {
                            Array temp = (Array)itemTS;
                            strArray = strArray + temp.GetValue(7).ToString() + ",";
                            cnt++;
                        }
                    }
                }
                if (cnt < 7)
                {
                    for (int j = 0; j < 7 - cnt; j++)
                    {
                        str = str + "0,";
                    }
                }

                strArray = str + strArray;
                strArray = strArray.Substring(0, strArray.Length - 1);

                //  strArray += "]";
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }

            return(strArray);
        }
        public string DateTimereport(string profileid, Guid userid, int days)
        { 
           string strArray = string.Empty;
            try
            {
                TwitterEngagementRepository objTwitterEngagementRepository = new TwitterEngagementRepository();
                ArrayList alstTwt = objTwitterEngagementRepository.getTwitterStatsById(profileid, userid, days);
                int increament = 0;
                if (alstTwt.Count > 5)
                {
                    increament = alstTwt.Count / 5;
                }

                //  strArray = "[";
                string str = string.Empty;
                int cnt = 0;
                if (alstTwt.Count > 0)
                {
                    if (increament > 0)
                    {
                        for (int i = 0; i < alstTwt.Count; i = i + increament)
                        {
                            Array temp = (Array)alstTwt[i];
                            strArray = strArray + temp.GetValue(6).ToString() + ",";
                            cnt++;
                        }
                    }
                    else
                    {
                        foreach (var itemTS in alstTwt)
                        {
                            Array temp = (Array)itemTS;
                            strArray = strArray + temp.GetValue(6).ToString() + ",";
                            cnt++;
                        }
                    }




                }
                if (cnt < 7)
                {
                    for (int j = 0; j < 7 - cnt; j++)
                    {
                        str = str + "0,";
                    }
                }

                strArray = str + strArray;
                strArray = strArray.Substring(0, strArray.Length - 1);

                //  strArray += "]";
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }

            //for (int i = 0; i < 7; i++)
            //{

            //    strArray += RandomDay() + ",";
            //    //strImpression += getrandomno() + ",";
            //    System.Threading.Thread.Sleep(10);
            //}
            return strArray;
        
        
        }
        public string Influencereport(string profileid, Guid userid, int days)
        {
            string strArray = string.Empty;
            try
            {
                //TwitterStatsRepository objtwtstatsRepo = new TwitterStatsRepository();
                //ArrayList alstTwt = objtwtstatsRepo.getTwitterStatsById(profileid,userid, days);
                TwitterEngagementRepository objTwitterEngagementRepository = new TwitterEngagementRepository();
                ArrayList alstTwt = objTwitterEngagementRepository.getTwitterStatsById(profileid, userid, days);
                int increament = 0;
                if (alstTwt.Count > 5)
                {
                    increament = alstTwt.Count / 5;
                }

                //  strArray = "[";
                string str = string.Empty;
                int cnt = 0;
                if (alstTwt.Count > 0)
                {
                    if (increament > 0)
                    {
                        for (int i = 0; i < alstTwt.Count; i = i + increament)
                        {
                            Array temp = (Array)alstTwt[i];
                            strArray = strArray + temp.GetValue(7).ToString() + ",";
                            cnt++;
                        }
                    }
                    else
                    {
                        foreach (var itemTS in alstTwt)
                        {
                            Array temp = (Array)itemTS;
                            strArray = strArray + temp.GetValue(7).ToString() + ",";
                            cnt++;
                        }
                    }

                }
                if (cnt < 7)
                {
                    for (int j = 0; j < 7 - cnt; j++)
                    {
                        str = str + "0,";
                    }
                }

                strArray = str + strArray;
                strArray = strArray.Substring(0, strArray.Length - 1);

                //  strArray += "]";
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }
           
            return strArray;
        
        
        }
示例#4
0
        public string DateTimereport(string profileid, Guid userid, int days)
        {
            string strArray = string.Empty;

            try
            {
                TwitterEngagementRepository objTwitterEngagementRepository = new TwitterEngagementRepository();
                ArrayList alstTwt    = objTwitterEngagementRepository.getTwitterStatsById(profileid, userid, days);
                int       increament = 0;
                if (alstTwt.Count > 5)
                {
                    increament = alstTwt.Count / 5;
                }

                //  strArray = "[";
                string str = string.Empty;
                int    cnt = 0;
                if (alstTwt.Count > 0)
                {
                    if (increament > 0)
                    {
                        for (int i = 0; i < alstTwt.Count; i = i + increament)
                        {
                            Array temp = (Array)alstTwt[i];
                            strArray = strArray + temp.GetValue(6).ToString() + ",";
                            cnt++;
                        }
                    }
                    else
                    {
                        foreach (var itemTS in alstTwt)
                        {
                            Array temp = (Array)itemTS;
                            strArray = strArray + temp.GetValue(6).ToString() + ",";
                            cnt++;
                        }
                    }
                }
                if (cnt < 7)
                {
                    for (int j = 0; j < 7 - cnt; j++)
                    {
                        str = str + "0,";
                    }
                }

                strArray = str + strArray;
                strArray = strArray.Substring(0, strArray.Length - 1);

                //  strArray += "]";
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }

            //for (int i = 0; i < 7; i++)
            //{

            //    strArray += RandomDay() + ",";
            //    //strImpression += getrandomno() + ",";
            //    System.Threading.Thread.Sleep(10);
            //}
            return(strArray);
        }