public ContractReturnController(IContractRepository contract, IContractTypeRepository type, IEmployeeRepository emp, IContractReturnRepository contrat_return, IUserRepository user, IReturnReasonRepository reason, IMapper mapper, IToastNotification toastNotification)
 {
     _user              = user;
     _contrat_return    = contrat_return;
     _mapper            = mapper;
     _toastNotification = toastNotification;
     _reason            = reason;
     _contract          = contract;
     _emp  = emp;
     _type = type;
 }
Beispiel #2
0
        public AddContractWindow(bool type)
        {
            InitializeComponent();
            artistCategoryRepositoty = new ArtistCategoryRepository(new ApplicationContext());
            contractTypeRepositoty   = new ContractTypeRepository(new ApplicationContext());

            //contractTypeRepositoty.getAll().Where(p => p.ID == 1).Select(p => p.Name)
            typeOfContract.ItemsSource = type ? contractTypeRepositoty.getAll().Select(p => p.Name) :
                                         contractTypeRepositoty.Get(p => p.ID == 1).Select(p => p.Name);
            artistCategory.ItemsSource = artistCategoryRepositoty.getAll().Select(p => p.Name);
        }
Beispiel #3
0
        public CreateWorkerWindow()
        {
            InitializeComponent();
            contractRepositoty       = new ContractRepository(new ApplicationContext());
            workerRepositoty         = new WorkerRepository(new ApplicationContext());
            departamentRepositoty    = new DepartamentRepository(new ApplicationContext());
            artistCategoryRepositoty = new ArtistCategoryRepository(new ApplicationContext());
            contractTypeRepositoty   = new ContractTypeRepository(new ApplicationContext());

            departament.ItemsSource = departamentRepositoty.GetListFromCache().Select(p => p.Name);
            //departament.ItemsSource = departamentRepositoty.getAll().Select(p => p.Name);
        }
        public ChangeWorkerWindow(Worker wr, Departament dp)
        {
            InitializeComponent();
            contractRepositoty       = new ContractRepository(new ApplicationContext());
            workerRepositoty         = new WorkerRepository(new ApplicationContext());
            departamentRepositoty    = new DepartamentRepository(new ApplicationContext());
            artistCategoryRepositoty = new ArtistCategoryRepository(new ApplicationContext());
            contractTypeRepositoty   = new ContractTypeRepository(new ApplicationContext());
            departament.ItemsSource  = departamentRepositoty.GetListFromCache().Select(p => p.Name);

            worker = wr;

            this.name.Text        = wr.Name;
            this.departament.Text = dp.Name;


            this.name.Text = worker.Name;

            this.departament.Text    = departamentRepositoty.GetByIdFromCahce(wr.DepartamentID).Name;
            this.birthPlace.Text     = worker.BirthPlace;
            surname.Text             = worker.Surname;
            patronymic.Text          = worker.Patronymic;
            registrationPlace.Text   = worker.RegistrationPlace;
            birthPlace.Text          = worker.BirthPlace;
            dateOfBirth.SelectedDate = worker.DateOfBirth;
            nationality.Text         = worker.Nationality;
            education.Text           = worker.Education;
            sex.Text           = worker.Sex == true ? "мужской" : "женский";
            maritalStatus.Text = worker.MaritalStatus == true ? "холост" : "женат";
            phoneNum.Text      = worker.PhoneNum;
            email.Text         = worker.Email;


            IEnumerable <Contract> contracts;

            contracts       = contractRepositoty.Get(p => p.WorkerId == wr.ID);
            dayLeft.Content = "Последний контракт истекает через: " +
                              (contracts.Last().EndDate - DateTime.Now).Days.ToString() + " дня";
            foreach (Contract cntr in contracts)
            {
                contractListView.Items.Add(new Items
                {
                    contr = cntr
                });
            }
        }
Beispiel #5
0
        public AddContractWindow(string type, string placeType, DateTime beginDate, DateTime endDate, int orderN, string posit)
        {
            InitializeComponent();

            artistCategoryRepositoty = new ArtistCategoryRepository(new ApplicationContext());
            contractTypeRepositoty   = new ContractTypeRepository(new ApplicationContext());

            typeOfContract.ItemsSource = contractTypeRepositoty.getAll().Select(p => p.Name);   // add cache?
            artistCategory.ItemsSource = artistCategoryRepositoty.getAll().Select(p => p.Name); //???

            orderNum.Text              = orderN.ToString();
            this.position.Text         = posit;
            artistCategory.Text        = placeType;
            typeOfContract.Text        = type;
            beginningDate.SelectedDate = beginDate;
            this.endDate.SelectedDate  = endDate;
        }
Beispiel #6
0
 public ContractService(IUnitOfWork unitOfWork, StockService stockService,
                        ICustomerAccountRepository contractUnitRepository,
                        IContractTypeRepository contractTypeRepository,
                        IContractRepository contractRepository,
                        IPaymentPeriodRepository paymentPeriodRepository,
                        IRentedUnitRepository rentedUnitRepository,
                        IPostedRepository postedRepository, MiscService miscService)
     : base(unitOfWork)
 {
     _stockService            = stockService;
     _contractUnitRepsoitory  = contractUnitRepository;
     _contractTypeRepository  = contractTypeRepository;
     _contractRepository      = contractRepository;
     _paymentPeriodRepository = paymentPeriodRepository;
     _rentedUnitRepository    = rentedUnitRepository;
     _postedRepository        = postedRepository;
     _miscService             = miscService;
 }
 public SpecificContractsController(ICityRepository city, IContractTypeRepository contract_Type, ICountryRepository country, IForeignAgencyRepository agency, IEmployeeRepository emp, IReceiptDocRepository receipt, IContractSelectRepository select, IUserRepository user, IContractHistoryRepository history, IContractTicketRepository ticket, IContractVisaRepository visa, IContractDelegateRepository deleg, IJobTypeReository jobtype, ICustomerRepository customer, INationalityRepository nationality, ISpecificContractRepository contract, IMapper mapper, IToastNotification toastNotification)
 {
     _contract_Type     = contract_Type;
     _receipt           = receipt;
     _Contract          = contract;
     _mapper            = mapper;
     _toastNotification = toastNotification;
     _nationality       = nationality;
     _customer          = customer;
     _city     = city;
     _country  = country;
     _jobtype  = jobtype;
     _select   = select;
     _delegate = deleg;
     _visa     = visa;
     _ticket   = ticket;
     _history  = history;
     _user     = user;
     _emp      = emp;
     _agency   = agency;
 }
 public ContractTypeController(IContractTypeRepository repository)
 {
     _repository = repository;
 }
Beispiel #9
0
 public UpdateContractTypeCommandHandler(IContractTypeRepository contractTypeRepository,
                                         IAuthenticatedUserService authenticatedUserService)
 {
     _contractTypeRepository   = contractTypeRepository;
     _authenticatedUserService = authenticatedUserService;
 }
Beispiel #10
0
 public GetAllContractTypesQueryHandler(IContractTypeRepository contractTypeRepository, IAuthenticatedUserService authenticatedUserService)
 {
     _contractTypeRepository   = contractTypeRepository;
     _authenticatedUserService = authenticatedUserService;
 }
Beispiel #11
0
 public ContractTypesController(IUnitOfWork unitOfWork, IContractTypeRepository contractTypeRepository)
 {
     _unitOfWork             = unitOfWork;
     _contractTypeRepository = contractTypeRepository;
 }
 public ContractController(IContractRepository contractRepository, IGebruikerRepository gebruikerRepository, IContractTypeRepository contractTypeRepository)
 {
     _contractRepository     = contractRepository;
     _gebruikerRepository    = gebruikerRepository;
     _contractTypeRepository = contractTypeRepository;
 }
 public ContractTypeService(IContext context, IContractTypeRepository repository)
     : base(context, repository)
 {
     _repository = repository;
     _context    = context;
 }
 public ContractController(IGebruikerRepository gebruikerRepository, IContractTypeRepository contractTypeRepository, INotyfService notyf)
 {
     _gebruikerRepository    = gebruikerRepository;
     _contractTypeRepository = contractTypeRepository;
     _notyf = notyf;
 }