Beispiel #1
0
        public ObservableCollection <WorkerSchedule> GetWorkerScheduleListing()
        {
            ObservableCollection <WorkerSchedule> FromDB = new ObservableCollection <WorkerSchedule>();
            var WorkerDB = Database.Table <WorkerScheduleTable>();

            foreach (WorkerScheduleTable WorkerFromDB in WorkerDB)
            {
                WorkerSchedule currentworker = new WorkerSchedule(TimeSpan.ParseExact(WorkerFromDB.BeginHour, "c", null), TimeSpan.ParseExact(WorkerFromDB.EndHour, "c", null), WorkerFromDB.Output, WorkerFromDB.Color, WorkerFromDB.Id);
                FromDB.Add(currentworker);
            }
            return(FromDB);
        }
Beispiel #2
0
        public void GotToWork(Worker worker, WorkerSchedule schedule)
        {
            foreach (WorkerInfoByDay wo in this.InfoByDay)
            {
                if ((wo.Worker == worker) && (wo.CurrentDate == this.Date_time))
                {
                    wo.WorkedToday = schedule;

                    //updateColor
                    wo.BackgroundButtonColor = wo.GetColor;
                }
            }
        }