public static IVtRotefMovement PopulateMovementFromDataRecord(IDataRecord dataRecord) { if (dataRecord == null) { throw new ArgumentNullException(nameof(dataRecord)); } var movement = new VtRotefMovement(); movement.TipoIdCliente = (string)dataRecord["TIPODOCUMENTO"]; movement.IdCliente = (string)dataRecord["DOCUMENTO"]; movement.RazonSocial = (string)dataRecord["CLIENTE"]; movement.PaisNacionalidad = "593"; movement.Dir = (string)dataRecord["DIRECCION"]; movement.DirProv = (string)dataRecord["PROVINCIA"]; movement.DirCanton = (string)dataRecord["CANTON"]; movement.TipoProducto = (string)dataRecord["PRODUCTO"]; movement.NumProducto = (string)dataRecord["CUENTA"].ToString(); movement.ValDebito = decimal.Parse(dataRecord["VAL_DEB"].ToString().Replace(".", ",")); movement.ValCredito = decimal.Parse(dataRecord["VAL_CRE"].ToString().Replace(".", ",")); movement.ValEfectivo = decimal.Parse(dataRecord["VAL_EFE"].ToString().Replace(".", ",")); movement.ValCheque = decimal.Parse(dataRecord["VAL_CHQ"].ToString().Replace(".", ",")); movement.ValTotal = decimal.Parse(dataRecord["VAL_TOTAL"].ToString().Replace(".", ",")); movement.TipoOperacion = (string)dataRecord["TIPO_OPERACION"]; movement.CodMoneda = (string)dataRecord["MONEDA"].ToString(); movement.PaisTrx = (string)dataRecord["PAISTRX"].ToString(); movement.RazonSocialTrx = (string)dataRecord["RAZONSOCIALTRX"].ToString(); movement.IfiTrx = (string)dataRecord["IFITRX"].ToString(); movement.NumProductoTrx = (string)dataRecord["NUMPRODTRX"].ToString(); movement.NumOperaciones = 1; return(movement); }
public static IVtRotefMovement PopulateMovementFromDataRecord(IDataRecord dataRecord) { if (dataRecord == null) { throw new ArgumentNullException("dataRecord"); } var movement = new VtRotefMovement { TipoIdCliente = (string)dataRecord["TipoDocumento"], IdCliente = (string)dataRecord["Documento"], RazonSocial = (string)dataRecord["Cliente"], PaisNacionalidad = "593", Dir = (string)dataRecord["Direccion"], DirProv = (string)dataRecord["Provincia"], DirCanton = (string)dataRecord["Canton"], TipoProducto = (string)dataRecord["Producto"], NumProducto = (string)dataRecord["Cuenta"], ValDebito = decimal.Parse(dataRecord["Val_deb"].ToString()), ValCredito = decimal.Parse(dataRecord["Val_Cre"].ToString()), ValEfectivo = decimal.Parse(dataRecord["Val_Efe"].ToString()), ValCheque = decimal.Parse(dataRecord["Val_Chq"].ToString()), TipoOperacion = (string)dataRecord["Tipo_Operacion"], CodMoneda = (string)dataRecord["Moneda"], PaisTrx = (string)dataRecord["PAISTRX"], RazonSocialTrx = (string)dataRecord["RAZONSOCIALTRX"], IfiTrx = (string)dataRecord["IFITRX"], NumProductoTrx = (string)dataRecord["NUMPRODTRX"], NumOperaciones = 1, }; return(movement); }