private void UpdateFrequency(bool isDirty, Schedule_Base schedule) { if (isDirty) { vm.SelectedFrequency = (int)schedule.Frequency; Account.Schedule = schedule; } }
public Schedule(Schedule_Base sched) { this.LocalId = sched.ScheduleId; this.DateTime_Created = sched.DateTime_Created; this.DateTime_Deactivated = sched.DateTime_Deactivated; this.Frequency = sched.Frequency.ToString(); this.Occurrence_LastPlanned = sched.Occurrence_LastPlanned; this.Occurrence_LastConfirmed = sched.Occurrence_LastConfirmed; this.Occurrence_First = sched.Occurrence_First; this.Occurrence_Final = sched.Occurrence_Final; this.HasCustomTransactionTime = sched.HasCustomTransactionTime; this.IsAutoConfirm = sched.IsAutoConfirm; }
internal ManageScheduleVM GetManageScheduleVM(int?id) { Schedule_Base schedule = null; if (id.HasValue) { schedule = new Schedule_Base(Repo.GetSchedule(id.Value)); } return(new ManageScheduleVM(schedule, Frequency.GetFrequencyComboBoxItems(), Time.GetHoursComboBoxItems(), Time.GetMeridianComboBoxItems(), Time.GetTimeZonesComboBoxItems() )); }
private void Update() { if (firstUpdate) { pawns = new List <InitPawn>(); foreach (InitPawn p in pawnHolder.GetComponentsInChildren <InitPawn>()) { Schedule_Base schedule_Base = p.gameObject.GetComponent <Schedule_Base>(); //Prevents agents without a work schedule from being assigned a workplace if (schedule_Base.taskListToday.Contains(TaskTypes.Work)) { pawns.Add(p); } } for (int i = 0; i < pawns.Count; i++) { //Debug.Log("Assigning Pawn Work"); workplaces[currentWorkplace].AssignWorker(pawns[i]); if (workplaces[currentWorkplace].workplaceFull) { // Debug.Log("Workplace Full"); currentWorkplace++; if (currentWorkplace >= workPlaceCount) { // Debug.Log("All Workplaces Full"); break; } } } workplacesAssigned = true; firstUpdate = false; } }
// Start is called before the first frame update void Start() { pawnSchedule = GetComponent <Schedule_Base>(); }
internal Schedule_Base SaveSchedule(Schedule_Base sched) { return(new Schedule_Base(Repo.SaveSchedule(new Schedule(sched)))); }