예제 #1
0
        public ActionResult GetEducationItemsByAjax(string id)
        {
            var personEducationModel = new PersonEducationModel();
            var personEducationItems = personEducationModel.GetListOfPersonEducationItemsForPerson(int.Parse(id), false, false);

            return(PartialView("_EducationGrid", personEducationItems));
        }
예제 #2
0
        public ActionResult Edit(string id)
        {
            var personEducationModel = new PersonEducationModel();
            var educationDetails     = personEducationModel.GetSpecificPersonEducation(int.Parse(id));

            return(PartialView("_EducationEdit", educationDetails));
        }
예제 #3
0
        public ActionResult Edit(Person_Education education)
        {
            var          dateLastModified = DateTime.Now;
            const string modifiedBy       = "jhendrikse";
            const bool   isActive         = true;
            const bool   isDeleted        = false;

            var personEducationModel = new PersonEducationModel();
            var editEducationDetail  = personEducationModel.EditPersonEducation(education.Person_Education_Id, education.School_Id, education.Grade_Completed_Id, education.Year_Completed, education.Date_Last_Attended, education.Additional_Information, dateLastModified, modifiedBy, isActive, isDeleted);

            var status  = "OK";
            var message = "The education details have been successfully edited";

            if (editEducationDetail == null)
            {
                status  = "Error";
                message = "A technical error has occurred! Please try again later";
            }

            return(new JsonResult {
                Data = new { status, message }
            });
        }