/// <summary> /// /// </summary> public override void AceptChanges(bool this_will_close) { Set_PatientAllergy(_PatientAllergy_Aux); try { if (_PatientAllergy.EntityState == Fwk.Bases.EntityState.Added) { Set_PatientAllergy(_PatientAllergy); ServiceCalls.CreateUpdatePatientAllergy(_PatientAllergy); } else { if (CheckChanges()) { Set_PatientAllergy(_PatientAllergy); ServiceCalls.CreateUpdatePatientAllergy(_PatientAllergy); } } if (this_will_close == false) { this.MessageViewer.Show("Las alergias se actualizaron con exito .-"); frmPatientAtencion.PopulateAsync(this); _PatientAllergy.EntityState = Fwk.Bases.EntityState.Unchanged; _PatientAllergy_Aux = null; _PatientAllergy_Aux = _PatientAllergy.Clone <PatientAllergyBE>(); } } catch (Exception ex) { this.ExceptionViewer.Show(ex); } }