/// <summary> /// Guarda en la bd el objeto actual /// </summary> protected override bool SaveObject() { this.Datos.RaiseListChangedEvents = false; // do the save try { if (_holder != null) { //IAcreedor temp = _acreedor.IClone(); //temp.ApplyEdit(); //_acreedor = temp.ISave(_entity); //_acreedor.ApplyEdit(); _holder.ApplyEdit(); _holder.ISave(_entity); _holder.BeginEdit(); } else { Payment temp = _entity.Clone(); temp.ApplyEdit(); _entity = temp.Save(); _entity.ApplyEdit(); } return(true); } catch (Exception ex) { PgMng.ShowWarningException(ex.Message); return(false); } finally { this.Datos.RaiseListChangedEvents = true; } }
protected bool SaveObject() { this.Datos.RaiseListChangedEvents = false; // do the save try { _holder.ApplyEdit(); _holder.ISave(_entity); _holder.BeginEdit(); return(true); } catch (Exception ex) { PgMng.ShowErrorException(ex); return(false); } finally { this.Datos.RaiseListChangedEvents = true; } }