Ejemplo n.º 1
0
 public string EditSchecduledMessage(string id, string msg)
 {
     try
     {
         ScheduledMessageRepository objScheduledMessageRepository = new ScheduledMessageRepository();
         objScheduledMessageRepository.UpdateProfileScheduleMessage(Guid.Parse(id), msg);
         return(new JavaScriptSerializer().Serialize(""));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.StackTrace);
         return(new JavaScriptSerializer().Serialize("Please try Again"));
     }
 }
Ejemplo n.º 2
0
        public string UpdateScheduledMessage(string typeidandmsgid, string ShareMessage, DateTime scheduledTime, string picurl)
        {
            try
            {
                //Guid msgid = Guid.Parse(MsgId);
                List <string> type      = new List <string>();
                List <string> profileid = new List <string>();
                List <string> msgid     = new List <string>();
                string[]      TypeandId = typeidandmsgid.Split(',');
                for (int i = 0; i < TypeandId.Length; i = i + 3)
                {
                    type.Add(TypeandId[i]);
                    profileid.Add(TypeandId[i + 1]);
                    msgid.Add(TypeandId[i + 2]);
                }
                ScheduledMessageRepository objScheduledMessageRepository = new ScheduledMessageRepository();
                ScheduledMessage           objScheduledMessage           = new ScheduledMessage();

                try
                {
                    for (int i = 0; i < type.Count; i++)
                    {
                        objScheduledMessageRepository.UpdateProfileScheduleMessage(Guid.Parse(msgid[i]), profileid[i], ShareMessage, type[i], scheduledTime, picurl);
                    }
                }
                catch (Exception ex)
                {
                    logger.Error(ex.Message);
                    Console.WriteLine(ex.StackTrace);
                }
                ScheduledMessage objScheduledMessages = new ScheduledMessage();
                return(new JavaScriptSerializer().Serialize(typeidandmsgid));
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                Console.WriteLine(ex.StackTrace);
                return(new JavaScriptSerializer().Serialize("Please try Again"));
            }
        }