예제 #1
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            ISchedulerControl scd = ITSActivator.OpenConnection <ISchedulerControl>(Consts.FrameworkSchedulerClass);

            scd.CreateTask(GetUserControlParameters().IndexScheduleJob(), new CancellationTokenSource());
            this.Close();
        }
예제 #2
0
        private ITSolution.Scheduler.EntidadesBd.TaskIts indexarTarefa()
        {
            var proccessSelected = cbProcesso.SelectedItem as ITSolution.Scheduler.EntidadesBd.ProcessIts;

            if (proccessSelected != null)
            {
                memDescProcess.Text = proccessSelected.DescricaoProcesso;

                if (proccessSelected.CodigoProcesso == "INS_TSTE")
                {
                }
                else if (proccessSelected.CodigoProcesso == "FEC_FOLHA")
                {
                    try
                    {
                        //var schedulerControl = new Scheduler.Manager.SchedulerControl();
                        ISchedulerControl scd = ITSActivator.OpenConnection <ISchedulerControl>(Consts.FrameworkSchedulerClass);
                        scd.CreateTask(this.control.SchedulerJob, cts);
                        return(this.control.SchedulerJob);
                    }
                    catch (Exception ex)
                    {
                        XMessageIts.ExceptionMessage(ex);
                    }
                }
                return(null);
            }
            return(null);
        }