private void CargarSeleccion() { cod_impuestos oImpuesto = new cod_impuestos(); ImpuestoImplement oImpuestoImplement = new ImpuestoImplement(); DataGridViewRow row = this.dgvTipoIva.CurrentRow; int id = Convert.ToInt32(row.Cells[0].Value); oImpuesto = oImpuestoImplement.Get(id); this.lblCodigo.Text = oImpuesto.id_impuesto.ToString(); this.txtNombre.Text = oImpuesto.impuesto; this.dtpFechaDesde.Text = oImpuesto.vigencia_desde.ToString(); this.dtpFechaHasta.Text = oImpuesto.vigencia_hasta.ToString(); this.txtAlicuota.Text = oImpuesto.porcentaje.ToString(); this.chkActivo.Checked = oImpuesto.activo.Value; this.chkCreditoFiscal.Checked = oImpuesto.credito_fiscal.Value; Deshabilitar(); }
private void CargarFacturas() { this.pDetalles.Visible = true; this.gbRefacturar.Visible = true; facturas oFactura = new facturas(); FacturasImplement oFacturaImplement = new FacturasImplement(); socios oSocio=new socios(); SocioImplement oSocioImplement = new SocioImplement(); oSocio = oSocioImplement.Get(_idSocio); tarifas oTarifa=new tarifas(); TarifaImplement oTarifaImplement=new TarifaImplement(); cod_impuestos oCodImpuesto = new cod_impuestos(); ImpuestoImplement oImpuestoImplement = new ImpuestoImplement(); oCodImpuesto = oImpuestoImplement.Get(oSocio.iva.Value); oFactura = oFacturaImplement.Get(_idFactura); oTarifa=oTarifaImplement.Get(oSocio.tarifa.Value); this.txtNroFacturaAct.Text = oFactura.id_factura.ToString(); _periodo = oFactura.id_factura.ToString(); this.txtFechaAct.Text = oFactura.id_periodo.ToString(); CargarFactura(_idFactura); this.txtTotalAct.Text = sumarFilas(ref this.dgDetalleAct,"colAImporte").ToString(); CargarFacturaFutura(_periodo,_idSocio); this.txtTotalFut.Text = sumarFilas(ref this.dgDetalleFut,"colFImporte").ToString(); }
private void CargarIVAs() { ImpuestoImplement oImpuestoImplement = new ImpuestoImplement(); cod_impuestos oCod_impuestos = new cod_impuestos(); List<cod_impuestos> _listImpuestos = oImpuestoImplement.GetAll(); foreach(cod_impuestos impuestos in _listImpuestos) { chkListIVA.Items.Add(impuestos.impuesto); } }
private void CargarIva() { ImpuestoImplement oImpuestoImplement = new ImpuestoImplement(); oImpuestoImplement.CargarCombo(this.cmbIVA, "Seleccione.."); }
private void Guardar() { ImpuestoImplement oImpuestoImplement = new ImpuestoImplement(); cod_impuestos oImpuesto = new cod_impuestos(); if (this.lblCodigo.Text == "") { oImpuesto.impuesto = this.txtNombre.Text; oImpuesto.porcentaje = decimal.Parse(this.txtAlicuota.Text); oImpuesto.vigencia_desde =DateTime.Parse( this.dtpFechaDesde.Text); oImpuesto.vigencia_hasta = DateTime.Parse(this.dtpFechaHasta.Text); oImpuesto.activo = this.chkActivo.Checked; oImpuesto.credito_fiscal = this.chkCreditoFiscal.Checked; oImpuestoImplement.Save(oImpuesto); } else { DataGridViewRow row = this.dgvTipoIva.CurrentRow; int id = Convert.ToInt32(row.Cells[0].Value); oImpuesto = oImpuestoImplement.Get(id); oImpuesto.impuesto = this.txtNombre.Text; oImpuesto.porcentaje = Decimal.Parse(this.txtAlicuota.Text); oImpuesto.vigencia_desde = DateTime.Parse(this.dtpFechaDesde.Text); oImpuesto.vigencia_hasta = DateTime.Parse(this.dtpFechaHasta.Text); oImpuesto.activo = this.chkActivo.Checked; oImpuesto.credito_fiscal = this.chkCreditoFiscal.Checked; oImpuestoImplement.Update(oImpuesto); } Deshabilitar(); CargarGrid(); }
private void CargarGrid() { ImpuestoImplement oImpuestoImplement = new ImpuestoImplement(); this.dgvTipoIva.DataSource = oImpuestoImplement.GetAll(); this.dgvTipoIva.Enabled = true; }