Пример #1
0
        public ViewResult Cv(int id)
        {
            CvViewModel CompleteCv      = new CvViewModel();
            Assigment   assigment       = new Assigment();
            Assigment   focusassingment = new Assigment();
            Employee    employee        = new Employee();

            Expertise  expertise  = new Expertise();
            Middleware middelware = new Middleware();
            Training   training   = new Training();
            Trade      trade      = new Trade();
            Technique  tech       = new Technique();

            var emp = EmployeeService.Get(id);

            CompleteCv.Employee        = employee.GetEmployeeView(emp);
            CompleteCv.Expertises      = expertise.GetExpertiseView(id);
            CompleteCv.Middlewares     = middelware.GetMiddlewareView(id);
            CompleteCv.Techniques      = tech.GetTechniqueView(id);
            CompleteCv.Trades          = trade.GetTradeView(id);
            CompleteCv.DegreeTraining  = training.GetDegreeTrainingView(id);
            CompleteCv.Trainings       = training.GetTrainingView(id);
            CompleteCv.Assigments      = assigment.GetAllNonFocusAssignments(id);
            CompleteCv.FocusAssigments = focusassingment.GetAllFocusAssignments(id);

            return(View(CompleteCv));
        }
Пример #2
0
        // GET: Employees/Details/5
        public async Task <IActionResult> Details(int id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var      context  = new SqlLiteContext();
            Employee employee = await context.Employees
                                .FirstOrDefaultAsync(m => m.EmployeeId == id);

            if (employee == null)
            {
                return(NotFound());
            }

            CvViewModel CompleteCv      = new CvViewModel();
            Assigment   assigment       = new Assigment();
            Assigment   focusassingment = new Assigment();

            Expertise  expertise  = new Expertise();
            Middleware middelware = new Middleware();
            Training   training   = new Training();
            Trade      trade      = new Trade();
            Technique  tech       = new Technique();


            CompleteCv.Employee        = employee.GetEmployeeView(employee);
            CompleteCv.Expertises      = expertise.GetExpertiseView(id);
            CompleteCv.Middlewares     = middelware.GetMiddlewareView(id);
            CompleteCv.Techniques      = tech.GetTechniqueView(id);
            CompleteCv.Trades          = trade.GetTradeView(id);
            CompleteCv.DegreeTraining  = training.GetDegreeTrainingView(id);
            CompleteCv.Trainings       = training.GetTrainingView(id);
            CompleteCv.Assigments      = assigment.GetAllNonFocusAssignments(id);
            CompleteCv.FocusAssigments = focusassingment.GetAllFocusAssignments(id);

            return(View(CompleteCv));
        }