예제 #1
0
        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;
                }
            }
        }
예제 #2
0
        // GET api/values
        public IEnumerable <Employee> Get()
        {
            var result = _employeeStore.GetAll();

            return(result);
            //  return new string[] { "value1", "value2" };
        }
예제 #3
0
        // GET: api/employee

        public List <Employee> Get()
        {
            var result = _employeeStore.GetAll();

            return(result);
        }
예제 #4
0
 public IEnumerable <Employee> GetAll()
 {
     return(_storage.GetAll());
 }