Пример #1
0
        public async Task <ActionResult> EmployeesEdit(int employeeID)
        {
            Employee employee = await employeeRepository.FindEmployeeByIDAsync(employeeID);

            if (employee == null)
            {
                return(HttpNotFound());
            }
            var model = new EditContractorEmployeesViewModel(employee);

            ViewBag.EmployeeRelationshipTypeID = new SelectList(employeeRelationshipTypeRepository.EmployeeRelationshipTypes(), "EmployeeRelationshipTypeID", "Description", employee.EmployeeRelationshipTypeID);
            return(View(model));
        }
Пример #2
0
        public async Task <ActionResult> Edit(int employeeID)
        {
            Employee employee = await employeeRepository.FindEmployeeByIDAsync(employeeID);

            if (employee == null)
            {
                return(HttpNotFound());
            }
            var model = new EditContractorEmployeesViewModel(employee);

            model.QRCode = QRCodeGenerator.GenerateQRCodeInMemory(employee.FullName + " - " + employee.IdentificationNumber.ToString());
            ViewBag.EmployeeRelationshipTypeID = new SelectList(employeeRelationshipTypeRepository.EmployeeRelationshipTypes(), "EmployeeRelationshipTypeID", "Description", employee.EmployeeRelationshipTypeID);
            return(View(model));
        }