void FillLocations() { listBox1.Items.Clear(); var locations = _workingLocationService.Get(); if (locations.Count > 0) { foreach (var item in locations) { listBox1.Items.Add(item); } } }
private void TallyForm_Load(object sender, EventArgs e) { var employees = _employeeService.Get(); foreach (Employee item in employees) { lbx_employee.Items.Add(item); } var locations = _workingLocationService.Get(); foreach (var item in locations) { cmb_location.Items.Add(item); } cmb_location.SelectedIndex = 0; }