Esempio n. 1
0
 private void CommitCabecera()
 {
     _dataCabecera.Clear();
     if (_flushState.Equals("ADD"))
     {
         tpu_ComprobantesDeCompraConfirmacionDePreciosDataset.tpu_ComprobantesDeCompraConfirmacionDePreciosRow row = _dataCabecera.tpu_ComprobantesDeCompraConfirmacionDePrecios.Newtpu_ComprobantesDeCompraConfirmacionDePreciosRow();
         mz.erp.businessrules.tpu_ComprobantesDeCompraConfirmacionDePrecios.SetRowDefaultValues(row);
         row.Estado                   = this.GetEstado();
         row.IdAutorizacion           = string.Empty;
         row.IdComprobanteFactura     = this._idComprobanteFactura;
         row.IdFuenteDeCambioOriginal = this._idFuenteDeCambioFactura;
         row.IdMonedaOriginal         = this._idMonedaFactura;
         row.IdProveedor              = this._idProveedor;
         row.IdResponsable            = Security.IdPersona;
         row.NumeroFactura            = this._numeroFactura;
         row.Observaciones            = this._observaciones;
         row.ValorCotizacionOriginal  = this._valorCotizacionFactura;
         _dataCabecera.tpu_ComprobantesDeCompraConfirmacionDePrecios.Addtpu_ComprobantesDeCompraConfirmacionDePreciosRow(row);
     }
     else
     {
         tpu_ComprobantesDeCompraConfirmacionDePreciosDataset.tpu_ComprobantesDeCompraConfirmacionDePreciosRow rowC = mz.erp.businessrules.tpu_ComprobantesDeCompraConfirmacionDePrecios.GetByPk(this._idComprobante);
         rowC.Estado                   = this.GetEstado();
         rowC.IdAutorizacion           = string.Empty;
         rowC.IdComprobanteFactura     = this._idComprobanteFactura;
         rowC.IdFuenteDeCambioOriginal = this._idFuenteDeCambioFactura;
         rowC.IdMonedaOriginal         = this._idMonedaFactura;
         rowC.IdProveedor              = this._idProveedor;
         rowC.IdResponsable            = Security.IdPersona;
         rowC.NumeroFactura            = this._numeroFactura;
         rowC.Observaciones            = this._observaciones;
         rowC.ValorCotizacionOriginal  = this._valorCotizacionFactura;
         _dataCabecera.Tables[0].ImportRow(rowC);
     }
 }