public void TestGetEmployee()
 {
     //Arrange
     EmployeeModel model = new EmployeeModel(new FakeUnitOfWork());
     //Act
     CS_Employee result = model.GetEmployee(4);
     //Assert
     Assert.IsNotNull(result);
 }
 /// <summary>
 /// Add employee to a selected resources list
 /// </summary>
 public void AddEmployeeToCallEntry()
 {
     try
     {
         using (_employeeModel = new EmployeeModel())
         {
             CS_Employee employee = _employeeModel.GetEmployee(_view.SelectedEmployeeId);
             _view.SelectedPersons.Add(new CS_CallLogResource() { EmployeeID = employee.ID, CS_Employee = employee });
         }
     }
     catch (Exception ex)
     {
         Logger.Write(string.Format("An Error has ocurred while trying to AddEmployeeToCallEntry.\n{0}\n{1}", ex.Message, ex.StackTrace));
         _view.DisplayMessage("An Internal Error has ocurred while trying to load the Information. Please try again.", false);
     }
 }
        public void BindEmployeeByID()
        {
            using (_employeeModel = new EmployeeModel())
            {
                List<CS_Employee> returnList = new List<CS_Employee>();

                if (_view.EditEmployeeID.HasValue)
                    returnList.Add(_employeeModel.GetEmployee(_view.EditEmployeeID.Value));

                _view.EmployeeDataSource = returnList;
            }
        }
        public void GetEmployeeName()
        {
            string name = "--";

            if (_view.Identifier.HasValue)
            {
                using (_employeeModel = new EmployeeModel())
                {
                    name = _employeeModel.GetEmployee(_view.Identifier.Value).FullName;
                }
            }

            _view.ParamName = name;
        }