Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string ret = string.Empty;

            try
            {
                User                       objUser                       = new User();
                UserRepository             objUserRepository             = new UserRepository();
                scheduling                 objscheduling                 = new scheduling();
                ScheduledMessage           objScheduledMessage           = new ScheduledMessage();
                ScheduledMessageRepository objScheduledMessageRepository = new ScheduledMessageRepository();
                List <ScheduledTracker>    lstScheduledTracker           = objScheduledMessageRepository.GetAllScheduledDetails();
                foreach (ScheduledTracker item in lstScheduledTracker)
                {
                    try
                    {
                        //List<ScheduledMessage> lstScheduledMessage = objScheduledMessageRepository.getAllMessagesOfUser(Guid.Parse(item._Id));
                        List <ScheduledMessage> lstUnsentScheduledMessage = objScheduledMessageRepository.getAllIUnSentMessagesOfUser(Guid.Parse(item._Id));
                        objUser = objUserRepository.getUsersById(Guid.Parse(item._Id));
                        ret    += "<tr class=\"gradeX\"><td><a href=\"ScheduledMessageDetail.aspx?id=" + objUser.Id + "\">" + objUser.UserName + "</a></td><td>" + item._count + "</td><td>" + (item._count - lstUnsentScheduledMessage.Count()) + "</td><td>" + lstUnsentScheduledMessage.Count() + "</td></tr>";
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Response.Write(ret);
        }
Ejemplo n.º 2
0
        public string GetAllScheduledDetails()
        {
            List <Domain.Socioboard.Helper.ScheduledTracker> _AllScheduledMessage = new List <Domain.Socioboard.Helper.ScheduledTracker>();

            try
            {
                _AllScheduledMessage = objScheduledMessageRepository.GetAllScheduledDetails();
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                Console.WriteLine(ex.StackTrace);
            }
            return(new JavaScriptSerializer().Serialize(_AllScheduledMessage));
        }
        public string GetAllScheduledDetails()
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();

            serializer.MaxJsonLength = 2147483647;
            List <Domain.Socioboard.Helper.ScheduledTracker> _AllScheduledMessage = new List <Domain.Socioboard.Helper.ScheduledTracker>();

            try
            {
                _AllScheduledMessage = objScheduledMessageRepository.GetAllScheduledDetails();
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
            }
            return(serializer.Serialize(_AllScheduledMessage));
        }