Example #1
0
        public async Task <PartialViewResult> CreateModal()
        {
            var viewModel = new SchedulerOutputDto()
            {
                //给属性赋值
            };

            var jobGroups = await _JobGroupAppService.GetJobGroupsToItem(0);

            ViewBag.JobGroups = jobGroups;

            var triggers = await _TriggerAppService.GetTriggersToItem(0);

            ViewBag.Triggers = triggers;

            var jobGroupEntity = await _JobGroupAppService.GetJobGroupById(Convert.ToInt64(jobGroups[0].Value));

            if (jobGroupEntity.TypeTable == "BGJM_JOB_RPTEMAIL")
            {
                ViewBag.Jobs = await _Job_RPTEmailAppService.GetJobRPTEmailsToItem(0);
            }
            if (jobGroupEntity.TypeTable == "BGJM_JOB_SQL")
            {
                ViewBag.Jobs = await _Job_SqlAppService.GetJobSqlToItem(viewModel.Job_Id);
            }
            return(PartialView("_CreateOrEditModal", viewModel));
        }
        public async Task <PartialViewResult> EditModal(long id)
        {
            var viewModel = await _JobGroupAppService.GetJobGroupById(id);

            return(PartialView("_CreateOrEditModal", viewModel));
        }