예제 #1
0
        //public int Add(TimerFormViewModel model)
        //{
        //    T_ServiceList serviceList = new T_ServiceList();
        //    var id =  serviceList.GetID(model.ServiceName);
        //    T_SimpleTrigger trigger = new T_SimpleTrigger()
        //    {
        //        ID = model.ID,
        //        StartTime = model.StartTime,
        //        EndTime = model.EndTime,
        //        RepeatTime = model.RepeatTime,
        //        RepeatInterval = model.RepeatInterval,
        //        SID = id
        //    };
        //    return trigger.Add(trigger);
        //}

        public DataSet GetList()
        {
            T_SimpleTrigger trigger = new T_SimpleTrigger();
            var             ds      = trigger.GetList("");

            return(ds);
        }
예제 #2
0
        public int Add(AddTriggerFormViewModel_Add model)
        {
            T_ServiceList   serviceList = new T_ServiceList();
            var             id          = serviceList.GetID(model.ServiceName);
            T_SimpleTrigger trigger     = new T_SimpleTrigger()
            {
                ID             = model.ID,
                StartTime      = model.StartTime,
                EndTime        = model.EndTime,
                RepeatTime     = model.RepeatTime,
                RepeatInterval = model.RepeatInterval,
                SID            = id
            };

            return(trigger.Add(trigger));
        }