/// <summary> /// Guarda en la bd el objeto actual /// </summary> protected override bool SaveObject() { this.Datos.RaiseListChangedEvents = false; Expedient temp = _entity.Clone(); temp.ApplyEdit(); // do the save try { if (_livestock_lines != null) { _livestock_lines.Save(); } _entity = temp.Save(); _entity.ApplyEdit(); return(true); } catch (Exception ex) { PgMng.ShowInfoException(ex.Message); PgMng.FillUp(); return(false); } finally { _entity.BeginEdit(); this.Datos.RaiseListChangedEvents = true; } }