protected override void EditPagoAction() { bool locked = false; if (Pago == null) { PgMng.ShowInfoException(Face.Resources.Messages.NO_SELECTED); return; } if (Pago.EEstado == moleQule.Base.EEstado.Anulado) { PgMng.ShowInfoException(Face.Resources.Messages.ITEM_ANULADO_NO_EDIT); return; } PayrollPaymentEditForm form = new PayrollPaymentEditForm(this, _entity, Pago.Oid, locked); form.MedioPago_BT.Enabled = false; form.ShowDialog(this); Payment current = Pago; Payments_BS.ResetBindings(false); _summary.Refresh(_entity); Summary_BS.ResetBindings(false); SetGridColors(Pagos_DGW.Name); _payrolls = PayrollList.GetListByEmpleado(_entity.Oid, false); Select(current); }
public void ShowPagoAction() { if (ActiveItem.EEstado == moleQule.Base.EEstado.Anulado) { return; } if (ActiveItem.OidPago == 0) { Payment pago = Payment.New(ActiveItem); PayrollPaymentAddForm form = new PayrollPaymentAddForm(pago, this); form.ShowDialog(this); if (form.ActionResult == DialogResult.OK) { ActiveItem.CopyFrom(form.Entity); ExecuteAction(molAction.Refresh); } } else { PayrollPaymentEditForm form = new PayrollPaymentEditForm(ActiveItem.OidPago, moleQule.Store.Structs.EnumConvert.ToETipoPago(ECategoriaGasto.Nomina), this); form.ShowDialog(this); ExecuteAction(molAction.Refresh); } }
protected override void ViewPagoAction() { if (Pago == null) { PgMng.ShowInfoException(Face.Resources.Messages.NO_SELECTED); return; } PayrollPaymentEditForm form = new PayrollPaymentEditForm(this, _entity, Pago.Oid, false); form.SetReadOnly(); form.ShowDialog(this); }