private static GanttTask CreateProjectTask(string id, string name, string desc, int group, GanttColors gc) { return(new GanttTask { id = id, text = name, desc = desc, type = GanttType.project, GroupId = group, color = gc }); }
/// <summary> /// Creates new TimelineItem with a label depending on the schedulingState /// </summary> public GanttTask CreateGanttTask(ProductionOrderWorkSchedule item, long start, long end, GanttColors gc, string parent) { var gantTask = new GanttTask() { id = item.Id.ToString(), type = GanttType.task, desc = item.Name, text = _schedulingState == 4 ? item.MachineGroup.Name : "P.O.: " + item.ProductionOrderId, start_date = start.GetDateFromMilliseconds().ToString("dd-MM-yyyy HH:mm"), end_date = end.GetDateFromMilliseconds().ToString("dd-MM-yyyy HH:mm"), IntFrom = start, IntTo = end, parent = parent, color = gc, }; return(gantTask); }