public ClockInOutWindow(int id) { InitializeComponent(); lblDepartment.Visible = false; cmbxDepartment.Visible = false; dtpClockIn.Value = DateTime.Now; dtpClockOut.Value = DateTime.Now; this.userid = id; employeeStorage = new EmployeeMySQL(); shiftStorage = new ShiftMySQL(); departmentStorage = new DepartmentMySQL(); ComboboxItem ci = null; foreach (Employee e in employeeStorage.GetAll(true)) { ci = new ComboboxItem(); ci.Text = e.Id.ToString() + " - " + e.FirstName + " " + e.SurName; ci.Value = e.Id; cmbxEmployee.Items.Add(ci); if (e.Id == id) { cmbxEmployee.SelectedItem = ci; } } }
// GET api/values public IEnumerable <Employee> Get() { var result = _employeeStore.GetAll(); return(result); // return new string[] { "value1", "value2" }; }
// GET: api/employee public List <Employee> Get() { var result = _employeeStore.GetAll(); return(result); }
public IEnumerable <Employee> GetAll() { return(_storage.GetAll()); }