Пример #1
0
        public IActionResult AddEducation(AddEducationViewModel model)
        {
            if (ModelState.IsValid)
            {
                EmployeeEducation newEducation = new EmployeeEducation
                {
                    EmployeeId    = model.EmployeeId,
                    Department    = model.Department,
                    DegreeId      = model.DegreeId,
                    Degree        = model.Degree,
                    Institution   = model.Institution,
                    StillStudying = model.StillStudying,

                    Notes          = model.Notes,
                    Thesis         = model.Thesis,
                    EntranceDate   = model.EntranceDate,
                    GraduationDate = model.GraduationDate
                };
                _employeeRepository.AddEmpEducation(newEducation);

                var successMessage = "Education InfoCreated Successfully. Name: " + newEducation.EmployeeId;
                TempData["successAlert"] = successMessage;
                // return RedirectToAction( successMessage, "");
                return(PartialView("_PartialMessage"));
            }
            return(View());
        }