/* * public static void RunTrigger(Guid triggerId) * { * var triggerService = StaticContext.IocManager.Resolve<IRepository<ScheduledJobTrigger, Guid>>(); * var trigger = triggerService.Get(triggerId); * * var job = GetJobInstanceById(trigger.Job.Id); * * job.TriggerId = trigger.Id; * * job.Execute(); * } * * private static ScheduledJobBase GetJobInstanceById(Guid id) * { * var typeFinder = StaticContext.IocManager.Resolve<ITypeFinder>(); * var jobType = typeFinder.Find(t => t.GetAttribute<ScheduledJobAttribute>()?.Uid == id).FirstOrDefault(); * if (jobType == null) * throw new Exception($"Job with Id = '{id}' not found"); * * var jobInstance = StaticContext.IocManager.Resolve(jobType) as ScheduledJobBase; * return jobInstance; * } */ /// <summary> /// Scheduled job triggers index table /// </summary> /// <returns></returns> public static ChildDataTableConfig <ScheduledJob, ScheduledJobTrigger, Guid> ScheduledJobTriggers() { var table = ChildDataTableConfig <ScheduledJob, ScheduledJobTrigger, Guid> .OneToMany("ScheduledJob_Triggers", e => e.Job); table.AddProperty(e => e.Status); table.AddProperty(e => e.CronString); table.AddProperty(e => e.Description); return(table); }
/// <summary> /// Appointed persons child table /// </summary> public static ChildDataTableConfig <ShaRole, ShaRoleAppointedPerson, Guid> ShaRoleAppointedPersonsTable() { var table = ChildDataTableConfig <ShaRole, ShaRoleAppointedPerson, Guid> .OneToMany("ShaRole_AppointedPersons", ap => ap.Role); table.AddProperty(e => e.Person.FullName, c => c.Caption("Full Name").SortAscending()); table.AddProperty(e => e.Person.User.UserName, c => c.Caption("UserName")); table.AddProperty(e => e.CreationTime, c => c.Caption("Created On").Visible(false)); table.AddProperty(e => e.LastModificationTime, c => c.Caption("Updated On").Visible(false)); return(table); }
/// <summary> /// Mobile Devices index table /// </summary> /// <returns></returns> public static DataTableConfig IndexTable() { var table = ChildDataTableConfig <ReferenceList, ReferenceListItem, Guid> .OneToMany("ReferenceList_Items", i => i.ReferenceList); table.AddProperty(e => e.OrderIndex, c => c.SortAscending()); table.AddProperty(e => e.Item); table.AddProperty(e => e.ItemValue); table.AddProperty(e => e.Description); table.AddProperty(e => e.HardLinkToApplication); table.AddProperty(e => e.CreationTime, c => c.Caption("Created On")); return(table); }
public static DataTableConfig <ScheduledJobExecution, Guid> JobsExecutionLog() { var table = ChildDataTableConfig <ScheduledJob, ScheduledJobExecution, Guid> .OneToMany("ScheduledJobs_ExecutionLog", ex => ex.Job); table.AddProperty(e => e.StartedOn, m => m.SortDescending()); table.AddProperty(e => e.Job.JobNamespace, c => c.Caption("Job Namespace")); table.AddProperty(e => e.Job.JobName, c => c.Caption("Job Name")); table.AddProperty(e => e.FinishedOn); table.AddProperty(e => e.Status); table.AddProperty(e => e.StartedBy); table.AddProperty(e => e.ErrorMessage); return(table); }
/// <summary> /// Mobile Devices index table /// </summary> /// <returns></returns> public static DataTableConfig IndexTable() { var table = ChildDataTableConfig <EntityConfig, EntityProperty, Guid> .OneToMany("EntityConfig_Properties", i => i.EntityConfig); table.AddProperty(e => e.Name, c => c.SortAscending()); table.AddProperty(e => e.Label); table.AddProperty(e => e.Description); table.AddProperty(e => e.DataType); table.AddProperty(e => e.Source); table.AddProperty(e => e.CreationTime, c => c.Caption("Created On")); return(table); }
/// <summary> /// Subareas table /// </summary> /// <returns></returns> public static ChildDataTableConfig <Area, Area, Guid> TeamMembersTable() { var table = ChildDataTableConfig <Area, Area, Guid> .OneToMany("Area_SubAreas", e => e.ParentArea); table.AddProperty(e => e.Name, c => c.SortAscending()); table.AddProperty(e => e.ShortName); table.AddProperty(e => e.ParentArea.Name, c => c.Caption("Parent Area")); table.AddProperty(e => e.AreaType); table.AddProperty(e => e.Comments); table.AddProperty(e => e.CreationTime, c => c.Caption("Created On").Visible(false)); table.AddProperty(e => e.LastModificationTime, c => c.Caption("Updated On").Visible(false)); return(table); }
/// <summary> /// Appointed persons child table /// </summary> public static ChildDataTableConfig <Notification, NotificationTemplate, Guid> ShaRoleAppointedPersonsTable() { var table = ChildDataTableConfig <Notification, NotificationTemplate, Guid> .OneToMany("Notification_Templates", ap => ap.Notification); table.AddProperty(e => e.IsEnabled); table.AddProperty(e => e.SendType); table.AddProperty(e => e.Name); table.AddProperty(e => e.Subject); table.AddProperty(e => e.BodyFormat); table.AddProperty(e => e.Body); table.AddProperty(e => e.CreationTime, c => c.Caption("Created On").Visible(false)); table.AddProperty(e => e.LastModificationTime, c => c.Caption("Updated On").Visible(false)); return(table); }
public static ChildDataTableConfig <ScheduledJob, ScheduledJobExecution, Guid> JobExecutionsTable() { var table = ChildDataTableConfig <ScheduledJob, ScheduledJobExecution, Guid> .OneToMany("ScheduledJob_Executions", ex => ex.Job); table.UseDtos = true; table.DetailsUrl = url => "/api/services/Scheduler/ScheduledJobExecution/Get"; table.CreateUrl = url => "/api/services/Scheduler/ScheduledJobExecution/Create"; table.UpdateUrl = url => "/api/services/Scheduler/ScheduledJobExecution/Update"; table.DeleteUrl = url => "/api/services/Scheduler/ScheduledJobExecution/Delete"; table.AddProperty(e => e.StartedOn, m => m.SortDescending()); table.AddProperty(e => e.FinishedOn); table.AddProperty(e => e.Status); table.AddProperty(e => e.StartedBy); table.AddProperty(e => e.ErrorMessage); return(table); }