Exemplo n.º 1
0
 private void RetrieveData()
 {
     using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CRMDataStoreKey))
     {
         EmployeeFacade facade   = new EmployeeFacade(uow);
         EmployeeDto    instance = facade.RetrieveOrNewEmployee(InstanceId, new EmployeeConverter());
         CurrentInstance         = instance;
         ucIEdit.CurrentInstance = instance;
     }
 }
Exemplo n.º 2
0
 private void RetrieveInstances(EmployeeFacade facade)
 {
     if (CurrentUserContext.IsAdmin)
     {
         CurrentInstances = facade.RetrieveAllEmployee(new EmployeeConverter());
     }
     else if (CurrentUserContext.IsEmployee)
     {
         List <EmployeeDto> instances = new List <EmployeeDto>();
         EmployeeDto        instance  = facade.RetrieveOrNewEmployee(CurrentUserContext.User.MatchId, new EmployeeConverter());
         instances.Add(instance);
         CurrentInstances = instances;
     }
 }