Ejemplo n.º 1
0
 public HomeController(IDepartamentRepository departamentRepository, IProgrammingLanguageDataRepository programmingLanguageDataRepository, IStaffDataRepository staffDataRepository, IStaffModelBuilder staffModelBuilder)
 {
     this.departamentRepository             = departamentRepository;
     this.programmingLanguageDataRepository = programmingLanguageDataRepository;
     this.staffDataRepository = staffDataRepository;
     this.staffModelBuilder   = staffModelBuilder;
 }
Ejemplo n.º 2
0
 public SearchController(IDepartamentRepository depRepository, IDepartamentBusinessLogic depBusinessLogic, ICompanyBusinessLogic companyBusinessLogic, IEmployeeBusinessLogic employeeBusinessLogic, UserManager <IdentityUser> userManager)
 {
     _depBusinessLogic      = depBusinessLogic;
     _companyBusinessLogic  = companyBusinessLogic;
     _employeeBusinessLogic = employeeBusinessLogic;
     _userManager           = userManager;
 }
Ejemplo n.º 3
0
        public async Task <TeacherModel> GetCreateTeacher(IDepartamentRepository repository)
        {
            var departaments = await repository.ToListAsync();

            TeacherModel model = new TeacherModel {
                Departaments = departaments
            };

            return(model.Clone() as TeacherModel);
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
0
        public LoginWindow()
        {
            InitializeComponent();
            workerRepository      = new WorkerRepository(new ApplicationContext());
            userReository         = new UserRepository(new ApplicationContext());
            departamentRepository = new DepartamentRepository(new ApplicationContext());

            //var x = departamentRepository.GetListFromCache().Where(p => p.Name == "Балет");
            //var y = departamentRepository.GetAllFromCache().Where(p => p.Name == "Балет");

            surnameComboBox.ItemsSource = workerRepository.GetListFromCache().Select(p => p.Surname);
        }
Ejemplo n.º 6
0
 public OrderCommandHandler(IMapper mapper,
                            IOrderRepository repository,
                            IDepartamentRepository departamentRepository,
                            ICustomerRepository customerRepository,
                            IProductRepository productRepository,
                            IUnitOfWork uow,
                            IMediatorHandler bus,
                            INotificationHandler <DomainNotification> notifications) : base(mapper, repository, uow, bus, notifications)
 {
     _departamentRepository = departamentRepository;
     _customerRepository    = customerRepository;
     _productRepository     = productRepository;
 }
Ejemplo n.º 7
0
        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
                });
            }
        }
Ejemplo n.º 8
0
        public WorkersWindow()
        {
            InitializeComponent();
            workerRepositoty      = new WorkerRepository(new ApplicationContext());
            departamentRepositoty = new DepartamentRepository(new ApplicationContext());
            contractRepositoty    = new ContractRepository(new ApplicationContext());

            IEnumerable <Worker> workers;

            workers = workerRepositoty.GetListFromCache();


            foreach (Worker wr in workers)
            {
                DateTime d2 = contractRepositoty.Get(p => p.WorkerId == wr.ID).Last().EndDate;
                TimeSpan d3 = d2 - DateTime.Now;
                workerListView.Items.Add(new Items
                {
                    wrk  = wr,
                    dep  = departamentRepositoty.GetByIdFromCahce(wr.DepartamentID),
                    date = d3
                });
            }
        }
Ejemplo n.º 9
0
        public async Task <TeacherModel> GetEditTeacher(int?id, IDepartamentRepository departamentRepository)
        {
            if (id == null)
            {
                return(null);
            }

            var teacher = await AllItems.Include(d => d.Departament).FirstOrDefaultAsync(z => z.Id == id);

            if (teacher == null)
            {
                return(null);
            }
            TeacherModel model = new TeacherModel
            {
                Id           = teacher.Id,
                FirstName    = teacher.FirstName,
                LastName     = teacher.LastName,
                Departament  = teacher.Departament,
                Departaments = await departamentRepository.ToListAsync()
            };

            return(model.Clone() as TeacherModel);
        }
Ejemplo n.º 10
0
 public DepartamentsController(IDepartamentRepository departamentRepository)
 {
     this.departamentRepository = departamentRepository;
 }
Ejemplo n.º 11
0
 public DepartamentService(IDepartamentRepository departamentRepository)
 {
     _departamentRepository = departamentRepository;
 }
 public DepartamentService(IDepartamentRepository departamentRepository) : base(departamentRepository)
 {
     this.departamentRepository = departamentRepository;
 }
Ejemplo n.º 13
0
 public DepartamentService(IDepartamentRepository departamentRepository, IUnitOfWork unitOfWork)
 {
     _departamentRepository = departamentRepository;
     _unitOfWork            = unitOfWork;
 }
Ejemplo n.º 14
0
 public DepartamentBusinessLogic(IDepartamentRepository repository)
 {
     _repository = repository;
 }
Ejemplo n.º 15
0
 public StaffModelBuilder(IStaffDataRepository staffDataRepository, IDepartamentRepository departamentRepository, IProgrammingLanguageDataRepository programmingLanguageDataRepository)
 {
     this.staffDataRepository               = staffDataRepository;
     this.departamentRepository             = departamentRepository;
     this.programmingLanguageDataRepository = programmingLanguageDataRepository;
 }
Ejemplo n.º 16
0
 public DepartamentService(IDepartamentRepository _repository)
 {
     this._repository = _repository;
 }
Ejemplo n.º 17
0
 public MainWindow()
 {
     InitializeComponent();
     workerRepositoty      = new WorkerRepository(new ApplicationContext());
     departamentRepositoty = new DepartamentRepository(new ApplicationContext());
 }
Ejemplo n.º 18
0
 public TeacherController(ITeacherRepository teacherRepository, IDepartamentRepository departamentRepository)
 {
     this.teacherRepository     = teacherRepository;
     this.departamentRepository = departamentRepository;
 }
        public DepartmentService(IDepartamentRepository departmentRepository) : base(departmentRepository)

        {
        }
Ejemplo n.º 20
0
 public DepartamentService()
 {
     _repository = new DepartamentRepository();
 }