public string GetSociaoQueueMessageByUserIdAndGroupIdBetweenDates(string UserId, string GroupId, string StartDate, string EndDate)
        {
            string   profileid = string.Empty;
            DateTime stDate    = DateTime.Parse(StartDate);
            DateTime endDate   = DateTime.Parse(EndDate);

            // TeamRepository objTeamRepository = new TeamRepository();
            try
            {
                Guid userid  = Guid.Parse(UserId);
                Guid groupid = Guid.Parse(GroupId);
                List <Domain.Socioboard.Domain.ScheduledMessage> lstfianlscoailqueue = new List <Domain.Socioboard.Domain.ScheduledMessage>();


                //Domain.Socioboard.Domain.Team objTeam = objTeamRepository.GetTeamByGroupId(groupid);
                //List<Domain.Socioboard.Domain.TeamMemberProfile> allprofiles = objTeamMemberProfileRepository.getAllTeamMemberProfilesOfTeam(objTeam.Id);
                GroupProfileRepository grpProfileRepo = new GroupProfileRepository();
                List <Domain.Socioboard.Domain.GroupProfile> allprofiles = new List <Domain.Socioboard.Domain.GroupProfile>();
                allprofiles = grpProfileRepo.GetAllGroupProfiles(groupid);


                ScheduledMessageRepository objScheduledMessageRepository = new ScheduledMessageRepository();
                List <Domain.Socioboard.Domain.ScheduledMessage> lstScheduledMessages         = new List <Domain.Socioboard.Domain.ScheduledMessage>();
                Dictionary <string, List <Domain.Socioboard.Domain.ScheduledMessage> > objdic = new Dictionary <string, List <Domain.Socioboard.Domain.ScheduledMessage> >();
                foreach (var item in allprofiles)
                {
                    lstScheduledMessages = objScheduledMessageRepository.getAllMessagesDetailsByDate(item.ProfileId, userid, stDate, endDate);
                    if (lstScheduledMessages.Count > 0)
                    {
                        objdic.Add(item.ProfileId, lstScheduledMessages);
                    }
                }
                foreach (var item in objdic)
                {
                    foreach (var ScheduledMessage in item.Value)
                    {
                        lstfianlscoailqueue.Add(ScheduledMessage);
                    }
                }
                //FacebookAccountRepository facebookAccountRepo = new FacebookAccountRepository();
                // FacebookAccount facebook = facebookAccountRepo.getFacebookAccountDetailsById(FacebookId, userid);
                return(new JavaScriptSerializer().Serialize(lstfianlscoailqueue));
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                Console.WriteLine(ex.StackTrace);
                return(new JavaScriptSerializer().Serialize("Please try Again"));
            }
        }