示例#1
0
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            using (StatusBusy busy = new StatusBusy(moleQule.Face.Resources.Messages.SAVING))
            {
                this.Datos.RaiseListChangedEvents = false;

                IAcreedor temp = _entity.IClone();
                temp.ApplyEdit();

                // do the save
                try
                {
                    _entity = temp.ISave();
                    _entity.ApplyEdit();

                    return(true);
                }
                catch (Exception ex)
                {
                    PgMng.ShowInfoException(iQExceptionHandler.GetAllMessages(ex));
                    return(false);
                }
                finally
                {
                    this.Datos.RaiseListChangedEvents = true;
                }
            }
        }
示例#2
0
        /// <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;
            }
        }
示例#3
0
        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;
            }
        }