Ejemplo n.º 1
0
        public string getScheduledMessageByProfileType(string profileType)
        {
            try
            {
                //Guid userid = Guid.Parse(UserId);
                ScheduledMessageRepository objScheduledMessageRepository = new ScheduledMessageRepository();
                List <Domain.Socioboard.Domain.ScheduledMessage> lstScheduledMessages = new List <Domain.Socioboard.Domain.ScheduledMessage>();
                lstScheduledMessages = objScheduledMessageRepository.GetUnsentSchdeuledMessageByProfileType(profileType);

                //FacebookAccountRepository facebookAccountRepo = new FacebookAccountRepository();
                // FacebookAccount facebook = facebookAccountRepo.getFacebookAccountDetailsById(FacebookId, userid);
                return(new JavaScriptSerializer().Serialize(lstScheduledMessages));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return(new JavaScriptSerializer().Serialize("Please try Again"));
            }
        }
        public List <Domain.Socioboard.Domain.ScheduledMessage> getScheduledMessage()
        {
            try
            {
                //Guid userid = Guid.Parse(UserId);
                string profileType = "linkedin";
                ScheduledMessageRepository objScheduledMessageRepository = new ScheduledMessageRepository();
                List <Domain.Socioboard.Domain.ScheduledMessage> lstScheduledMessages = objScheduledMessageRepository.GetUnsentSchdeuledMessageByProfileType(profileType);

                if (lstScheduledMessages == null)
                {
                    lstScheduledMessages = new List <Domain.Socioboard.Domain.ScheduledMessage>();
                }

                return(lstScheduledMessages);
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                Console.WriteLine(ex.StackTrace);
                return(new List <Domain.Socioboard.Domain.ScheduledMessage> ());
            }
        }
        public string getScheduledMessageByProfileType(string profileType)
        {
            try
            {
                //Guid userid = Guid.Parse(UserId);
                ScheduledMessageRepository objScheduledMessageRepository             = new ScheduledMessageRepository();
                List <Domain.Myfashion.Domain.ScheduledMessage> lstScheduledMessages = objScheduledMessageRepository.GetUnsentSchdeuledMessageByProfileType(profileType);

                if (lstScheduledMessages == null)
                {
                    lstScheduledMessages = new List <Domain.Myfashion.Domain.ScheduledMessage>();
                }

                return(new JavaScriptSerializer().Serialize(lstScheduledMessages));
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                Console.WriteLine(ex.StackTrace);
                return(new JavaScriptSerializer().Serialize(new List <Domain.Myfashion.Domain.ScheduledMessage>()));
            }
        }