Пример #1
0
        // Commented By Antima

        //public ActionResult TwitterFeeds(string profileid)
        //{
        //    List<object> lstobject = new List<object>();
        //    Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
        //    Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
        //    Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
        //    Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
        //    List<TwitterMessage> lstTwitterMessage = (List<TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessages(profileid, objGroups.UserId.ToString()), typeof(List<TwitterMessage>)));
        //    foreach (var twittermsg in lstTwitterMessage)
        //    {
        //        lstobject.Add(twittermsg);
        //    }
        //    dictwallposts.Add("twitter", lstobject);
        //    return PartialView("_Panel2Partial", dictwallposts);
        //}

        public ActionResult TwitterFeeds(string profileid, string load)
        {
            List <object> lstobject = new List <object>();

            if (load == "first")
            {
                Session["TwitterProfileIdForFeeds"] = profileid;
                twtfeedcount = 0;
            }
            else
            {
                profileid    = (string)Session["TwitterProfileIdForFeeds"];
                twtfeedcount = twtfeedcount + 10;
            }

            Dictionary <string, List <object> > dictwallposts = new Dictionary <string, List <object> >();

            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups   objGroups            = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List <TwitterMessage>             lstTwitterMessage    = (List <TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessages1(profileid, objGroups.UserId.ToString(), twtfeedcount), typeof(List <TwitterMessage>)));

            foreach (var twittermsg in lstTwitterMessage)
            {
                lstobject.Add(twittermsg);
            }
            dictwallposts.Add("twitter", lstobject);
            return(PartialView("_Panel2Partial", dictwallposts));
        }
        public async Task <ActionResult> BindTwitterMessage(string load, string arrid)
        {
            string TwitterProfiles = string.Empty;

            Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"];

            if (load == "first")
            {
                //Dictionary<Domain.Socioboard.Domain.TeamMemberProfile, object> allprofileofuser = await SBUtils.GetUserProfilesccordingToGroup();
                Dictionary <Domain.Socioboard.Domain.GroupProfile, object> allprofileofuser = await SBHelper.GetGroupProfiles();

                foreach (var item in allprofileofuser)
                {
                    try
                    {
                        if (item.Key.ProfileType == "twitter")
                        {
                            TwitterProfiles += item.Key.ProfileId + ',';
                        }
                    }
                    catch (Exception Err)
                    {
                        Console.Write(Err.StackTrace);
                    }
                }
                try
                {
                    TwitterProfiles = TwitterProfiles.Substring(0, (TwitterProfiles.Length - 1));
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
                twitterMessageCount = 0;
            }
            else if (load == "filter")
            {
                twitterMessageCount = 0;
                TwitterProfiles     = arrid;
            }
            else if (load == "scroll")
            {
                twitterMessageCount = twitterMessageCount + 10;
                TwitterProfiles     = arrid;
            }
            Api.TwitterMessage.TwitterMessage ApiTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List <Domain.Socioboard.MongoDomain.TwitterMessage> _lstTwitterMessage = (List <Domain.Socioboard.MongoDomain.TwitterMessage>) new JavaScriptSerializer().Deserialize(ApiTwitterMessage.GetTwitterFeedWithSentiments(TwitterProfiles, twitterMessageCount.ToString(), "10"), typeof(List <Domain.Socioboard.MongoDomain.TwitterMessage>));

            if (_lstTwitterMessage.Count > 0)
            {
                return(PartialView("_TwitterWallPartial", _lstTwitterMessage));
            }
            else
            {
                return(Content("no_data"));
            }
        }
Пример #3
0
        public ActionResult TwitterFeeds(string profileid)
        {
            List <object> lstobject = new List <object>();
            Dictionary <string, List <object> > dictwallposts = new Dictionary <string, List <object> >();

            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups   objGroups            = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List <TwitterMessage>             lstTwitterMessage    = (List <TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessages(profileid, objGroups.UserId.ToString()), typeof(List <TwitterMessage>)));

            foreach (var twittermsg in lstTwitterMessage)
            {
                lstobject.Add(twittermsg);
            }
            dictwallposts.Add("twitter", lstobject);
            return(PartialView("_Panel2Partial", dictwallposts));
        }
Пример #4
0
        public ActionResult TwitterMentions(string ProfileId)
        {
            List <object> lstobject = new List <object>();
            Dictionary <string, List <object> > dictMentions = new Dictionary <string, List <object> >();

            Api.Groups.Groups ApiobjGroups            = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));

            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List <TwitterMessage>             lstTwitterMentions   = (List <TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.getAllTwitterMentionsOfUsers(objGroups.UserId.ToString(), ProfileId), typeof(List <TwitterMessage>)));

            foreach (var twitterMentions in lstTwitterMentions)
            {
                lstobject.Add(twitterMentions);
            }
            dictMentions.Add("twitter", lstobject);
            return(PartialView("_Panel3Partial", dictMentions));
        }
Пример #5
0
        public ActionResult ShowMsgMailPopUp(string MsgId, string Network)
        {
            Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"];
            Dictionary <string, object>   twtinfo = new Dictionary <string, object>();

            Api.TwitterMessage.TwitterMessage   ApiobjTwitterMessage  = new Api.TwitterMessage.TwitterMessage();
            Api.FacebookMessage.FacebookMessage ApiobjFacebookMessage = new Api.FacebookMessage.FacebookMessage();
            if (Network == "twitter")
            {
                Domain.Socioboard.Domain.TwitterMessage twtmessage = (Domain.Socioboard.Domain.TwitterMessage)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessageByMessageId(objUser.Id.ToString(), MsgId), typeof(Domain.Socioboard.Domain.TwitterMessage)));
                twtinfo.Add("twt_msg", twtmessage);
            }
            else if (Network == "facebook")
            {
                Domain.Socioboard.Domain.FacebookMessage fbmessage = (Domain.Socioboard.Domain.FacebookMessage)(new JavaScriptSerializer().Deserialize(ApiobjFacebookMessage.GetFacebookMessageByMessageId(objUser.Id.ToString(), MsgId), typeof(Domain.Socioboard.Domain.FacebookMessage)));
                twtinfo.Add("fb_msg", fbmessage);
            }
            return(PartialView("_MailMsgSendingPartial", twtinfo));
            //return PartialView("_TwitterMailSendingPartial", twtfeed);
        }
Пример #6
0
        public DataSet bindMessagesIntoDataTable(Guid id, int noOfDataToSkip, Guid UserId)
        {
            Api.TeamMemberProfile.TeamMemberProfile objTeamMemberProfileRepository = new Api.TeamMemberProfile.TeamMemberProfile();
            List <TeamMemberProfile> alstprofiles = (List <Domain.Myfashion.Domain.TeamMemberProfile>) new JavaScriptSerializer().Deserialize(objTeamMemberProfileRepository.GetTeamMemberProfilesByTeamId(id.ToString()), typeof(List <Domain.Myfashion.Domain.TeamMemberProfile>));

            Api.FacebookFeed.FacebookFeed     objApiFacebookFeed   = new Api.FacebookFeed.FacebookFeed();
            Api.TwitterMessage.TwitterMessage objApiTwitterMessage = new Api.TwitterMessage.TwitterMessage();

            Messages mstable = new Messages();

            DataSet ds = DataTableGenerator.CreateDataSetForTable(mstable);

            foreach (TeamMemberProfile item in alstprofiles)
            {
                try
                {
                    if (item.ProfileType == "facebook")
                    {
                        //List<Domain.Myfashion.Domain.FacebookFeed> alstfeedfb = (List<Domain.Myfashion.Domain.FacebookFeed>)new JavaScriptSerializer().Deserialize(objApiFacebookFeed.getUnreadMessages(item.ProfileId), typeof(List<Domain.Myfashion.Domain.FacebookFeed>)); ;

                        //foreach (FacebookFeed facebookmsg in alstfeedfb)
                        //{
                        //    ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.FeedDate, facebookmsg.FeedDescription, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.FeedId, facebookmsg.Type, facebookmsg.ReadStatus);
                        //}

                        //Updated by SumitGupta [09-02-2015]
                        //List<FacebookMessage> lstfbmsg = (List<FacebookMessage>)new JavaScriptSerializer().Deserialize(objApiFacebookMessage.getAllFacebookMessagesOfUserByProfileId(item.ProfileId), typeof(List<FacebookMessage>));
                        List <FacebookMessage> lstfbmsg = (List <FacebookMessage>) new JavaScriptSerializer().Deserialize(objApiFacebookMessage.getAllFacebookMessagesOfUserByProfileIdWithRange(item.ProfileId, noOfDataToSkip.ToString(), UserId.ToString()), typeof(List <FacebookMessage>));
                        foreach (FacebookMessage facebookmsg in lstfbmsg)
                        {
                            try
                            {
                                ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.MessageDate, facebookmsg.Message, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.MessageId, facebookmsg.Type, 1);
                            }
                            catch (Exception ex)
                            {
                                logger.Error("Exception Message : " + ex.Message);
                                logger.Error("Exception Message : " + ex.StackTrace);
                            }
                        }
                    }
                    else if (item.ProfileType == "twitter")
                    {
                        //List<Domain.Myfashion.Domain.TwitterMessage> lstmsgtwtuser = (List<TwitterMessage>)new JavaScriptSerializer().Deserialize(objApiTwitterMessage.getUnreadMessages(item.ProfileId), typeof(List<Domain.Myfashion.Domain.TwitterMessage>));
                        //List<Domain.Myfashion.Domain.TwitterMessage> lstmsgtwtuser = (List<TwitterMessage>)new JavaScriptSerializer().Deserialize(objApiTwitterMessage.GetTwitterMessages(item.ProfileId, UserId.ToString()), typeof(List<Domain.Myfashion.Domain.TwitterMessage>));
                        List <Domain.Myfashion.Domain.TwitterMessage> lstmsgtwtuser = (List <TwitterMessage>) new JavaScriptSerializer().Deserialize(objApiTwitterMessage.getAllTwitterkMessagesOfUserByProfileIdWithRange(UserId.ToString(), item.ProfileId, noOfDataToSkip.ToString()), typeof(List <Domain.Myfashion.Domain.TwitterMessage>));


                        foreach (TwitterMessage lst in lstmsgtwtuser)
                        {
                            try
                            {
                                ds.Tables[0].Rows.Add(lst.ProfileId, "twitter", lst.FromId, lst.FromScreenName, lst.FromProfileUrl, lst.MessageDate, lst.TwitterMsg, "", "", lst.MessageId, lst.Type, lst.ReadStatus);
                            }
                            catch (Exception ex)
                            {
                                logger.Error("Exception Message : " + ex.Message);
                                logger.Error("Exception Message : " + ex.StackTrace);
                            }
                        }
                    }
                    else if (item.ProfileType == "googleplus")
                    {
                    }
                }
                catch (Exception ex)
                {
                    logger.Error("Exception Message : " + ex.Message);
                    logger.Error("Exception Message : " + ex.StackTrace);
                }
            }
            foreach (TeamMemberProfile item in alstprofiles)
            {
                if (item.ProfileType == "facebook")
                {
                    try
                    {
                        facebookid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
                else if (item.ProfileType == "twitter")
                {
                    try
                    {
                        twitterid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
                else if (item.ProfileType == "googleplus")
                {
                    try
                    {
                        googleplusid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
            }
            if (facebookid != "")
            {
                facebookid = facebookid.Substring(0, facebookid.Length - 1);
            }
            if (twitterid != "")
            {
                twitterid = twitterid.Substring(0, twitterid.Length - 1);
            }
            if (googleplusid != "")
            {
                googleplusid = googleplusid.Substring(0, googleplusid.Length - 1);
            }

            // suraj===============================================================================
            //List<FacebookFeed> alstfbmsgs = (List<FacebookFeed>)new JavaScriptSerializer().Deserialize(objApiFacebookFeed.getAllReadFbFeeds(facebookid), typeof(List<FacebookFeed>));

            //try
            //{
            //    foreach (FacebookFeed facebookmsg in alstfbmsgs)
            //    {
            //        try
            //        {
            //            ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.FeedDate, facebookmsg.FeedDescription, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.FeedId, facebookmsg.Type, facebookmsg.ReadStatus);
            //        }
            //        catch (Exception ex)
            //        {
            //            Console.WriteLine(ex.StackTrace);
            //        }
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Console.WriteLine(ex.StackTrace);
            //}

            //===============================================================================


            List <TwitterMessage> lstmsgtwt = (List <TwitterMessage>) new JavaScriptSerializer().Deserialize(objApiTwitterMessage.getAlltwtMessagesOfUser(twitterid), typeof(List <TwitterMessage>));

            try
            {
                foreach (TwitterMessage lst in lstmsgtwt)
                {
                    try
                    {
                        ds.Tables[0].Rows.Add(lst.ProfileId, "twitter", lst.FromId, lst.FromScreenName, lst.FromProfileUrl, lst.MessageDate, lst.TwitterMsg, "", "", lst.MessageId, lst.Type, lst.ReadStatus);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }



            #region Commented G+ code, to be used later
            //GooglePlusActivitiesRepository objActRepository = new GooglePlusActivitiesRepository();
            //List<GooglePlusActivities> lstmsggpl = objActRepository.getAllgplusOfUser(googleplusid);
            //try
            //{
            //    foreach (GooglePlusActivities lst in lstmsggpl)
            //    {
            //        try
            //        {
            //            ds.Tables[0].Rows.Add(lst.GpUserId, "googleplus", lst.FromId, lst.FromUserName, lst.FromProfileImage, lst.PublishedDate, lst.Content, "", "", lst.ActivityId, "activities");
            //        }
            //        catch (Exception ex)
            //        {
            //            Console.WriteLine(ex.StackTrace);
            //        }
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Console.WriteLine(ex.StackTrace);
            //}
            #endregion

            return(ds);
        }
Пример #7
0
        public ActionResult TwitterMentions(string ProfileId)
        {
            List<object> lstobject = new List<object>();
            Dictionary<string, List<object>> dictMentions = new Dictionary<string, List<object>>();
            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));

            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List<Domain.Socioboard.MongoDomain.TwitterMessage> lstTwitterMentions = (List<Domain.Socioboard.MongoDomain.TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.getAllTwitterMentionsOfUsers(objGroups.UserId.ToString(), ProfileId), typeof(List<Domain.Socioboard.MongoDomain.TwitterMessage>)));
            foreach (var twitterMentions in lstTwitterMentions)
            {
                lstobject.Add(twitterMentions);
            }
            dictMentions.Add("twitter", lstobject);
            return PartialView("_Panel3Partial", dictMentions);
        }
Пример #8
0
        public ActionResult TwitterFeeds(string profileid, string load)
        {
            string datetime = Helper.Extensions.ToClientTime(DateTime.UtcNow);
            //string datetime = Request.Form["localtime"].ToString();
            ViewBag.datetime = datetime;
            List<object> lstobject = new List<object>();
            if (load == "first")
            {
                Session["TwitterProfileIdForFeeds"] = profileid;
                twtfeedcount = 0;
            }
            else
            {
                profileid = (string)Session["TwitterProfileIdForFeeds"];
                twtfeedcount = twtfeedcount + 10;
            }

            Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List<Domain.Socioboard.MongoDomain.TwitterMessage> lstTwitterMessage = (List<Domain.Socioboard.MongoDomain.TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessages1(profileid, objGroups.UserId.ToString(), twtfeedcount), typeof(List<Domain.Socioboard.MongoDomain.TwitterMessage>)));
            foreach (var twittermsg in lstTwitterMessage)
            {
                lstobject.Add(twittermsg);
            }
            dictwallposts.Add("twitter", lstobject);
            if (lstTwitterMessage.Count > 0)
            {
                return PartialView("_Panel2Partial", dictwallposts);
            }
            else
            {
                return Content("no_data");
            }
        }
Пример #9
0
        public static TwitterReportDetail GetTwitterReportData(string twtProfileId, int days)
        {
            User objUser = (User)System.Web.HttpContext.Current.Session["User"];

            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            ApiobjTwitterMessage.Timeout = 300000;
            Api.TwitterStats.TwitterStats ApiobjTwitterStats = new Api.TwitterStats.TwitterStats();
            ApiobjTwitterStats.Timeout = 300000;
            List<TwitterStatsReport> _TwitterStats = (List<TwitterStatsReport>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterStats.GetAllTwitterStatsDetails(twtProfileId, objUser.Id.ToString(), days.ToString()), typeof(List<TwitterStatsReport>)));
            TwitterReportDetail _TwitterReportDetail = new TwitterReportDetail() { lstTwitterStats = _TwitterStats };

            return _TwitterReportDetail;
        }
Пример #10
0
        public ActionResult DisplayCount()
        {
            string AllProfileId    = string.Empty;
            string FbProfileId     = string.Empty;
            string TwtProfileId    = string.Empty;
            int    fbmsgcount      = 0;
            int    twtmsgcount     = 0;
            int    allsentmsgcount = 0;
            User   objUser         = (User)Session["User"];
            Dictionary <Domain.Myfashion.Domain.TeamMemberProfile, object> allprofileofuser = SBUtils.GetUserProfilesccordingToGroup();

            foreach (var item in allprofileofuser)
            {
                try
                {
                    if (item.Key.ProfileType == "facebook" || item.Key.ProfileType == "facebook_page")
                    {
                        FbProfileId += item.Key.ProfileId + ',';
                    }
                    else if (item.Key.ProfileType == "twitter")
                    {
                        TwtProfileId += item.Key.ProfileId + ',';
                    }
                    AllProfileId += item.Key.ProfileId + ',';
                }
                catch (Exception Err)
                {
                    Console.Write(Err.StackTrace);
                }
            }
            try
            {
                FbProfileId = FbProfileId.Substring(0, FbProfileId.Length - 1);
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }

            try
            {
                TwtProfileId = TwtProfileId.Substring(0, TwtProfileId.Length - 1);
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }
            try
            {
                AllProfileId = AllProfileId.Substring(0, AllProfileId.Length - 1);
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }
            try
            {
                Api.FacebookFeed.FacebookFeed objFacebookFeed = new Api.FacebookFeed.FacebookFeed();
                objFacebookFeed.Timeout = 300000;
                fbmsgcount = objFacebookFeed.GetFeedCountByProfileIdAndUserId(objUser.Id.ToString(), FbProfileId);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                Api.TwitterMessage.TwitterMessage objTwitterMessage = new Api.TwitterMessage.TwitterMessage();
                objTwitterMessage.Timeout = 300000;
                twtmsgcount = objTwitterMessage.GetFeedCountByProfileIdAndUserId(objUser.Id.ToString(), FbProfileId);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                Api.ScheduledMessage.ScheduledMessage objScheduledMessage = new Api.ScheduledMessage.ScheduledMessage();
                objScheduledMessage.Timeout = 300000;
                allsentmsgcount             = objScheduledMessage.GetSentMessageCountByProfileIdAndUserId(objUser.Id.ToString(), FbProfileId);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            string _totalIncomingMessage  = "0";
            string _totalSentMessage      = "0";
            string _totalTwitterFollowers = "0";
            string _totalFacebookFan      = "0";

            try
            {
                _totalIncomingMessage = (fbmsgcount + twtmsgcount).ToString();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                _totalSentMessage = allsentmsgcount.ToString();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                _totalTwitterFollowers = SBUtils.GetAllTwitterFollowersCountofUser(TwtProfileId, objUser.Id.ToString());
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                _totalFacebookFan = SBUtils.GetAllFacebookFancountofUser(FbProfileId, objUser.Id.ToString());
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }

            ViewBag._totalIncomingMessage  = _totalIncomingMessage;
            ViewBag._totalSentMessage      = _totalSentMessage;
            ViewBag._totalTwitterFollowers = _totalTwitterFollowers;
            ViewBag._totalFacebookFan      = _totalFacebookFan;
            return(PartialView("_HomeUserActivityPartial"));
        }
Пример #11
0
        public ActionResult DisplayCount()
        {
            string AllProfileId    = string.Empty;
            string FbProfileId     = string.Empty;
            string TwtProfileId    = string.Empty;
            int    fbmsgcount      = 0;
            int    twtmsgcount     = 0;
            int    allsentmsgcount = 0;
            User   objUser         = (User)Session["User"];
            Dictionary <Domain.Socioboard.Domain.TeamMemberProfile, object> allprofileofuser = SBUtils.GetUserProfilesccordingToGroup();

            foreach (var item in allprofileofuser)
            {
                try
                {
                    //Domain.Socioboard.Domain.TeamMemberProfile item = (Domain.Socioboard.Domain.TeamMemberProfile)(profile.Value);
                    if (item.Key.ProfileType == "facebook" || item.Key.ProfileType == "facebook_page")
                    {
                        FbProfileId += item.Key.ProfileId + ',';
                    }
                    else if (item.Key.ProfileType == "twitter")
                    {
                        TwtProfileId += item.Key.ProfileId + ',';
                    }
                    AllProfileId += item.Key.ProfileId + ',';
                }
                catch (Exception Err)
                {
                    Console.Write(Err.StackTrace);
                }
            }
            try
            {
                FbProfileId = FbProfileId.Substring(0, FbProfileId.Length - 1);
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }

            try
            {
                TwtProfileId = TwtProfileId.Substring(0, TwtProfileId.Length - 1);
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }
            try
            {
                AllProfileId = AllProfileId.Substring(0, AllProfileId.Length - 1);
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }
            try
            {
                Api.FacebookFeed.FacebookFeed objFacebookFeed = new Api.FacebookFeed.FacebookFeed();
                //fbmsgcount = ((List<FacebookFeed>)(new JavaScriptSerializer().Deserialize(objFacebookFeed.getAllFeedDetail1(FbProfileId, objUser.Id.ToString()), typeof(List<FacebookFeed>)))).Count;
                fbmsgcount = objFacebookFeed.GetFeedCountByProfileIdAndUserId(objUser.Id.ToString(), FbProfileId);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                Api.TwitterMessage.TwitterMessage objTwitterMessage = new Api.TwitterMessage.TwitterMessage();
                //twtmsgcount = ((List<TwitterMessage>)(new JavaScriptSerializer().Deserialize(objTwitterMessage.getAlltwtMessages1(TwtProfileId, objUser.Id.ToString()), typeof(List<TwitterMessage>)))).Count;
                twtmsgcount = objTwitterMessage.GetFeedCountByProfileIdAndUserId(objUser.Id.ToString(), FbProfileId);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                Api.ScheduledMessage.ScheduledMessage objScheduledMessage = new Api.ScheduledMessage.ScheduledMessage();
                //allsentmsgcount = ((List<ScheduledMessage>)(new JavaScriptSerializer().Deserialize(objScheduledMessage.getAllSentMessageDetails(AllProfileId, objUser.Id.ToString()), typeof(List<ScheduledMessage>)))).Count;
                allsentmsgcount = objScheduledMessage.GetSentMessageCountByProfileIdAndUserId(objUser.Id.ToString(), FbProfileId);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            string _totalIncomingMessage  = (fbmsgcount + twtmsgcount).ToString();
            string _totalSentMessage      = allsentmsgcount.ToString();
            string _totalTwitterFollowers = SBUtils.GetAllTwitterFollowersCountofUser(TwtProfileId, objUser.Id.ToString());
            string _totalFacebookFan      = SBUtils.GetAllFacebookFancountofUser(FbProfileId, objUser.Id.ToString());

            ViewBag._totalIncomingMessage  = _totalIncomingMessage;
            ViewBag._totalSentMessage      = _totalSentMessage;
            ViewBag._totalTwitterFollowers = _totalTwitterFollowers;
            ViewBag._totalFacebookFan      = _totalFacebookFan;
            return(PartialView("_HomeUserActivityPartial"));
        }
        //Added by Sumit Gupta[15-02-2015]
        //[OutputCache(Duration = 45, Location = OutputCacheLocation.Client, NoStore = true)]
        public ActionResult AddLoadNewTwitterFeeds(string profileid)
        {
            string datetime = Helper.Extensions.ToClientTime(DateTime.UtcNow);
            //string datetime = Request.Form["localtime"].ToString();
            ViewBag.datetime = datetime;
            List<object> lstobject = new List<object>();

            Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List<TwitterMessage> lstTwitterMessage = (List<TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessages1(profileid, objGroups.UserId.ToString(), twtfeedcount), typeof(List<TwitterMessage>)));
            foreach (var twittermsg in lstTwitterMessage)
            {
                lstobject.Add(twittermsg);
            }
            dictwallposts.Add("twitter", lstobject);

            return PartialView("_Panel2Partial", dictwallposts);
        }
Пример #13
0
        public ActionResult TwitterUserTweet_FeedsSearch(string ProfileId, string keyword)
        {
            List<object> lstobject = new List<object>();
            Dictionary<string, List<object>> dictUserTweet = new Dictionary<string, List<object>>();
            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));

            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List<TwitterMessage> lstTwitterUsertweet = (List<TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.getAllTwitterUsertweetOfUsersByKeyword(objGroups.UserId.ToString(), ProfileId, keyword), typeof(List<TwitterMessage>)));
            foreach (var twitterUsertweet in lstTwitterUsertweet)
            {
                lstobject.Add(twitterUsertweet);
            }
            dictUserTweet.Add("twitter", lstobject);
            return PartialView("_Panel3Partial", dictUserTweet);
        }
Пример #14
0
        // Commented By Antima

        //public ActionResult TwitterFeeds(string profileid)
        //{
        //    List<object> lstobject = new List<object>();
        //    Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
        //    Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
        //    Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
        //    Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
        //    List<TwitterMessage> lstTwitterMessage = (List<TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessages(profileid, objGroups.UserId.ToString()), typeof(List<TwitterMessage>)));
        //    foreach (var twittermsg in lstTwitterMessage)
        //    {
        //        lstobject.Add(twittermsg);
        //    }
        //    dictwallposts.Add("twitter", lstobject);
        //    return PartialView("_Panel2Partial", dictwallposts);
        //}

        public ActionResult TwitterFeeds(string profileid, string load)
        {
            List<object> lstobject = new List<object>();
            if (load == "first")
            {
                Session["TwitterProfileIdForFeeds"] = profileid;
                twtfeedcount = 0;
            }
            else
            {
                profileid = (string)Session["TwitterProfileIdForFeeds"];
                twtfeedcount = twtfeedcount + 10;
            }

            Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List<TwitterMessage> lstTwitterMessage = (List<TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessages1(profileid, objGroups.UserId.ToString(), twtfeedcount), typeof(List<TwitterMessage>)));
            foreach (var twittermsg in lstTwitterMessage)
            {
                lstobject.Add(twittermsg);
            }
            dictwallposts.Add("twitter", lstobject);
            return PartialView("_Panel2Partial", dictwallposts);
        }
Пример #15
0
        public DataSet bindMessagesIntoDataTable(Guid id)
        {
            //SocialProfilesRepository socioprofrepo = new SocialProfilesRepository();
            //List<SocialProfile> alstprofiles = socioprofrepo.getAllSocialProfilesOfUser(user.Id);

            //TeamMemberProfileRepository objTeamMemberProfileRepository = new TeamMemberProfileRepository();
            //List<TeamMemberProfile> alstprofiles = objTeamMemberProfileRepository.getAllTeamMemberProfilesOfTeam(id);
            Api.TeamMemberProfile.TeamMemberProfile objTeamMemberProfileRepository = new Api.TeamMemberProfile.TeamMemberProfile();
            List <TeamMemberProfile> alstprofiles = (List <Domain.Socioboard.Domain.TeamMemberProfile>) new JavaScriptSerializer().Deserialize(objTeamMemberProfileRepository.GetTeamMemberProfilesByTeamId(id.ToString()), typeof(List <Domain.Socioboard.Domain.TeamMemberProfile>));

            Api.FacebookFeed.FacebookFeed objApiFacebookFeed = new Api.FacebookFeed.FacebookFeed();

            Api.TwitterMessage.TwitterMessage objApiTwitterMessage = new Api.TwitterMessage.TwitterMessage();

            // DataTableGenerator datatablegenerepo = new DataTableGenerator();
            Messages mstable = new Messages();
            DataSet  ds      = DataTableGenerator.CreateDataSetForTable(mstable);

            //  DataSet ds = datatablegenerepo.CreateDataSetForTable(mstable);

            foreach (TeamMemberProfile item in alstprofiles)
            {
                if (item.ProfileType == "facebook")
                {
                    ////FacebookFeedRepository fbfeedRepo = new FacebookFeedRepository();
                    //Api.FacebookFeed.FacebookFeed objApiFacebookFeed = new Api.FacebookFeed.FacebookFeed();

                    //List<FacebookFeed> alstfeedfb = fbfeedRepo.getUnreadMessages(item.ProfileId);
                    List <Domain.Socioboard.Domain.FacebookFeed> alstfeedfb = (List <Domain.Socioboard.Domain.FacebookFeed>) new JavaScriptSerializer().Deserialize(objApiFacebookFeed.getUnreadMessages(item.ProfileId), typeof(List <Domain.Socioboard.Domain.FacebookFeed>));;

                    foreach (FacebookFeed facebookmsg in alstfeedfb)
                    {
                        ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.FeedDate, facebookmsg.FeedDescription, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.FeedId, facebookmsg.Type, facebookmsg.ReadStatus);
                    }
                }
                else if (item.ProfileType == "twitter")
                {
                    ////TwitterMessageRepository twtmsgrepo = new TwitterMessageRepository();
                    //Api.TwitterMessage.TwitterMessage objApiTwitterMessage = new Api.TwitterMessage.TwitterMessage();
                    List <Domain.Socioboard.Domain.TwitterMessage> lstmsgtwtuser = (List <TwitterMessage>) new JavaScriptSerializer().Deserialize(objApiTwitterMessage.getUnreadMessages(item.ProfileId), typeof(List <Domain.Socioboard.Domain.TwitterMessage>));

                    foreach (TwitterMessage lst in lstmsgtwtuser)
                    {
                        ds.Tables[0].Rows.Add(lst.ProfileId, "twitter", lst.FromId, lst.FromScreenName, lst.FromProfileUrl, lst.MessageDate, lst.TwitterMsg, "", "", lst.MessageId, lst.Type, lst.ReadStatus);
                    }
                }
                else if (item.ProfileType == "googleplus")
                {
                }
            }


            foreach (TeamMemberProfile item in alstprofiles)
            {
                if (item.ProfileType == "facebook")
                {
                    try
                    {
                        //FacebookFeedRepository fbfeedrepo = new FacebookFeedRepository();
                        //List<FacebookFeed> alstfbmsgs = fbfeedrepo.getAllReadFacebookFeeds(user.Id, item.ProfileId);
                        //foreach (FacebookFeed facebookmsg in alstfbmsgs)
                        //{
                        //    ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.FeedDate, facebookmsg.FeedDescription, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.FeedId, facebookmsg.Type,facebookmsg.ReadStatus);
                        //}
                        facebookid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
                else if (item.ProfileType == "twitter")
                {
                    try
                    {
                        //TwitterMessageRepository twtmsgrepo = new TwitterMessageRepository();
                        //List<TwitterMessage> lstmsgtwtuser = twtmsgrepo.getAllReadMessagesOfUser(user.Id, item.ProfileId);
                        //foreach (TwitterMessage lst in lstmsgtwtuser)
                        //{
                        //    ds.Tables[0].Rows.Add(lst.ProfileId, "twitter", lst.FromId, lst.FromScreenName, lst.FromProfileUrl, lst.MessageDate, lst.TwitterMsg, "", "", lst.MessageId, lst.Type,lst.ReadStatus);
                        //}
                        twitterid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
                else if (item.ProfileType == "googleplus")
                {
                    try
                    {
                        //GooglePlusActivitiesRepository objActRepo = new GooglePlusActivitiesRepository();
                        //List<GooglePlusActivities> lstmsggauser = objActRepo.getAllgoogleplusActivityOfUser(user.Id, item.ProfileId);
                        //foreach (GooglePlusActivities lst in lstmsggauser)
                        //{
                        //    ds.Tables[0].Rows.Add(lst.GpUserId, "googleplus", lst.FromId, lst.FromUserName, lst.FromProfileImage, lst.PublishedDate, lst.Content, "", "", lst.ActivityId, "activities");
                        //}
                        googleplusid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
            }
            if (facebookid != "")
            {
                facebookid = facebookid.Substring(0, facebookid.Length - 1);
            }
            if (twitterid != "")
            {
                twitterid = twitterid.Substring(0, twitterid.Length - 1);
            }
            if (googleplusid != "")
            {
                googleplusid = googleplusid.Substring(0, googleplusid.Length - 1);
            }

            //FacebookFeedRepository fbfeedRepository = new FacebookFeedRepository();
            //List<FacebookFeed> alstfbmsgs = fbfeedRepository.getAllReadFbFeeds(facebookid);
            List <FacebookFeed> alstfbmsgs = (List <FacebookFeed>) new JavaScriptSerializer().Deserialize(objApiFacebookFeed.getAllReadFbFeeds(facebookid), typeof(List <FacebookFeed>));

            try
            {
                foreach (FacebookFeed facebookmsg in alstfbmsgs)
                {
                    try
                    {
                        ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.FeedDate, facebookmsg.FeedDescription, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.FeedId, facebookmsg.Type, facebookmsg.ReadStatus);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }



            //TwitterMessageRepository twtmsgRepository = new TwitterMessageRepository();
            //List<TwitterMessage> lstmsgtwt = twtmsgRepository.getAlltwtMessagesOfUser(twitterid);
            List <TwitterMessage> lstmsgtwt = (List <TwitterMessage>) new JavaScriptSerializer().Deserialize(objApiTwitterMessage.getAlltwtMessagesOfUser(twitterid), typeof(List <TwitterMessage>));

            try
            {
                foreach (TwitterMessage lst in lstmsgtwt)
                {
                    try
                    {
                        ds.Tables[0].Rows.Add(lst.ProfileId, "twitter", lst.FromId, lst.FromScreenName, lst.FromProfileUrl, lst.MessageDate, lst.TwitterMsg, "", "", lst.MessageId, lst.Type, lst.ReadStatus);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }



            #region Commented G+ code, to be used later
            //GooglePlusActivitiesRepository objActRepository = new GooglePlusActivitiesRepository();
            //List<GooglePlusActivities> lstmsggpl = objActRepository.getAllgplusOfUser(googleplusid);
            //try
            //{
            //    foreach (GooglePlusActivities lst in lstmsggpl)
            //    {
            //        try
            //        {
            //            ds.Tables[0].Rows.Add(lst.GpUserId, "googleplus", lst.FromId, lst.FromUserName, lst.FromProfileImage, lst.PublishedDate, lst.Content, "", "", lst.ActivityId, "activities");
            //        }
            //        catch (Exception ex)
            //        {
            //            Console.WriteLine(ex.StackTrace);
            //        }
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Console.WriteLine(ex.StackTrace);
            //}
            #endregion

            return(ds);
        }
        public DataSet bindMessagesIntoDataTable(Guid id, int noOfDataToSkip, Guid UserId)
        {
            Api.TeamMemberProfile.TeamMemberProfile objTeamMemberProfileRepository = new Api.TeamMemberProfile.TeamMemberProfile();
            List<TeamMemberProfile> alstprofiles = (List<Domain.Myfashion.Domain.TeamMemberProfile>)new JavaScriptSerializer().Deserialize(objTeamMemberProfileRepository.GetTeamMemberProfilesByTeamId(id.ToString()), typeof(List<Domain.Myfashion.Domain.TeamMemberProfile>));
            Api.FacebookFeed.FacebookFeed objApiFacebookFeed = new Api.FacebookFeed.FacebookFeed();
            Api.TwitterMessage.TwitterMessage objApiTwitterMessage = new Api.TwitterMessage.TwitterMessage();

            Messages mstable = new Messages();

            DataSet ds = DataTableGenerator.CreateDataSetForTable(mstable);

            foreach (TeamMemberProfile item in alstprofiles)
            {
                try
                {
                    if (item.ProfileType == "facebook")
                    {
                        //List<Domain.Myfashion.Domain.FacebookFeed> alstfeedfb = (List<Domain.Myfashion.Domain.FacebookFeed>)new JavaScriptSerializer().Deserialize(objApiFacebookFeed.getUnreadMessages(item.ProfileId), typeof(List<Domain.Myfashion.Domain.FacebookFeed>)); ;

                        //foreach (FacebookFeed facebookmsg in alstfeedfb)
                        //{
                        //    ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.FeedDate, facebookmsg.FeedDescription, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.FeedId, facebookmsg.Type, facebookmsg.ReadStatus);
                        //}

                        //Updated by SumitGupta [09-02-2015]
                        //List<FacebookMessage> lstfbmsg = (List<FacebookMessage>)new JavaScriptSerializer().Deserialize(objApiFacebookMessage.getAllFacebookMessagesOfUserByProfileId(item.ProfileId), typeof(List<FacebookMessage>));
                        List<FacebookMessage> lstfbmsg = (List<FacebookMessage>)new JavaScriptSerializer().Deserialize(objApiFacebookMessage.getAllFacebookMessagesOfUserByProfileIdWithRange(item.ProfileId, noOfDataToSkip.ToString(), UserId.ToString()), typeof(List<FacebookMessage>));
                        foreach (FacebookMessage facebookmsg in lstfbmsg)
                        {
                            try
                            {
                                ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.MessageDate, facebookmsg.Message, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.MessageId, facebookmsg.Type, 1);
                            }
                            catch (Exception ex)
                            {
                                logger.Error("Exception Message : " + ex.Message);
                                logger.Error("Exception Message : " + ex.StackTrace);
                            }
                        }

                    }
                    else if (item.ProfileType == "twitter")
                    {
                        
                        //List<Domain.Myfashion.Domain.TwitterMessage> lstmsgtwtuser = (List<TwitterMessage>)new JavaScriptSerializer().Deserialize(objApiTwitterMessage.getUnreadMessages(item.ProfileId), typeof(List<Domain.Myfashion.Domain.TwitterMessage>));
                        //List<Domain.Myfashion.Domain.TwitterMessage> lstmsgtwtuser = (List<TwitterMessage>)new JavaScriptSerializer().Deserialize(objApiTwitterMessage.GetTwitterMessages(item.ProfileId, UserId.ToString()), typeof(List<Domain.Myfashion.Domain.TwitterMessage>));
                        List<Domain.Myfashion.Domain.TwitterMessage> lstmsgtwtuser = (List<TwitterMessage>)new JavaScriptSerializer().Deserialize(objApiTwitterMessage.getAllTwitterkMessagesOfUserByProfileIdWithRange(UserId.ToString(), item.ProfileId, noOfDataToSkip.ToString()), typeof(List<Domain.Myfashion.Domain.TwitterMessage>));


                        foreach (TwitterMessage lst in lstmsgtwtuser)
                        {
                            try
                            {
                                ds.Tables[0].Rows.Add(lst.ProfileId, "twitter", lst.FromId, lst.FromScreenName, lst.FromProfileUrl, lst.MessageDate, lst.TwitterMsg, "", "", lst.MessageId, lst.Type, lst.ReadStatus);
                            }
                            catch (Exception ex)
                            {
                                logger.Error("Exception Message : " + ex.Message);
                                logger.Error("Exception Message : " + ex.StackTrace);
                            }
                        }
                    }
                    else if (item.ProfileType == "googleplus")
                    {

                    }
                }
                catch (Exception ex)
                {
                    logger.Error("Exception Message : " + ex.Message);
                    logger.Error("Exception Message : " + ex.StackTrace);
                }
            }
            foreach (TeamMemberProfile item in alstprofiles)
            {
                if (item.ProfileType == "facebook")
                {
                    try
                    {

                        facebookid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
                else if (item.ProfileType == "twitter")
                {
                    try
                    {

                        twitterid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
                else if (item.ProfileType == "googleplus")
                {
                    try
                    {

                        googleplusid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }

            }
            if (facebookid != "")
            {
                facebookid = facebookid.Substring(0, facebookid.Length - 1);
            }
            if (twitterid != "")
            {
                twitterid = twitterid.Substring(0, twitterid.Length - 1);
            }
            if (googleplusid != "")
            {
                googleplusid = googleplusid.Substring(0, googleplusid.Length - 1);
            }

            // suraj===============================================================================
            //List<FacebookFeed> alstfbmsgs = (List<FacebookFeed>)new JavaScriptSerializer().Deserialize(objApiFacebookFeed.getAllReadFbFeeds(facebookid), typeof(List<FacebookFeed>));

            //try
            //{
            //    foreach (FacebookFeed facebookmsg in alstfbmsgs)
            //    {
            //        try
            //        {
            //            ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.FeedDate, facebookmsg.FeedDescription, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.FeedId, facebookmsg.Type, facebookmsg.ReadStatus);
            //        }
            //        catch (Exception ex)
            //        {
            //            Console.WriteLine(ex.StackTrace);
            //        }
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Console.WriteLine(ex.StackTrace);
            //}

            //===============================================================================


            List<TwitterMessage> lstmsgtwt = (List<TwitterMessage>)new JavaScriptSerializer().Deserialize(objApiTwitterMessage.getAlltwtMessagesOfUser(twitterid), typeof(List<TwitterMessage>));

            try
            {
                foreach (TwitterMessage lst in lstmsgtwt)
                {
                    try
                    {
                        ds.Tables[0].Rows.Add(lst.ProfileId, "twitter", lst.FromId, lst.FromScreenName, lst.FromProfileUrl, lst.MessageDate, lst.TwitterMsg, "", "", lst.MessageId, lst.Type, lst.ReadStatus);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }



            #region Commented G+ code, to be used later
            //GooglePlusActivitiesRepository objActRepository = new GooglePlusActivitiesRepository();
            //List<GooglePlusActivities> lstmsggpl = objActRepository.getAllgplusOfUser(googleplusid);
            //try
            //{
            //    foreach (GooglePlusActivities lst in lstmsggpl)
            //    {
            //        try
            //        {
            //            ds.Tables[0].Rows.Add(lst.GpUserId, "googleplus", lst.FromId, lst.FromUserName, lst.FromProfileImage, lst.PublishedDate, lst.Content, "", "", lst.ActivityId, "activities");
            //        }
            //        catch (Exception ex)
            //        {
            //            Console.WriteLine(ex.StackTrace);
            //        }
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Console.WriteLine(ex.StackTrace);
            //} 
            #endregion

            return ds;
        }
        public DataSet bindMessagesIntoDataTable(Guid id)
        {
            //SocialProfilesRepository socioprofrepo = new SocialProfilesRepository();
            //List<SocialProfile> alstprofiles = socioprofrepo.getAllSocialProfilesOfUser(user.Id);

            //TeamMemberProfileRepository objTeamMemberProfileRepository = new TeamMemberProfileRepository();
            //List<TeamMemberProfile> alstprofiles = objTeamMemberProfileRepository.getAllTeamMemberProfilesOfTeam(id);
            Api.TeamMemberProfile.TeamMemberProfile objTeamMemberProfileRepository = new Api.TeamMemberProfile.TeamMemberProfile();
            List<TeamMemberProfile> alstprofiles = (List<Domain.Socioboard.Domain.TeamMemberProfile>)new JavaScriptSerializer().Deserialize(objTeamMemberProfileRepository.GetTeamMemberProfilesByTeamId(id.ToString()), typeof(List<Domain.Socioboard.Domain.TeamMemberProfile>));

            Api.FacebookFeed.FacebookFeed objApiFacebookFeed = new Api.FacebookFeed.FacebookFeed();

            Api.TwitterMessage.TwitterMessage objApiTwitterMessage = new Api.TwitterMessage.TwitterMessage();

            // DataTableGenerator datatablegenerepo = new DataTableGenerator();
            Messages mstable = new Messages();
            DataSet ds = DataTableGenerator.CreateDataSetForTable(mstable);
            //  DataSet ds = datatablegenerepo.CreateDataSetForTable(mstable);

            foreach (TeamMemberProfile item in alstprofiles)
            {
                if (item.ProfileType == "facebook")
                {
                    ////FacebookFeedRepository fbfeedRepo = new FacebookFeedRepository();
                    //Api.FacebookFeed.FacebookFeed objApiFacebookFeed = new Api.FacebookFeed.FacebookFeed();

                    //List<FacebookFeed> alstfeedfb = fbfeedRepo.getUnreadMessages(item.ProfileId);
                    List<Domain.Socioboard.Domain.FacebookFeed> alstfeedfb = (List<Domain.Socioboard.Domain.FacebookFeed>)new JavaScriptSerializer().Deserialize(objApiFacebookFeed.getUnreadMessages(item.ProfileId), typeof(List<Domain.Socioboard.Domain.FacebookFeed>)); ;

                    foreach (FacebookFeed facebookmsg in alstfeedfb)
                    {
                        ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.FeedDate, facebookmsg.FeedDescription, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.FeedId, facebookmsg.Type, facebookmsg.ReadStatus);
                    }
                }
                else if (item.ProfileType == "twitter")
                {
                    ////TwitterMessageRepository twtmsgrepo = new TwitterMessageRepository();
                    //Api.TwitterMessage.TwitterMessage objApiTwitterMessage = new Api.TwitterMessage.TwitterMessage();
                    List<Domain.Socioboard.Domain.TwitterMessage> lstmsgtwtuser = (List<TwitterMessage>)new JavaScriptSerializer().Deserialize(objApiTwitterMessage.getUnreadMessages(item.ProfileId), typeof(List<Domain.Socioboard.Domain.TwitterMessage>));
                    
                    foreach (TwitterMessage lst in lstmsgtwtuser)
                    {
                        ds.Tables[0].Rows.Add(lst.ProfileId, "twitter", lst.FromId, lst.FromScreenName, lst.FromProfileUrl, lst.MessageDate, lst.TwitterMsg, "", "", lst.MessageId, lst.Type, lst.ReadStatus);
                    }
                }
                else if (item.ProfileType == "googleplus")
                {

                }


            }


            foreach (TeamMemberProfile item in alstprofiles)
            {
                if (item.ProfileType == "facebook")
                {
                    try
                    {
                        //FacebookFeedRepository fbfeedrepo = new FacebookFeedRepository();
                        //List<FacebookFeed> alstfbmsgs = fbfeedrepo.getAllReadFacebookFeeds(user.Id, item.ProfileId);
                        //foreach (FacebookFeed facebookmsg in alstfbmsgs)
                        //{
                        //    ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.FeedDate, facebookmsg.FeedDescription, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.FeedId, facebookmsg.Type,facebookmsg.ReadStatus);
                        //}
                        facebookid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
                else if (item.ProfileType == "twitter")
                {
                    try
                    {
                        //TwitterMessageRepository twtmsgrepo = new TwitterMessageRepository();
                        //List<TwitterMessage> lstmsgtwtuser = twtmsgrepo.getAllReadMessagesOfUser(user.Id, item.ProfileId);
                        //foreach (TwitterMessage lst in lstmsgtwtuser)
                        //{
                        //    ds.Tables[0].Rows.Add(lst.ProfileId, "twitter", lst.FromId, lst.FromScreenName, lst.FromProfileUrl, lst.MessageDate, lst.TwitterMsg, "", "", lst.MessageId, lst.Type,lst.ReadStatus);
                        //}
                        twitterid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
                else if (item.ProfileType == "googleplus")
                {
                    try
                    {
                        //GooglePlusActivitiesRepository objActRepo = new GooglePlusActivitiesRepository();
                        //List<GooglePlusActivities> lstmsggauser = objActRepo.getAllgoogleplusActivityOfUser(user.Id, item.ProfileId);
                        //foreach (GooglePlusActivities lst in lstmsggauser)
                        //{
                        //    ds.Tables[0].Rows.Add(lst.GpUserId, "googleplus", lst.FromId, lst.FromUserName, lst.FromProfileImage, lst.PublishedDate, lst.Content, "", "", lst.ActivityId, "activities");
                        //}
                        googleplusid += item.ProfileId + ",";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }

            }
            if (facebookid != "")
            {
                facebookid = facebookid.Substring(0, facebookid.Length - 1);
            }
            if (twitterid != "")
            {
                twitterid = twitterid.Substring(0, twitterid.Length - 1);
            }
            if (googleplusid != "")
            {
                googleplusid = googleplusid.Substring(0, googleplusid.Length - 1);
            }

            //FacebookFeedRepository fbfeedRepository = new FacebookFeedRepository();
            //List<FacebookFeed> alstfbmsgs = fbfeedRepository.getAllReadFbFeeds(facebookid);
            List<FacebookFeed> alstfbmsgs = (List<FacebookFeed>)new JavaScriptSerializer().Deserialize(objApiFacebookFeed.getAllReadFbFeeds(facebookid), typeof(List<FacebookFeed>));

            try
            {
                foreach (FacebookFeed facebookmsg in alstfbmsgs)
                {
                    try
                    {
                        ds.Tables[0].Rows.Add(facebookmsg.ProfileId, "facebook", facebookmsg.FromId, facebookmsg.FromName, facebookmsg.FromProfileUrl, facebookmsg.FeedDate, facebookmsg.FeedDescription, facebookmsg.FbComment, facebookmsg.FbLike, facebookmsg.FeedId, facebookmsg.Type, facebookmsg.ReadStatus);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }



            //TwitterMessageRepository twtmsgRepository = new TwitterMessageRepository();
            //List<TwitterMessage> lstmsgtwt = twtmsgRepository.getAlltwtMessagesOfUser(twitterid);
            List<TwitterMessage> lstmsgtwt = (List<TwitterMessage>)new JavaScriptSerializer().Deserialize(objApiTwitterMessage.getAlltwtMessagesOfUser(twitterid), typeof(List<TwitterMessage>));

            try
            {
                foreach (TwitterMessage lst in lstmsgtwt)
                {
                    try
                    {
                        ds.Tables[0].Rows.Add(lst.ProfileId, "twitter", lst.FromId, lst.FromScreenName, lst.FromProfileUrl, lst.MessageDate, lst.TwitterMsg, "", "", lst.MessageId, lst.Type, lst.ReadStatus);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }



            #region Commented G+ code, to be used later
            //GooglePlusActivitiesRepository objActRepository = new GooglePlusActivitiesRepository();
            //List<GooglePlusActivities> lstmsggpl = objActRepository.getAllgplusOfUser(googleplusid);
            //try
            //{
            //    foreach (GooglePlusActivities lst in lstmsggpl)
            //    {
            //        try
            //        {
            //            ds.Tables[0].Rows.Add(lst.GpUserId, "googleplus", lst.FromId, lst.FromUserName, lst.FromProfileImage, lst.PublishedDate, lst.Content, "", "", lst.ActivityId, "activities");
            //        }
            //        catch (Exception ex)
            //        {
            //            Console.WriteLine(ex.StackTrace);
            //        }
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Console.WriteLine(ex.StackTrace);
            //} 
            #endregion

            return ds;
        }
Пример #18
0
        public ActionResult DisplayCount()
        {
            string AllProfileId = string.Empty;
            string FbProfileId = string.Empty;
            string TwtProfileId = string.Empty;
            int fbmsgcount = 0;
            int twtmsgcount = 0;
            int allsentmsgcount = 0;
            User objUser = (User)Session["User"];
            Dictionary<Domain.Socioboard.Domain.TeamMemberProfile, object> allprofileofuser = SBUtils.GetUserProfilesccordingToGroup();
            foreach (var item in allprofileofuser)
            {
                try
                {
                    //Domain.Socioboard.Domain.TeamMemberProfile item = (Domain.Socioboard.Domain.TeamMemberProfile)(profile.Value);
                    if (item.Key.ProfileType == "facebook" || item.Key.ProfileType == "facebook_page")
                    {
                        FbProfileId += item.Key.ProfileId + ',';
                    }
                    else if (item.Key.ProfileType == "twitter")
                    {
                        TwtProfileId += item.Key.ProfileId + ',';
                    }
                    AllProfileId += item.Key.ProfileId + ',';
                }
                catch (Exception Err)
                {
                    Console.Write(Err.StackTrace);
                }
            }
            try
            {
                FbProfileId = FbProfileId.Substring(0, FbProfileId.Length - 1);
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }

            try
            {
                TwtProfileId = TwtProfileId.Substring(0, TwtProfileId.Length - 1);
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }
            try
            {
                AllProfileId = AllProfileId.Substring(0, AllProfileId.Length - 1);
            }
            catch (Exception Err)
            {
                Console.Write(Err.StackTrace);
            }
            try
            {
                Api.FacebookFeed.FacebookFeed objFacebookFeed = new Api.FacebookFeed.FacebookFeed();
                objFacebookFeed.Timeout = 300000;
                //fbmsgcount = ((List<FacebookFeed>)(new JavaScriptSerializer().Deserialize(objFacebookFeed.getAllFeedDetail1(FbProfileId, objUser.Id.ToString()), typeof(List<FacebookFeed>)))).Count;
                fbmsgcount = objFacebookFeed.GetFeedCountByProfileIdAndUserId(objUser.Id.ToString(), FbProfileId);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                Api.TwitterMessage.TwitterMessage objTwitterMessage = new Api.TwitterMessage.TwitterMessage();
                objTwitterMessage.Timeout = 300000;
                //twtmsgcount = ((List<TwitterMessage>)(new JavaScriptSerializer().Deserialize(objTwitterMessage.getAlltwtMessages1(TwtProfileId, objUser.Id.ToString()), typeof(List<TwitterMessage>)))).Count;
                twtmsgcount = objTwitterMessage.GetFeedCountByProfileIdAndUserId(objUser.Id.ToString(), FbProfileId);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                Api.ScheduledMessage.ScheduledMessage objScheduledMessage = new Api.ScheduledMessage.ScheduledMessage();
                objScheduledMessage.Timeout = 300000;
                //allsentmsgcount = ((List<ScheduledMessage>)(new JavaScriptSerializer().Deserialize(objScheduledMessage.getAllSentMessageDetails(AllProfileId, objUser.Id.ToString()), typeof(List<ScheduledMessage>)))).Count;
                allsentmsgcount = objScheduledMessage.GetSentMessageCountByProfileIdAndUserId(objUser.Id.ToString(), FbProfileId);

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            string _totalIncomingMessage = "0";
            string _totalSentMessage = "0";
            string _totalTwitterFollowers = "0";
            string _totalFacebookFan = "0";
            try
            {
                _totalIncomingMessage = (fbmsgcount + twtmsgcount).ToString();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                _totalSentMessage = allsentmsgcount.ToString();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                _totalTwitterFollowers = SBUtils.GetAllTwitterFollowersCountofUser(TwtProfileId, objUser.Id.ToString());
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            try
            {
                _totalFacebookFan = SBUtils.GetAllFacebookFancountofUser(FbProfileId, objUser.Id.ToString());
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }

            ViewBag._totalIncomingMessage = _totalIncomingMessage;
            ViewBag._totalSentMessage = _totalSentMessage;
            ViewBag._totalTwitterFollowers = _totalTwitterFollowers;
            ViewBag._totalFacebookFan = _totalFacebookFan;
            return PartialView("_HomeUserActivityPartial");
        }
Пример #19
0
        //[OutputCache(Duration = 45, Location = OutputCacheLocation.Client, NoStore = true)]
        public ActionResult TwitterMentions_FeedsSearch(string ProfileId, string keyword)
        {
            string datetime = Helper.Extensions.ToClientTime(DateTime.UtcNow);
            //string datetime = Request.Form["localtime"].ToString();
            ViewBag.datetime = datetime;
            List<object> lstobject = new List<object>();
            Dictionary<string, List<object>> dictMentions = new Dictionary<string, List<object>>();
            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));

            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List<Domain.Socioboard.MongoDomain.TwitterMessage> lstTwitterMentions = (List<Domain.Socioboard.MongoDomain.TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.getAllTwitterMentionsOfUsersByKeyword(objGroups.UserId.ToString(), ProfileId, keyword), typeof(List<Domain.Socioboard.MongoDomain.TwitterMessage>)));
            foreach (var twitterMentions in lstTwitterMentions)
            {
                lstobject.Add(twitterMentions);
            }
            dictMentions.Add("twitter", lstobject);
            return PartialView("_Panel3Partial", dictMentions);
        }
 public ActionResult ShowMsgMailPopUp(string MsgId, string Network)
 {
     Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"];
     Dictionary<string, object> twtinfo = new Dictionary<string, object>();
     Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
     Api.FacebookMessage.FacebookMessage ApiobjFacebookMessage = new Api.FacebookMessage.FacebookMessage();
     if (Network == "twitter")
     {
         Domain.Socioboard.Domain.TwitterMessage twtmessage = (Domain.Socioboard.Domain.TwitterMessage)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessageByMessageId(objUser.Id.ToString(), MsgId), typeof(Domain.Socioboard.Domain.TwitterMessage)));
         twtinfo.Add("twt_msg", twtmessage);
     }
     else if (Network == "facebook")
     {
         Domain.Socioboard.Domain.FacebookMessage fbmessage = (Domain.Socioboard.Domain.FacebookMessage)(new JavaScriptSerializer().Deserialize(ApiobjFacebookMessage.GetFacebookMessageByMessageId(objUser.Id.ToString(), MsgId), typeof(Domain.Socioboard.Domain.FacebookMessage)));
         twtinfo.Add("fb_msg", fbmessage);
     }
     return PartialView("_MailMsgSendingPartial", twtinfo);
     //return PartialView("_TwitterMailSendingPartial", twtfeed);
 }
        public async Task<ActionResult> BindTwitterMessage(string load, string arrid)
        {
            string TwitterProfiles = string.Empty;
            Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"];

            if (load == "first")
            {
                //Dictionary<Domain.Socioboard.Domain.TeamMemberProfile, object> allprofileofuser = await SBUtils.GetUserProfilesccordingToGroup();
                Dictionary<Domain.Socioboard.Domain.GroupProfile, object> allprofileofuser = await SBHelper.GetGroupProfiles();
                foreach (var item in allprofileofuser)
                {
                    try
                    {
                        if (item.Key.ProfileType == "twitter")
                        {
                            TwitterProfiles += item.Key.ProfileId + ',';
                        }
                    }
                    catch (Exception Err)
                    {
                        Console.Write(Err.StackTrace);
                    }
                }
                try
                {
                    TwitterProfiles = TwitterProfiles.Substring(0, (TwitterProfiles.Length - 1));
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
                twitterMessageCount = 0;
            }
            else if (load == "filter")
            {
                twitterMessageCount = 0;
                TwitterProfiles = arrid;
            }
            else if (load == "scroll")
            {
                twitterMessageCount = twitterMessageCount + 10;
                TwitterProfiles = arrid;


            }
            Api.TwitterMessage.TwitterMessage ApiTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List<Domain.Socioboard.MongoDomain.TwitterMessage> _lstTwitterMessage = (List<Domain.Socioboard.MongoDomain.TwitterMessage>)new JavaScriptSerializer().Deserialize(ApiTwitterMessage.GetTwitterFeedWithSentiments(TwitterProfiles, twitterMessageCount.ToString(), "10"), typeof(List<Domain.Socioboard.MongoDomain.TwitterMessage>));
            if (_lstTwitterMessage.Count > 0)
            {
                return PartialView("_TwitterWallPartial", _lstTwitterMessage);
            }
            else
            {
                return Content("no_data");
            }
        }