Esempio n. 1
0
        //---------------------------------------------------------------------------------------------------------------------

        /// <summary>Inserts the scheduler and its parameters into the database.</summary>
        public override void Store()
        {
            bool existedBefore = Exists;

            if (Identifier == null)
            {
                Identifier = Guid.NewGuid().ToString();
            }
            if (Name == null)
            {
                Name = Identifier;
            }

            HasTaskConfiguration = (taskConfiguration != null);
            base.Store();
            if (RunConfiguration != null)
            {
                RunConfiguration.Store();
            }
            if (HasTaskConfiguration)
            {
                TaskConfiguration.Store();
            }

            //if (existedBefore) context.Execute(String.Format("DELETE FROM schedulerparam WHERE id_scheduler={0};", Id));
            CreateParameters();
        }