protected override void DeleteDeliveryAction() { if (Entity.AlbaranFacturas.Count == 0) { return; } DeliverySelectForm form = new DeliverySelectForm(this, ETipoEntidad.Cliente, OutputDeliveryList.GetList(_out_deliveries)); form.ShowDialog(this); if (form.DialogResult == DialogResult.OK) { List <OutputDeliveryInfo> results = form.Selected as List <OutputDeliveryInfo>; foreach (OutputDeliveryInfo item in results) { _entity.Extract(item); _out_deliveries.Remove(item); } } if (_entity.AlbaranFacturas.Count == 0) { Serie_BT.Enabled = true; } Lines_BS.ResetBindings(false); }
private void Descuento_NTB_TextChanged(object sender, EventArgs e) { _entity.PDescuento = PDescuento_NTB.DecimalValue; _entity.CalculateTotal(); Lines_BS.ResetBindings(false); Datos.ResetBindings(false); }
protected void SetTipo() { CashLine item = Lines_DGW.CurrentRow.DataBoundItem as CashLine; SelectEnumInputForm form = new SelectEnumInputForm(true); if (_linea_libre) { ETipoLineaCaja[] list = { ETipoLineaCaja.SalidaPorIngreso, ETipoLineaCaja.EntradaPorTraspaso, ETipoLineaCaja.EntradaPorTarjetaCredito, ETipoLineaCaja.Otros }; form.SetDataSource(Library.Invoice.EnumText <ETipoLineaCaja> .GetList(list)); } else { ETipoLineaCaja[] list = { ETipoLineaCaja.SalidaPorIngreso, ETipoLineaCaja.EntradaPorTraspaso, ETipoLineaCaja.EntradaPorTarjetaCredito }; form.SetDataSource(Library.Invoice.EnumText <ETipoLineaCaja> .GetList(list)); } if (form.ShowDialog(this) == DialogResult.OK) { ComboBoxSource tipo = form.Selected as ComboBoxSource; item.ETipoLinea = (ETipoLineaCaja)tipo.Oid; SetRowFormat(Lines_DGW.CurrentRow); Lines_BS.ResetBindings(false); } }
private void FacturaAddForm_Shown(object sender, EventArgs e) { if (_out_delivery != null) { AddAlbaran(_out_delivery); Lines_BS.ResetBindings(true); Lines_DGW.Refresh(); } }
protected override void AddDeliveryAction() { _entity.AlbaranContado = Agrupada_CkB.Checked; AddAlbaran(); if (Result == BGResult.OK) { Lines_BS.ResetBindings(false); } }
private void Descuento_NTB_TextChanged(object sender, EventArgs e) { if (_entity.PDescuento != 0) { Descuento_NTB.Text = Decimal.Round(_entity.Descuento, 2).ToString(); return; } _entity.Descuento = Descuento_NTB.DecimalValue; _entity.CalculateTotal(); Lines_BS.ResetBindings(false); Datos.ResetBindings(false); }
protected override void SetProvider(IAcreedorInfo source) { if (source == null) { return; } base.SetProvider(source); if (_entity.Conceptos.Count == 0) { _entity.AddProductosAcreedor(_provider, _serie); } Lines_BS.ResetBindings(false); }
protected override void EditLineAllocationAction(DataGridViewRow row) { InputDecimalForm form = new InputDecimalForm(); form.Message = Resources.Labels.IMPORTE_PAGO_GASTO; if (form.ShowDialog(this) == DialogResult.OK) { CreditCardStatementInfo item = row.DataBoundItem as CreditCardStatementInfo; _deallocated += item.Asignado; _entity.EditTransactionPayment(item, form.Value); LinkLineAction(row); SetUnlinkedGridValues(Lines_DGW.Name); Lines_BS.ResetBindings(false); SetGridColors(Lines_DGW); } }
protected override void SetCreditCardAction() { if (!ControlsMng.IsCurrentItemValid(Lines_DGW)) { return; } CashLine item = ControlsMng.GetCurrentItem(Lines_DGW) as CashLine; if (item.Locked) { return; } if (!new ETipoLineaCaja[] { ETipoLineaCaja.EntradaPorTarjetaCredito }.Contains(item.ETipoLinea)) { return; } CreditCardSelectForm form = new CreditCardSelectForm(this); if (form.ShowDialog(this) == DialogResult.OK) { CreditCardInfo credit_card = form.Selected as CreditCardInfo; if (credit_card.ETipoTarjeta != ETipoTarjeta.Credito) { return; } item.OidCreditCard = credit_card.Oid; item.CreditCard = credit_card.Nombre; item.OidCuentaBancaria = credit_card.OidCuentaBancaria; item.CuentaBancaria = credit_card.CuentaBancaria; Lines_BS.ResetBindings(false); } }
protected virtual void RefreshLines() { Lines_BS.ResetBindings(true); Lines_DGW.Refresh(); }
protected virtual void AddPedidoAction(List <PedidoInfo> albaranes) { if (_entity.OidSerie == 0) { PgMng.ShowInfoException(Resources.Messages.NO_SERIE_SELECTED); return; } if (_pedidos.Count == 0) { if (_entity.OidHolder != 0) { _pedidos = PedidoList.GetPendientesList(_entity.OidHolder, _entity.OidSerie, false); } else { _pedidos = PedidoList.GetPendientesList(0, _entity.OidSerie, false); } } if (albaranes == null) { PedidoSelectForm form = new PedidoSelectForm(this, PedidoList.GetList(_pedidos)); form.ShowDialog(this); if (form.DialogResult == DialogResult.OK) { _results = form.Selected as List <PedidoInfo>; } else { _results.Clear(); } } else { _results = albaranes; } if (_results.Count > 0) { foreach (PedidoInfo item in _results) { if (item.OidCliente != _results[0].OidCliente) { PgMng.ShowInfoException("No es posible asignar pedidos de clientes distintos a un mismo Albarán."); return; } } DoAddPedido(null); } if (Result == BGResult.OK) { Serie_BT.Enabled = false; Datos.ResetBindings(false); } if (Result == BGResult.OK) { Lines_BS.ResetBindings(false); } }