Exemple #1
0
        public JsonResult Save(PatientConditionViewModel model)
        {
            ModelState.Clear();

            int saveIndex = 0;

            PatientCondition _patientCondition = new PatientCondition();

            _patientCondition.PatientConditionId = model.PatientConditionId;
            _patientCondition.PatienId           = model.PatienId;
            _patientCondition.DiseasesId         = model.DiseasesId;
            _patientCondition.ServiceId          = model.ServiceId;
            _patientCondition.Beforetreatment    = model.Beforetreatment;
            _patientCondition.AfterTreatment     = model.AfterTreatment;
            _patientCondition.Createddate        = model.Createddate;
            _patientCondition.ModifiedDate       = model.ModifiedDate;

            saveIndex = model.PatientConditionId == 0
                ? PatientConditionManager.Save(_patientCondition)
                : PatientConditionManager.Edit(_patientCondition);
            return(Reload(saveIndex));
        } //$.getJSON('/CourseAssignToTeacher/GetTeachersByDepartmentId', { id: deptId }).done(function(data) {
        public JsonResult Save(PatientConditionViewModel model)
        {
            ModelState.Clear();

            int saveIndex = 0;

            PatientCondition _patientCondition = new PatientCondition();

            _patientCondition.PatientConditionId = model.PatientConditionId;
            _patientCondition.PatienId           = model.PatienId;
            _patientCondition.DiseasesId         = model.DiseasesId;
            _patientCondition.ServiceId          = model.ServiceId;
            _patientCondition.Beforetreatment    = model.Beforetreatment;
            _patientCondition.AfterTreatment     = model.AfterTreatment;
            _patientCondition.Createddate        = model.Createddate;
            _patientCondition.ModifiedDate       = model.ModifiedDate;

            saveIndex = model.PatientConditionId == 0
                ? PatientConditionManager.Save(_patientCondition)
                : PatientConditionManager.Edit(_patientCondition);
            return(Reload(saveIndex));
        }