コード例 #1
0
        private void simpleButtonRecuperar_Click(object sender, EventArgs e)
        {
            RecuperarPendienteForm recuperarPendienteForm = new RecuperarPendienteForm();
            int num = (int)recuperarPendienteForm.ShowDialog();

            if (recuperarPendienteForm.DialogResult != DialogResult.OK)
            {
                return;
            }
            this.detalleComprobanteList                    = new List <DETALLECOMPROBANTE>();
            this.comprobante                               = recuperarPendienteForm.getComprobanteSeleccionado();
            this.comprobante.CODIGOBODEGA                  = new long?(this.listadoBodega.First <BODEGA>().CODIGOBODEGA);
            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.calcularImpuestos();
            this.EstadoComprobanteActual = this.estadosComprobante.getEstado(3L);
            this.EstadoComprobanteActual.asignarControles();
        }
コード例 #2
0
        private void simpleButton1_Click_1(object sender, EventArgs e)
        {
            RecuperarPendienteForm recuperar = new RecuperarPendienteForm();

            recuperar.ShowDialog();
            if (recuperar.DialogResult == DialogResult.OK)
            {
                detalleComprobanteList   = new List <DETALLECOMPROBANTE>();
                this.comprobante         = recuperar.getComprobanteSeleccionado();
                comprobante.CODIGOBODEGA = listadoBodega.First().CODIGOBODEGA;
                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();
                calcularImpuestos();
            }
        }