コード例 #1
0
        protected override void GetFormSourceData(long oid, object[] parameters)
        {
            _entity = Expedient.Get(oid, false);
            PgMng.Grow(string.Empty, "Expedient");

            _entity.LoadChilds(typeof(Batch), true, true);
            PgMng.Grow(string.Empty, "Partidas");

            _entity.LoadChilds(typeof(Expense), true, true);
            PgMng.Grow(string.Empty, "Gastos");

            _entity.UpdateGastosPartidas(true);
            _entity.UpdateTotalesProductos(_entity.Partidas, true);
            PgMng.Grow(string.Empty, "Updates");

            _entity.BeginEdit();
        }
コード例 #2
0
        protected override void GetFormSourceData(long oid, object[] parameters)
        {
            _entity = Expedient.Get(oid, false);
            PgMng.Grow(string.Empty, "Expediente");

            _entity.LoadChilds(typeof(Batch), true, true);
            PgMng.Grow(string.Empty, "Partidas");

            try
            {
                _entity.LoadChilds(typeof(Expense), true, true);
                PgMng.Grow(string.Empty, "Gastos");
            }
            catch
            {
                PgMng.ShowWarningException(Resources.Messages.DUPLICATED_EXPENSE_LINE);
            }

            _entity.UpdateTotalesProductos(_entity.Partidas, true);
            PgMng.Grow(string.Empty, "Updates");

            _entity.BeginEdit();
        }