Example #1
0
        public void Snooze(Commuticate.Repository.QueSchedule queSchudle, TimeSpan delay)
        {
            using (var rep = new Entities())
            {
                var snoozeQue = new QueSchedule()
                                    {
                                        AtTime = DateTime.Now.Add(delay).TimeOfDay,
                                        Que = queSchudle.Que,
                                        OnDays = queSchudle.OnDays,
                                        NotifyEmail = queSchudle.NotifyEmail,
                                        NotifySMS = queSchudle.NotifySMS,
                                        NotifyTwitter = queSchudle.NotifyTwitter,
                                        RunOnce = true
                                    };

                rep.AddToQueSchedules(snoozeQue);
                rep.SaveChanges();
            }
        }
 /// <summary>
 /// Create a new QueSchedule object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="queId">Initial value of the QueId property.</param>
 /// <param name="onDays">Initial value of the OnDays property.</param>
 /// <param name="atTime">Initial value of the AtTime property.</param>
 /// <param name="notifyEmail">Initial value of the NotifyEmail property.</param>
 /// <param name="notifySMS">Initial value of the NotifySMS property.</param>
 /// <param name="notifyTwitter">Initial value of the NotifyTwitter property.</param>
 /// <param name="runOnce">Initial value of the RunOnce property.</param>
 public static QueSchedule CreateQueSchedule(global::System.Int32 id, global::System.Int32 queId, global::System.String onDays, global::System.TimeSpan atTime, global::System.Boolean notifyEmail, global::System.Boolean notifySMS, global::System.Boolean notifyTwitter, global::System.Boolean runOnce)
 {
     QueSchedule queSchedule = new QueSchedule();
     queSchedule.Id = id;
     queSchedule.QueId = queId;
     queSchedule.OnDays = onDays;
     queSchedule.AtTime = atTime;
     queSchedule.NotifyEmail = notifyEmail;
     queSchedule.NotifySMS = notifySMS;
     queSchedule.NotifyTwitter = notifyTwitter;
     queSchedule.RunOnce = runOnce;
     return queSchedule;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the QueSchedules EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToQueSchedules(QueSchedule queSchedule)
 {
     base.AddObject("QueSchedules", queSchedule);
 }