public void InserDailyTrigger() { Header header = new Header("FRITZ", "SMS-GW", "sendSMS"); Request request = new Request(null, header, null); QueueWorkItem item = new QueueWorkItem(); item.Command = string.Format(GSMClient.Command.CommandCollection.SMSSend, "082125164012", "hai"); item.Enabled = true; DailyTrigger trigger = new DailyTrigger(); trigger.RecursEvery = 1; item.Schedule = trigger; IKeySym keySym = new PrivateKey(); request.QueueWorkItem = item; GSMClient.BaseGSMCommand dbCommand = new GSMClient.DbCommand("Data Source=.;Initial Catalog=SMSGW;User Id=sa;Password=sa123;Integrated Security=False;MultipleActiveResultSets=True", "System.Data.SqlClient"); dbCommand.Request = request; dbCommand.Write(); }
public void TestMonthlyTrigger() { Header header = new Header("FRITZ", "SMS-GW", "sendSMS"); Request request = new Request(null, header, null); QueueWorkItem item = new QueueWorkItem(); item.Command = string.Format(GSMClient.Command.CommandCollection.SMSSend, "082125164012", "hai"); item.Enabled = true; MonthlyTrigger trigger = new MonthlyTrigger(); trigger.December = 1; trigger.Days = "14,19"; item.Schedule = trigger; request.QueueWorkItem = item; GSMClient.BaseGSMCommand dbCommand = new GSMClient.DbCommand("Data Source=.;Initial Catalog=SMSGW;User Id=sa;Password=sa123;Integrated Security=False;MultipleActiveResultSets=True", "System.Data.SqlClient"); dbCommand.Request = request; dbCommand.Write(); }
public void InsertWeeklyTrigger() { Header header = new Header("FRITZ", "SMS-GW", "sendSMS"); Request request = new Request(null, header, null); QueueWorkItem item = new QueueWorkItem(); item.Command = string.Format(GSMClient.Command.CommandCollection.SMSSend, "082125164012", "hai"); item.Enabled = true; WeeklyTrigger week = new WeeklyTrigger(); week.Monday = 1; week.Thursday = 1; week.RecursEvery = 1; item.Schedule = week; IKeySym keySym = new PrivateKey(); request.QueueWorkItem = item; GSMClient.BaseGSMCommand dbCommand = new GSMClient.DbCommand("Data Source=.;Initial Catalog=SMSGW;User Id=sa;Password=sa123;Integrated Security=False;MultipleActiveResultSets=True", "System.Data.SqlClient"); dbCommand.Request = request; dbCommand.Write(); }