Beispiel #1
0
 public ActivityViewModel(ActivityDto activity, IHrService service, ILoadeableViewModel parentVm)
     : base(activity)
 {
     this.ParentVm = parentVm;
     this.Service = service;
     this.deleteActivityCommand = new RelayCommand(DeleteActivity, CanDeleteActivity);
 }
 public EmployeesController(IHrService hrService, IHrEmployeeService hrEmpService, RoleManager <IdentityRole> roleManager, UserManager <User> userManager)
 {
     this.hrService    = hrService;
     this.hrEmpService = hrEmpService;
     this.roleManager  = roleManager;
     this.userManager  = userManager;
 }
 public MedicalExamViewModel(IHrService service)
 {
     this.AddMedicalExamCommand = new RelayCommand(AddMedicalExam, CanAddMedicalExam);
     this.MedicalExams = new ObservableCollection<AbsenceViewModel>();
     this.FilteredPersons = new ObservableCollection<PersonDto>();
     this.AbsenceToAdd = new AbsenceDto();
     this.Service = service;
 }
        public EmployeesViewModel(IHrService hrService)
        {
            _hrService = hrService;

            LoadEmployeesCommand = new DelegateCommand(LoadEmployees);
            DeleteEmployeeCommand = new DelegateCommand(DeleteEmployee);
            SaveEmployeeCommand = new DelegateCommand(SaveEmployee);
        }
Beispiel #5
0
 public PersonViewModel(ILoadeableViewModel parentVm, IHrService service)
 {
     this.ParentVm = parentVm;
     this.Service = service;
     this.deletePersonCommand = new RelayCommand(DeletePerson, CanDeletePerson);
     this.editCommand = new RelayCommand(Edit, CanEdit);
     this.cancelCommand = new RelayCommand(Cancel, CanCancel);
 }
Beispiel #6
0
        public GroupViewModel(IHrService service, ILoadeableViewModel parentVm)
        {
            this.Group = group;
            this.Service = service;
            this.ParentVm = parentVm;

            this.deleteGroupCommand = new RelayCommand(DeleteGroup, CanDeleteGroup);
        }
 public static IEnumerable<PersonViewModel> ToViewModels(this IEnumerable<PersonDto> absences, IHrService service, ILoadeableViewModel vm)
 {
     var result = new List<PersonViewModel>();
     foreach (var person in absences)
     {
         result.Add(new PersonViewModel(vm, service) { Person = person, });
     }
     return result;
 }
 public static IEnumerable<AbsenceViewModel> ToViewModels(this IEnumerable<AbsenceDto> absences, IHrService service, ILoadeableViewModel vm)
 {
     var result = new List<AbsenceViewModel>();
     foreach (var absence in absences)
     {
         result.Add(new AbsenceViewModel(service, vm) { Absence = absence });
     }
     return result;
 }
 public static IEnumerable<GroupViewModel> ToViewModels(this IEnumerable<GroupDto> groups, IHrService srv, ILoadeableViewModel parentVm)
 {
     var list = new List<GroupViewModel>();
     foreach (var item in groups.OrderBy(e => e.Order))
     {
         list.Add(new GroupViewModel(srv, parentVm) { Group = item, });
     }
     return list;
 }
 public static IEnumerable<ActivityViewModel> ToViewModels(this IEnumerable<ActivityDto> activities, IHrService service, ILoadeableViewModel parentVm)
 {
     var list = new List<ActivityViewModel>();
     foreach (var a in activities)
     {
         list.Add(new ActivityViewModel(a, service, parentVm));
     }
     return list;
 }
Beispiel #11
0
        public GroupHrViewModel(IHrService service)
        {
            this.Service = service;
            this.Groups = new ObservableCollection<GroupViewModel>();
            this.Activities = new ListCollectionView(new List<ActivityViewModel>());
            this.AdministrativeActivities = new ListCollectionView(new List<ActivityViewModel>());
            this.BeneficiariesInGroup = new ObservableCollection<PersonModel>();
            this.BeneficiariesInActivity = new ObservableCollection<PersonModel>();
            this.EducatorsInActivity = new ObservableCollection<PersonModel>();

            this.addGroupCommand = new RelayCommand(AddGroup, CanAddGroup);
            this.updateGroupCommand = new RelayCommand(UpdateGroup, CanUpdateGroup);
            this.addActivityCommand = new RelayCommand(AddActivity, CanAddActivity);
            this.updateActivityCommand = new RelayCommand(UpdateActivity, CanUpdateActivity);
            this.ShowUpdateGroupCommand = new RelayCommand(ShowUpdateGroup, CanShowUpdateGroup);
            this.ShowUpdateActivityCommand = new RelayCommand(ShowUpdateActivity, CanShowUpdateActivity);
        }
Beispiel #12
0
 public EmployeesController(IEmployeeService employeeService, IHrService hrService)
 {
     _employeeService = employeeService;
     _hrService       = hrService;
 }
Beispiel #13
0
 public HRController(IHrService hrService)
 {
     HrService = hrService;
 }