protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                string ret = string.Empty;
                if (Request.QueryString != null)
                {
                    ScheduledMessageRepository objScheduledMessageRepository = new ScheduledMessageRepository();
                    List <ScheduledMessage>    lstScheduledMessage           = objScheduledMessageRepository.getAllMessagesOfUser(Guid.Parse(Request.QueryString["id"]));

                    foreach (ScheduledMessage item in lstScheduledMessage)
                    {
                        string tf = string.Empty;
                        if (item.Status == true)
                        {
                            tf = "TRUE";
                        }
                        else
                        {
                            tf = "FALSE";
                        }
                        ret += "<tr class=\"gradeX\"><td>" + item.ShareMessage + "</td><td>" + item.ScheduleTime + "</td><td>" + tf + "</td></tr>";
                    }
                    dtls.InnerHtml = ret;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error : " + ex.StackTrace);
            }
        }
Exemplo n.º 2
0
        public string GetAllMessagesOfUser(string UserId, string profileid)
        {
            try
            {
                Guid userid = Guid.Parse(UserId);
                ScheduledMessageRepository objScheduledMessageRepository = new ScheduledMessageRepository();
                List <ScheduledMessage>    lstScheduledMessages          = new List <ScheduledMessage>();
                lstScheduledMessages = objScheduledMessageRepository.getAllMessagesOfUser(userid, profileid);

                //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"));
            }
        }