예제 #1
0
 public AdminHandler(AdminPageViewModel ViewModel) : base(ViewModel)
 {
     _catalog = CatalogsSingleton.Instance;
     _vm      = ViewModel;
     _updater = new UpdateObsCollection();
     _updater.GetEmployeesAsync(_vm.Employees);
 }
예제 #2
0
        public void RemoveEmployeeWithoutUser()
        {
            UpdateObsCollection updater = new UpdateObsCollection();

            updater.GetEmployeesAsync(_loginPageViewModel.EmployeeCollection);
            foreach (Employees employee in _loginPageViewModel.EmployeeCollection)
            {
                if (employee.UserID == null)
                {
                    _loginPageViewModel.EmployeeCollection.Remove(employee);
                }
            }
        }
예제 #3
0
        //private Dictionary< WorktimeEventDetails> _cepair;



        #endregion

        public CalendarHandler(T viewmodel) : base(viewmodel)
        {
            _viewmodel = viewmodel;
            _times     = new Dictionary <DateTime, TimeSpan>();
            _employeePlacementIndex = new EmployeePlacementIndex();
            _starttime        = new TimeSpan(8, 00, 0);
            _endtime          = new TimeSpan(23, 00, 0);
            _catalogInterface = new WorktimeProxy();
            //_cepair = new List<WorktimeEventDetails>();

            #region timePlanCollection initialization

            _timePlanCollection1 = new Dictionary <TimeSpan, TimeIntervalDetails>();
            _timePlanCollection2 = new Dictionary <TimeSpan, TimeIntervalDetails>();
            _timePlanCollection3 = new Dictionary <TimeSpan, TimeIntervalDetails>();
            _timePlanCollection4 = new Dictionary <TimeSpan, TimeIntervalDetails>();
            _timePlanCollection5 = new Dictionary <TimeSpan, TimeIntervalDetails>();
            _timePlanCollection6 = new Dictionary <TimeSpan, TimeIntervalDetails>();
            _timePlanCollection7 = new Dictionary <TimeSpan, TimeIntervalDetails>();

            #endregion

            #region Color Selection

            _colors = new Dictionary <int, string>();
            _colors.Add(1, "DarkMagenta");
            _colors.Add(2, "DarkOrange");
            _colors.Add(3, "DarkGreen");
            _colors.Add(4, "Aqua");
            _colors.Add(5, "Indigo");
            _colors.Add(6, "Plum");
            _colors.Add(7, "MediumPurple");

            #endregion

            _viewmodel.Day1Header = DateTime.Now;



            UpdateObsCollection updater = new UpdateObsCollection();
            updater.GetEmployeesAsync(_viewmodel.Employees);
        }