public List <Aca_tb_bancos_procesos_bancarios_x_empresa_x_Grupo_FE_Info> Get_List_ProcesoBanco_x_GrupoFE(int IdInstitucion, int IdEmpresa) { List <Aca_tb_bancos_procesos_bancarios_x_empresa_x_Grupo_FE_Info> lstProcesoBanco_x_GrupoFE = new List <Aca_tb_bancos_procesos_bancarios_x_empresa_x_Grupo_FE_Info>(); try { using (Entities_Academico Base = new Entities_Academico()) { var vaspirante = from a in Base.Aca_tb_bancos_procesos_bancarios_x_empresa_x_Grupo_FE where a.IdInstitucion == IdInstitucion && a.IdEmpresa == IdEmpresa select a; foreach (var item in vaspirante) { Aca_tb_bancos_procesos_bancarios_x_empresa_x_Grupo_FE_Info info = new Aca_tb_bancos_procesos_bancarios_x_empresa_x_Grupo_FE_Info(); info.IdInstitucion = item.IdInstitucion; info.IdGrupoFE = item.IdGrupoFE; info.IdEmpresa = item.IdEmpresa; info.IdProceso_bancario_tipo = item.IdProceso_bancario_tipo; info.CodGrupoFE = item.CodGrupoFE; info.Codigo_establecimiento = item.Codigo_establecimiento; info.porcentaje_comision = item.porcentaje_comision; info.Observacion = item.Observacion; lstProcesoBanco_x_GrupoFE.Add(info); } } return(lstProcesoBanco_x_GrupoFE); } catch (Exception ex) { string arreglo = ToString(); string MensajeError = string.Empty; tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); MensajeError = ex.InnerException + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref MensajeError); throw new Exception(ex.InnerException.ToString()); } }
private void Generar() { try { string formatoFecha = "dddd/MMMM/yyyy"; if (!Validar()) { return; } string IdCodigo_Lega = ""; IdCodigo_Lega = ucBa_Proceso.get_BaCuentaInfo().CodigoLegal; sIdProcesoBancario = ucBa_Proceso.cmbProceso.EditValue.ToString(); Inicial_Nom_archivo = ucBa_Proceso.get_Proceso_Info().Iniciales_Archivo; Inicial_Nom_archivo = Inicial_Nom_archivo + DateTime.Now.Year; Inicial_Nom_archivo = txtruta.EditValue.ToString() + Inicial_Nom_archivo + ".txt"; lista_ArchivoTransferDetalle = new List <ba_Archivo_Transferencia_Det_Info>(); Aca_tb_bancos_procesos_bancarios_x_empresa_x_Grupo_FE_Info infoProcesoBancario_GrupoFE = new Aca_tb_bancos_procesos_bancarios_x_empresa_x_Grupo_FE_Info(); infoProcesoBancario_GrupoFE = BusProcesoBancario_GrupoFE.Get_Info_ProcesoBanco_x_GrupoFE(param.IdInstitucion, Convert.ToInt16(cmb_GrupoFE.EditValue), param.IdEmpresa, sIdProcesoBancario); foreach (var item in lista_Detalle) { if (item.Chequeo == true) { item.FechaInicioFacturacion = Convert.ToDateTime(dtpFechaInicioPago.EditValue); item.FechaTopeFacturacion = Convert.ToDateTime(dtFechaTopePago.EditValue); lista_ArchivoTransferDetalle.Add(item); } } switch (IdCodigo_Lega) { case "34": { if (sIdProcesoBancario == "DEB_CTA_CTE_AHO_BB") { sFechaActual = DateTime.Now.ToString("dd MMMM yyyy", cultureinfo); if (ucAca_SedeJornadaSeccionCurso.cmbJornada.Text == "MATUTINA") { sCodigoEstblecimiento = "266 " + cmb_GrupoFE.Text; } if (ucAca_SedeJornadaSeccionCurso.cmbJornada.Text == "VESPERTINA") { sCodigoEstblecimiento = "298 " + cmb_GrupoFE.Text; } Inicial_Nom_archivo = ""; Inicial_Nom_archivo = ucBa_Proceso.get_Proceso_Info().Iniciales_Archivo + sCodigoEstblecimiento + " " + sFechaActual; Inicial_Nom_archivo = txtruta.EditValue.ToString() + Inicial_Nom_archivo + ".txt"; } if (sIdProcesoBancario == "BANKCARD") { string sSecuencialArchivo = ""; sSecuencialArchivo = "001"; sFechaActual = DateTime.Now.Day.ToString().PadLeft(2, '0') + DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Year.ToString(); sCodigoEstblecimiento = infoProcesoBancario_GrupoFE.Codigo_establecimiento; Inicial_Nom_archivo = ""; Inicial_Nom_archivo = sFechaActual + sCodigoEstblecimiento + "_" + sFechaActual + sSecuencialArchivo; Inicial_Nom_archivo = txtruta.EditValue.ToString() + Inicial_Nom_archivo + ".txt"; } bus_Bolivariano.Grabar(lista_ArchivoTransferDetalle.ToList(), Inicial_Nom_archivo, ucBa_Proceso.get_Proceso_Info().cod_Proceso); break; } case "10": #region FiltroGrupoFE_Deshabilitada //if (cmb_GrupoFE.Text == "MATRICULA") // { // //sCodigoEstblecimiento = "1482456"; // sCodigoEstblecimiento = infoProcesoBancario_GrupoFE.Codigo_establecimiento; // } //if (cmb_GrupoFE.Text == "PENSION") //{ // //sCodigoEstblecimiento = "1481524"; // sCodigoEstblecimiento = infoProcesoBancario_GrupoFE.Codigo_establecimiento; //} //if (cmb_GrupoFE.Text == "RECAUD. COMITE PADRE") // { // //sCodigoEstblecimiento = "1482472"; // sCodigoEstblecimiento = infoProcesoBancario_GrupoFE.Codigo_establecimiento; // } //if (cmb_GrupoFE.Text == "CLASES COMPLEMENTARIAS") // { // //sCodigoEstblecimiento = "1482498"; // sCodigoEstblecimiento = infoProcesoBancario_GrupoFE.Codigo_establecimiento; // } //if (cmb_GrupoFE.Text == "EXAMENES BACHILLERATO INTERNACIONAL") // { // //sCodigoEstblecimiento = "1482480"; // sCodigoEstblecimiento = infoProcesoBancario_GrupoFE.Codigo_establecimiento; // } //if (cmb_GrupoFE.Text == "TRANSPORTE") //{ // //sCodigoEstblecimiento = "1498718"; // sCodigoEstblecimiento = infoProcesoBancario_GrupoFE.Codigo_establecimiento; //} #endregion sFechaActual = DateTime.Now.Year.ToString().Substring(0, 4) + DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Day.ToString().PadLeft(2, '0'); sCodigoEstblecimiento = infoProcesoBancario_GrupoFE.Codigo_establecimiento; Inicial_Nom_archivo = ""; Inicial_Nom_archivo = ucBa_Proceso.get_Proceso_Info().Iniciales_Archivo + " " + sFechaActual + "_" + sCodigoEstblecimiento; Inicial_Nom_archivo = txtruta.EditValue.ToString() + Inicial_Nom_archivo + ".txt"; bus_diner.Grabar(lista_ArchivoTransferDetalle.ToList(), Inicial_Nom_archivo, ucBa_Proceso.get_Proceso_Info().cod_Proceso); break; //case "32": // bus_Internacional.Grabar(lista_ArchivoTransferDetalle.ToList(), Inicial_Nom_archivo, ucBa_Proceso.get_Proceso_Info().cod_Proceso, ucBa_Proceso.get_BaCuentaInfo().ba_Num_Cuenta); // break; case "30": sFechaActual = DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Day.ToString().PadLeft(2, '0'); Inicial_Nom_archivo = ""; Inicial_Nom_archivo = ucBa_Proceso.get_Proceso_Info().Iniciales_Archivo + "TE" + sFechaActual; Inicial_Nom_archivo = txtruta.EditValue.ToString() + Inicial_Nom_archivo + ".txt"; bus_pacificar.Grabar(lista_ArchivoTransferDetalle.ToList(), Inicial_Nom_archivo, ucBa_Proceso.get_Proceso_Info().cod_Proceso, ucBa_Proceso.get_BaCuentaInfo().ba_Num_Cuenta); break; default: break; } MessageBox.Show(param.NombreEmpresa, "Se genero el archivo correctamente en: " + txtruta.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.ToString()); Log_Error_bus.Log_Error(ex.ToString()); } }