Buenas tardes
Te adjunto un ejemplo en C#
string _tipotrans = string.Empty; | |
string _fechaventa = string.Empty; | |
string _tipotarjeta = string.Empty; | |
string _identificador = string.Empty; | |
string _tipocuota = string.Empty; | |
string _montoorig = string.Empty; | |
string _codigoaut = string.Empty; | |
string _nrocuota = string.Empty; | |
string _montopara = string.Empty; | |
string _comision = string.Empty;a | |
string _comisionad = string.Empty; | |
string _nroboleta = string.Empty; | |
string _montoanul = string.Empty; | |
string _devcomiva = string.Empty; | |
string _devcomadiva = string.Empty; | |
string _montoret = string.Empty; | |
string _periodode = string.Empty; | |
string _motivo = string.Empty; | |
string _detcobobds = string.Empty; | |
string _monto = string.Empty; | |
string _iva = string.Empty; |
int rows = oMatrix.RowCount; |
for (int row = 1; row <= rows; row++) | |
{ | |
try | |
{ | |
oApplication.StatusBar.SetText(string.Format("{0} {1}","Grabando linea ", row.ToString()), BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Warning); | |
oMatrix.GetLineData(row); |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_1"); | |
_tipotrans = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_2"); | |
_fechaventa = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_3"); | |
_tipotarjeta = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_4"); | |
_identificador = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_5"); | |
_tipocuota = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_6"); | |
_montoorig = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_7"); | |
_codigoaut = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_8"); | |
_nrocuota = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_9"); | |
_montopara = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_10"); | |
_comision = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_11"); | |
_comisionad = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_12"); | |
_nroboleta = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_13"); | |
_montoanul = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_14"); | |
_devcomiva = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_15"); | |
_devcomadiva = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_16"); | |
_montoret = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_17"); | |
_periodode = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_18"); | |
_motivo = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_19"); | |
_detcobobds = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_20"); | |
_monto = oUserDataSource.ValueEx; |
oUserDataSource = oForm.DataSources.UserDataSources.Item("UDS_21"); | |
_iva = oUserDataSource.ValueEx; |
_query = "exec [dbo].[TBK1] '" + TransCode + "','" + _tipotrans + "','" + _fechaventa.Substring(0,10) + "','" + _tipotarjeta + "','" + _identificador + "','" + _tipocuota + "','" + _montoorig + "','" + _codigoaut + "','" + _nrocuota + "','" + _montopara + "','" + _comision + "','" + _comisionad + "','" + _nroboleta + "','" + _montoanul + "','" + _devcomiva + "','" + _devcomadiva + "','" + _montoret + "','" + _periodode + "','" + _motivo + "','" + _detcobobds + "','" + _monto + "','" + _iva + "'"; |
_r = "Registro grabado"; | |
} | |
catch (Exception ex) | |
{ | |
oApplication.StatusBar.SetText(string.Format("{0} - {1}","Det",ex.Message), BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error); | |
_r = ex.Message; | |
} | |
Saludos