public bool Validar_Linea_archivo_BB_PreAviso_Cheq(Archivo_Banco_Bolivariano_preAviso_Cheq_Info info_) { try { info_.PagTer_nombreBeneficiario = info_.PagTer_nombreBeneficiario.Replace('Ñ', 'N').Replace('ñ', 'n'); info_.PagTer_nombreBeneficiario = info_.PagTer_nombreBeneficiario.Replace('É', 'E').Replace('é', 'e'); return(true); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "Generar_archivo", ex.Message), ex) { EntityType = typeof(cp_Archivo_Banco_Bolivariano_pago_proveedores_Bus) }; } }
public Boolean Generar_archivo_PreAviso_Cheq_BB_(Archivo_Banco_Bolivariano_preAviso_Cheq_Info info, string patch, string nombre_File) { try { string linea = ""; linea += info.PagTer_BZDET; linea += info.PagTer_secuencial.PadLeft(6, '0'); linea += info.PagTer_codigoBeneficiario.PadRight(18, ' '); linea += info.PagTer_tipoIdentificacion; linea += info.PagTer_numeroIdentificacion.PadRight(14, ' '); linea += info.PagTer_nombreBeneficiario.Length > 60 ? info.PagTer_nombreBeneficiario.Substring(0, 60) : info.PagTer_nombreBeneficiario.PadRight(60, ' '); linea += info.PagTer_formaPago; linea += info.PagTer_codigoPais; linea += info.PagTer_codigoBanco.PadRight(2, ' '); linea += info.PagTer_tipoCuenta.PadRight(2, ' '); linea += info.PagTer_numeroCuenta.PadLeft(10, '0'); linea += info.PagTer_numeroCheque.PadLeft(10, '0'); linea += info.PagTer_codigoMoneda.PadLeft(1, ' '); linea += info.PagTer_valorCheq_Ordenado.PadLeft(15, '0'); linea += info.PagTer_concepto.Length > 60 ? info.PagTer_concepto.Substring(0, 60) : info.PagTer_concepto.PadRight(60, ' '); linea += info.PagTer_espacio_blanco1.PadLeft(195, ' '); linea += info.PagTer_codigoServicio; linea += info.PagTer_espacio_blanco2.PadLeft(30, ' '); linea += info.PagTer_Tipo_de_cheque; linea += info.PagTer_codigoEmpresaAsignadoPorBanco.PadLeft(5, '0'); linea = linea.Trim(); using (System.IO.StreamWriter file = new System.IO.StreamWriter(patch + nombre_File + ".BIZ", true)) { file.WriteLine(linea); file.Close(); } return(true); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "Generar_archivo", ex.Message), ex) { EntityType = typeof(cp_Archivo_Banco_Bolivariano_pago_proveedores_Bus) }; } }
public Boolean Guardar_Archivo_Banco_Bolivariano_PreAviso(Archivo_Banco_Bolivariano_preAviso_Cheq_Info info, string patch, string nombre_file) { try { if (Validar_Linea_archivo_BB_PreAviso_Cheq(info)) { Generar_archivo_PreAviso_Cheq_BB_(info, patch, nombre_file); } return(true); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "Generar_archivo", ex.Message), ex) { EntityType = typeof(cp_Archivo_Banco_Bolivariano_pago_proveedores_Bus) }; } }