public string getTwtMention(string profileId, Guid userid, int days)
        {
            TwitterMessageRepository objretwt = new TwitterMessageRepository();
            string count = string.Empty;

            try
            {
                ArrayList alstTwt = objretwt.getMentionStatsByProfileId(profileId, userid, days);
                count = alstTwt[0].ToString();
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }
            return(count);
        }
Beispiel #2
0
        public string getTwtMention(string profileId, int days)
        {
            TwitterMessageRepository objretwt = new TwitterMessageRepository();
            string strArray = string.Empty;
            string str      = string.Empty;

            try
            {
                int       cnt     = 0;
                ArrayList alstTwt = objretwt.getMentionStatsByProfileId(profileId, days);

                if (alstTwt != null)
                {
                    //  strArray = "[";
                    for (int i = 0; i < alstTwt.Count; i++)
                    {
                        strArray = strArray + alstTwt[i].ToString() + ",";
                        cnt++;
                    }
                }
                if (cnt < 7)
                {
                    for (int j = 0; j < 7 - cnt; j++)
                    {
                        //strArray = strArray + "0,";
                        str += "0,";
                    }
                }
                //strArray = strArray.Substring(0, strArray.Length - 1);
                strArray = str + strArray;
                strArray = strArray.Substring(0, strArray.Length - 1);
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }
            return(strArray);
        }