public override async Task InitializeAsync(Company parameter) { await base.InitializeAsync(parameter); Title = parameter.Name; Employees.AddRange(Employee.EmployeeRepository.Where(e => e.CompanyId == parameter.Id)); }
public MainDepartement(string Name, Director director, Deputy deputy, List <Employee> empl, List <SubDepartament> subDeps) : base(Name, subDeps, empl) { Director = director; Deputy = deputy; Employees.AddRange(new List <Employee> { Director, Deputy }); }
public PaySalaryDialogViewModel(MainViewModel mainViewModel) { _mainViewModel = mainViewModel; PaySalaryCommand = new DelegateCommand(PaySalary, Validate); Employees = _mainViewModel.Context.Salesmen.Select(x => x.Contragent).ToList(); Employees.AddRange(_mainViewModel.Context.Guards.Select(x => x.Contragent).ToList()); SelectedEmployee = Employees.FirstOrDefault(); }
/// <summary> /// Loads the employees /// </summary> public async Task <int> loadEmployeesAsync(int offset, int limit) { _events.PublishOnUIThread(new ProgressEventModel(System.Windows.Visibility.Visible)); List <IEmployee> newEmployees = await _databaseService.GetEmployeesAsync(_user, limit, offset); Employees.AddRange(newEmployees); _events.PublishOnUIThread(new ProgressEventModel(System.Windows.Visibility.Collapsed)); return(newEmployees.Count); }
public TestCompanyVm() : base("ACME Inc.")//, MakeAScene()) { var address1 = new AddressVm { HouseNumber = "11280", Street = "NW 35th Court", City = "Coral Springs", State = "FL", ZipCode = 33065 }; var address2 = new AddressVm { HouseNumber = "8546", Street = "NW 28th Court", City = "North Lauderdale", State = "Florida", ZipCode = 33068 }; var addies = new List <AddressVm> { address1, address2 }; var larry = new EmployeeViewModel { FirstName = "larry", LastName = "larry", Addresses = addies }; var curly = new EmployeeViewModel { FirstName = "curly", LastName = "sue" }; var moe = new EmployeeViewModel { FirstName = "moe", LastName = "money", Addresses = addies }; var bob = new EmployeeViewModel { FirstName = "bob", LastName = "ooo" }; var john = new EmployeeViewModel { FirstName = "john", LastName = "doe", Addresses = addies }; var bobJr = new EmployeeViewModel { FirstName = "bob", LastName = "jones" }; Employees.AddRange(new List <EmployeeViewModel> { larry, curly, moe, bob, john, bobJr }); }
public void Initialize() { // Init DB Database.EnsureCreated(); // Seed data if (!Employees.Any()) { Employees.AddRange(GetEmployees()); } if (!TransitionSets.Any()) { TransitionSets.AddRange(GetDefaultTransitionSets()); } SaveChanges(); }
public MainViewModel() { SelectedProfile = new ProfileModel(); //pulls models from external source but no logic which collections are for try { profileCommand = new ProfileCommand(_connectionString); //list that comes from the database will be added to Emplyees Bindable collection Profiles.AddRange(profileCommand.GetList()); EmployeeCommand employeeCommand = new EmployeeCommand(_connectionString); //list that comes from the database will be added to Emplyees Bindable collection Employees.AddRange(employeeCommand.GetList()); CompanyCommand companyCommand = new CompanyCommand(_connectionString); //list that comes from the database will be added to Emplyees Bindable collection Companies.AddRange(companyCommand.GetList()); } catch (Exception ex) { AppStatus = ex.Message; NotifyOfPropertyChange(() => AppStatus); } }
public void Display(IEnumerable <Employee> employees) { Employees.Clear(); Employees.AddRange(employees); }
public Employee(string name, Employee manager, params Employee[] employees) : this(name, manager) { Employees.AddRange(employees); }
public override async Task InitializeAsync() { await base.InitializeAsync(); Employees.AddRange(Employee.EmployeeRepository); }