protected override void SetRowFormat(DataGridViewRow row) { if (row.IsNewRow) { return; } CashLineInfo item = (CashLineInfo)row.DataBoundItem; Face.Common.ControlTools.Instance.SetRowColorIM(row, item.EEstado); }
protected void ChangeState(EEstado estado) { if (Cobro == null) { PgMng.ShowInfoException(Face.Resources.Messages.NO_SELECTED); return; } if (Cobro.EEstado == EEstado.Anulado) { PgMng.ShowInfoException(Face.Resources.Messages.ITEM_ANULADO_NO_EDIT); return; } switch (estado) { case EEstado.Anulado: { if (Cobro.EEstado == EEstado.Contabilizado) { PgMng.ShowInfoException(Library.Common.Resources.Messages.NULL_CONTABILIZADO_NOT_ALLOWED); return; } if (Cobro.EMedioPago == EMedioPago.Efectivo) { CashLineInfo linea = CashLineInfo.GetByCobro(Cobro.Oid); if ((linea.Oid != 0) && (linea.OidCierre != 0) && (linea.EEstado != EEstado.Anulado)) { PgMng.ShowInfoException(String.Format(Resources.Messages.CIERRE_CAJA_COBRO, linea.Codigo, linea.Fecha)); return; } } if (ProgressInfoMng.ShowQuestion(Face.Resources.Messages.NULL_CONFIRM) != DialogResult.Yes) { return; } } break; } _entity.Cobros.ChangeState(estado, Cobro, _entity); _entity.ApplyEdit(); _entity.Save(); _entity.BeginEdit(); RefreshAction(); }
public void GoToSourceAction() { if (ActiveItem == null) { return; } if (ActiveItem.EEstado == EEstado.Anulado) { return; } switch (ActiveItem.ETipoMovimientoBanco) { case EBankLineType.Cobro: { switch (ActiveItem.ETipoTitular) { case ETipoTitular.Cliente: { ClienteInfo cliente = ClienteInfo.Get(ActiveItem.OidTitular, true); ChargeSummary item = ChargeSummary.Get(cliente); CobroEditForm form = new CobroEditForm(cliente.Oid, item, null, this); form.ShowDialog(this); } break; case ETipoTitular.Fomento: { ChargeInfo cobro = ChargeInfo.Get(ActiveItem.OidTitular, ETipoCobro.Fomento, false); CobrosFomentoEditForm form = new CobrosFomentoEditForm(cobro, this); form.ShowDialog(this); } break; case ETipoTitular.REA: { ChargeInfo cobro = ChargeInfo.Get(ActiveItem.OidTitular, ETipoCobro.REA, false); CobrosREAEditForm form = new CobrosREAEditForm(cobro, this); form.ShowDialog(); } break; } } break; case EBankLineType.PagoFactura: { ETipoAcreedor tipo = moleQule.Library.Store.EnumConvert.ToETipoAcreedor(ActiveItem.ETipoTitular); if ((new List <ETipoTitular> { ETipoTitular.TransportistaOrigen, ETipoTitular.TransportistaOrigen }).Contains(ActiveItem.ETipoTitular)) { TransporterInfo transporter = TransporterInfo.Get(ActiveItem.OidTitular, moleQule.Library.Store.EnumConvert.ToETipoAcreedor(ActiveItem.ETipoTitular), false); tipo = transporter.ETipoAcreedor; } PaymentSummary item = PaymentSummary.Get(tipo, ActiveItem.OidTitular); PaymentEditForm form = new PaymentEditForm(this, ActiveItem.OidTitular, item); form.ShowDialog(this); } break; case EBankLineType.PagoGasto: { ExpensePaymentEditForm form = new ExpensePaymentEditForm(ActiveItem.OidTitular, ETipoPago.Gasto, this); form.ShowDialog(); } break; case EBankLineType.PagoNomina: { PaymentSummary item = PaymentSummary.Get(ETipoAcreedor.Empleado, ActiveItem.OidTitular); EmployeePaymentEditForm form = new EmployeePaymentEditForm(this, ActiveItem.OidTitular, item); form.ShowDialog(); } break; case EBankLineType.PagoPrestamo: { LoanPaymentEditForm form = new LoanPaymentEditForm(ActiveItem.OidTitular, ETipoPago.Prestamo, this); form.ShowDialog(); } break; case EBankLineType.Prestamo: { LoanEditForm form = new LoanEditForm(ActiveItem.OidTitular, this); form.ShowDialog(); } break; case EBankLineType.EntradaCaja: case EBankLineType.SalidaCaja: { CashLineInfo linea = CashLineInfo.Get(ActiveItem.OidOperacion); if (linea.OidCierre != 0) { CashCountEditForm form = new CashCountEditForm(linea.OidCierre, this); form.ShowDialog(); } else { CashEditForm form = new CashEditForm(linea.OidCaja, this); form.ShowDialog(); } } break; case EBankLineType.Traspaso: { TraspasoEditForm form = new TraspasoEditForm(ActiveItem.OidTitular, this); form.ShowDialog(); } break; case EBankLineType.ExtractoTarjeta: { CreditCardPaymentEditForm form = new CreditCardPaymentEditForm(ActiveItem.OidOperacion, ETipoPago.ExtractoTarjeta, this); form.Show(); } break; } }