public override void Buscar() { FormBuscarComprobante formaBuscar = new FormBuscarComprobante((long)EnumTipoComprobante.FACTURA); formaBuscar.ShowDialog(); if (formaBuscar.DialogResult == DialogResult.OK) { detalleComprobanteList = new List <DETALLECOMPROBANTE>(); this.comprobante = formaBuscar.getComprobanteSeleccionado(); this.cOMPROBANTEBindingSource.DataSource = this.comprobante; this.DETALLECOMPROBANTEGridControl.DataSource = comprobante.DETALLECOMPROBANTE; this.IMPUESTOCOMPROBANTEGridControl.DataSource = comprobante.IMPUESTOCOMPROBANTE; this.socionegocioSeleccionado = this.comprobante.SOCIONEGOCIO; this.bindingSourceSocioNegocio.DataSource = this.comprobante.SOCIONEGOCIO; detalleComprobanteList.AddRange(this.comprobante.DETALLECOMPROBANTE); bindingListDetalleComprobante = new BindingList <DETALLECOMPROBANTE>(detalleComprobanteList); this.DETALLECOMPROBANTEGridControl.EndUpdate(); this.IMPUESTOCOMPROBANTEGridControl.EndUpdate(); this.cOMPROBANTEBindingSource.EndEdit(); } }
public override void Buscar() { FormBuscarComprobante buscarComprobante = new FormBuscarComprobante(1L); int num = (int)buscarComprobante.ShowDialog(); if (buscarComprobante.DialogResult != DialogResult.OK) { return; } this.detalleComprobanteList = new List <DETALLECOMPROBANTE>(); this.comprobante = buscarComprobante.getComprobanteSeleccionado(); this.cOMPROBANTEBindingSource.DataSource = (object)this.comprobante; this.DETALLECOMPROBANTEGridControl.DataSource = (object)this.comprobante.DETALLECOMPROBANTE; this.IMPUESTOCOMPROBANTEGridControl.DataSource = (object)this.comprobante.IMPUESTOCOMPROBANTE; this.socionegocioSeleccionado = this.comprobante.SOCIONEGOCIO; this.bindingSourceSocioNegocio.DataSource = (object)this.comprobante.SOCIONEGOCIO; this.detalleComprobanteList.AddRange((IEnumerable <DETALLECOMPROBANTE>) this.comprobante.DETALLECOMPROBANTE); this.bindingListDetalleComprobante = new BindingList <DETALLECOMPROBANTE>((IList <DETALLECOMPROBANTE>) this.detalleComprobanteList); this.DETALLECOMPROBANTEGridControl.EndUpdate(); this.IMPUESTOCOMPROBANTEGridControl.EndUpdate(); this.cOMPROBANTEBindingSource.EndEdit(); this.EstadoComprobanteActual = this.estadosComprobante.getEstado(this.comprobante.CODIGOESTADOCOMPROBANTE); this.EstadoComprobanteActual.asignarControles(); }