コード例 #1
0
        public void GotoPagoAction()
        {
            if (ActiveItem.EEstado == moleQule.Base.EEstado.Anulado)
            {
                return;
            }
            if (ActiveItem.Total == 0)
            {
                return;
            }

            if (ActiveItem.OidPago == 0)
            {
                //Se obtiene el registro desde la DB para que actualice el pendiente de pago
                //en el caso de que se haya creado justo antes de esta acción
                Payment pago = Payment.New(ExpenseInfo.Get(ActiveItem.Oid, false), moleQule.Store.Structs.EnumConvert.ToETipoPago(ActiveItem.ECategoriaGasto));
                ExpensePaymentAddForm form = new ExpensePaymentAddForm(pago, this);
                form.ShowDialog(this);

                if (form.ActionResult == DialogResult.OK)
                {
                    ActiveItem.CopyFrom(form.Entity);
                }
            }
            else
            {
                ExpensePaymentEditForm form = new ExpensePaymentEditForm(ActiveItem.OidPago, moleQule.Store.Structs.EnumConvert.ToETipoPago(ActiveItem.ECategoriaGasto), this);
                form.ShowDialog(this);
            }
        }
コード例 #2
0
 protected override void GetFormSourceData(long oid, object[] parameters)
 {
     _entity = ExpenseInfo.Get(oid, true);
 }