Beispiel #1
0
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;

            Loan temp = _entity.Clone();

            temp.ApplyEdit();

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

                //foreach (Payment item in _payments)
                //{
                //    item.OidAgente = _entity.Oid;
                //    foreach (TransactionPayment tr in item.Operations)
                //        tr.OidOperation = _entity.Oid;
                //}

                //_payments.Save();

                return(true);
            }
            catch (Exception ex)
            {
                CleanCache();
                PgMng.ShowInfoException(ex);
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
            }
        }