public IActionResult Editar(int id)
        {
            var scholarshipProgramTracing = _scholarshipProgramTracing.GetById(id);



            var scholarshipProgramTracingModel = CopyPropierties.Convert <ScholarshipProgramTracing, ScholarshipProgramTracingModel>(scholarshipProgramTracing);
            var technicals = _agent.GetTechnicals.Select(x => new GetAgents {
                AgentId = x.AgentId, FullName = x.Contact.ContactName.ToString() + " " + x.Contact.ContactLastname
            });
            var coordinators = _agent.GetCoordinators.Select(x => new GetAgents {
                AgentId = x.AgentId, FullName = x.Contact.ContactName.ToString() + " " + x.Contact.ContactLastname
            });
            var scholarshipProgram = _scholarshipProgramUniversity.ScholarshipProgramUniversity
                                     .Select(x => new GetScholarShipProgram
            {
                ScholarshipProgramUniversityId = x.ScholarshipProgramUniversityId,
                ScholarShipProgramNameScatCodeContractNumber = x.ScholarshipProgram.ScholarshipProgramName.ToString() + ", " + x.ScatProgramCode.ToString()
                                                               + ", " + x.ContractNumber.ToString()
            });

            scholarshipProgramTracingModel.SelectedProgram = scholarshipProgramTracingModel.ScholarshipProgramUniversity.ScholarshipProgram.ScholarshipProgramName.ToString() + ", " +
                                                             scholarshipProgramTracingModel.ScholarshipProgramUniversity.ScatProgramCode.ToString() + ", " +
                                                             scholarshipProgramTracingModel.ScholarshipProgramUniversity.ContractNumber.ToString();


            ViewBag.ScholarshipProgram = new SelectList(scholarshipProgram, "ScholarshipProgramUniversityId", "ScholarShipProgramNameScatCodeContractNumber");
            ViewBag.Coordinator        = new SelectList(coordinators, "AgentId", "FullName");
            ViewBag.Technical          = new SelectList(technicals, "AgentId", "FullName");
            ViewBag.Status             = new SelectList(_status.Status, "StatusId", "StatusName");
            ViewBag.University         = new SelectList(_university.Universities, "UniversityId", "UniversityName");

            return(View("Crear", scholarshipProgramTracingModel));
        }
Exemplo n.º 2
0
        public IActionResult Editar(int id)
        {
            var data = _scholarshipProgramTracing.GetById(id);

            var model = CopyPropierties.Convert <ScholarshipProgramTracing, ScholarshipProgramTracingModel>(data);


            ViewBag.University = new SelectList(_university.Universities, "UniversityId", "UniversityName");
            //ViewBag.ScholarshipProgramUniversity = new SelectList(_scholarshipProgramUniversity.ScholarshipProgramUniversity, "ScholarshipProgramUniversityId", );
            //ViewBag.ScholarshipProgram = new SelectList(_scholarshipProgramUniversity.ScholarshipProgramUniversity,);
            //ViewBag.Coordinator = new SelectList(_agentType.GetCoordinators, "AgentTypeId", "AgentTypeName");
            //ViewBag.Technical = new SelectList(_agentType.GetTechnicals, "AgentTypeId", "AgentTypeName");
            ViewBag.Status = new SelectList(_status.Status, "StatusId", "StatusName");
            return(View("Crear", model));
        }
Exemplo n.º 3
0
        public IActionResult Editar(int id)
        {
            var scholarshipProgramTracing = _scholarshipProgramTracing.GetById(id);

            //var scholarshipProgramTracingModel = new ScholarshipProgramTracingModel
            //{
            //    ScholarshipProgramTracingId = scholarshipProgramTracing.ScholarshipProgramTracingId,
            //    UniversityId = scholarshipProgramTracing.UniversityId,
            //    ScholarshipProgramUniversityId = scholarshipProgramTracing.ScholarshipProgramUniversityId,
            //    CoordinatorId = scholarshipProgramTracing.CoordinatorId,
            //    TechnicalId = scholarshipProgramTracing.TechnicalId,
            //    StartDate = scholarshipProgramTracing.StartDate,
            //    EndDate = scholarshipProgramTracing.EndDate,
            //    CreationUserId = scholarshipProgramTracing.CreationUserId,
            //    UpgradeUserId = scholarshipProgramTracing.UpgradeUserId,
            //    CreationDate = scholarshipProgramTracing.CreationDate,
            //    UpgradeDate = scholarshipProgramTracing.UpgradeDate,
            //    StatusId = scholarshipProgramTracing.StatusId,
            //    Coordinator = scholarshipProgramTracing.Coordinator,
            //    CreationUser = scholarshipProgramTracing.CreationUser,
            //    ScholarshipProgramUniversity = scholarshipProgramTracing.ScholarshipProgramUniversity,
            //    Status = scholarshipProgramTracing.Status,
            //    Technical = scholarshipProgramTracing.Technical,
            //    ScholarshipProgramTracingAgreement = scholarshipProgramTracing.ScholarshipProgramTracingAgreement,
            //    ScholarshipProgramTracingCourse = scholarshipProgramTracing.ScholarshipProgramTracingCourse,
            //    ScholarshipProgramTracingCourseFile = scholarshipProgramTracing.ScholarshipProgramTracingCourseFile,
            //    ScholarshipProgramTracingPractice = scholarshipProgramTracing.ScholarshipProgramTracingPractice,
            //    ScholarshipProgramTracingPracticePlanning = scholarshipProgramTracing.ScholarshipProgramTracingPracticePlanning,
            //    ScholarshipProgramTracingQualitySystem = scholarshipProgramTracing.ScholarshipProgramTracingQualitySystem,
            //    ScholarshipProgramTracingStudentPractice = scholarshipProgramTracing.ScholarshipProgramTracingStudentPractice,
            //    ScholarshipProgramTracingStudentSupport = scholarshipProgramTracing.ScholarshipProgramTracingStudentSupport,
            //    TracingStudyPlanDevelopment = scholarshipProgramTracing.TracingStudyPlanDevelopment
            //};

            var scholarshipProgramTracingModel = CopyPropierties.Convert <ScholarshipProgramTracing, ScholarshipProgramTracingModel>(scholarshipProgramTracing);

            ViewBag.University = new SelectList(_university.Universities, "UniversityId", "UniversityName");

            return(View("Crear", scholarshipProgramTracingModel));
        }