Пример #1
0
        private void AddSchedule(GXDbConnection connection)
        {
            List <GXSchedule> list = new List <GXSchedule>();
            GXSchedule        m    = new GXSchedule();

            m.Name = "Minutely";
            GXDateTime dt = new GXDateTime(DateTime.Now.Date);

            dt.Skip = DateTimeSkips.Year | DateTimeSkips.Month | DateTimeSkips.Day | DateTimeSkips.Hour | DateTimeSkips.Minute;
            m.Start = dt.ToFormatString();
            list.Add(m);
            GXSchedule h = new GXSchedule();

            h.Name  = "Hourly";
            dt.Skip = DateTimeSkips.Year | DateTimeSkips.Month | DateTimeSkips.Day | DateTimeSkips.Hour;
            h.Start = dt.ToFormatString();
            list.Add(h);
            GXSchedule d = new GXSchedule();

            d.Name  = "Daily";
            dt.Skip = DateTimeSkips.Year | DateTimeSkips.Month | DateTimeSkips.Day;
            d.Start = dt.ToFormatString();
            list.Add(d);
            connection.Insert(GXInsertArgs.InsertRange(list));
        }