Beispiel #1
0
        public JsonResult Save(DoctorDesinationViewmodel model)
        {
            int saveIndex = 0;

            DoctorsDesignation doctorsDesignation = new DoctorsDesignation();

            doctorsDesignation.DoctorDesignationId = model.DoctorDesignationId;
            doctorsDesignation.DesignationName     = model.DesignationName;
            doctorsDesignation.Description         = model.Description;

            saveIndex = model.DoctorDesignationId == 0
                ? DoctorDesignationManager.Save(doctorsDesignation)
                : DoctorDesignationManager.Edit(doctorsDesignation);

            return(Reload(saveIndex));
        }