public void Listar(int n_IdEmpresa, int n_AnoTrabajo, int n_MesTrasbajo, int n_TipoRegistro) { DataTable dtResul = new DataTable(); CD_tes_tesoreria miFun = new CD_tes_tesoreria(); miFun.mysConec = mysConec; miFun.Listar(n_IdEmpresa, n_AnoTrabajo, n_MesTrasbajo, n_TipoRegistro); dtLista = miFun.DtLista; if (dtResul == null) { b_OcurrioError = miFun.b_OcurrioError; c_ErrorMensaje = miFun.c_ErrorMensaje; n_ErrorNumber = miFun.n_ErrorNumber; } return; }
public bool RegeneraAsientos(int n_IdEmpresa, int n_IdMesTrabajo, int n_IdAnoTrabajo, int n_IdLibro, int n_TipoRegistro) { // n_TipoRegistro = 1 INGRESOS n_TipoRegistro = 2 EGRESOS DataTable dtLis = new DataTable(); bool b_result = false; int n_row = 0; int n_idreg = 0; CD_tes_tesoreria miFun = new CD_tes_tesoreria(); CD_con_diario o_Conta = new CD_con_diario(); CN_con_diario funCon = new CN_con_diario(); miFun.mysConec = mysConec; o_Conta.mysConec = mysConec; //b_result = o_Conta.EliminarLibroMes(n_IdLibro, n_IdAnoTrabajo, n_IdMesTrabajo, n_IdEmpresa); b_result = true; //o_Conta.EliminarLibroMes(n_IdLibro, n_IdAnoTrabajo, n_IdMesTrabajo, n_IdEmpresa); if (b_result == true) { miFun.Listar(n_IdEmpresa, n_IdAnoTrabajo, n_IdMesTrabajo, n_TipoRegistro); dtLis = miFun.DtLista; // objRegistros.Listar(STU_SISTEMA.EMPRESAID, STU_SISTEMA.ANOTRABAJO, Convert.ToInt32(CboMeses.SelectedValue), 1); dtLis = funDatos.DataTableOrdenar(dtLis, "c_numreg"); for (n_row = 0; n_row <= dtLis.Rows.Count - 1; n_row++) { string c_NumAsi = dtLis.Rows[n_row]["c_numreg"].ToString().Substring(4, 4); n_idreg = Convert.ToInt32(dtLis.Rows[n_row]["n_id"].ToString()); funCon.mysConec = mysConec; funCon.STU_SISTEMA = STU_SISTEMA; //funCon.GenerarAsientoVentas(STU_SISTEMA.EMPRESAID, n_idreg, STU_SISTEMA.ANOTRABAJO, STU_SISTEMA.MESTRABAJO, 14, c_NumAsi); funCon.GenerarAsientoTesoreria(STU_SISTEMA.EMPRESAID, n_idreg, STU_SISTEMA.ANOTRABAJO, STU_SISTEMA.MESTRABAJO, 1, c_NumAsi, n_TipoRegistro); //c_NumAsi = funCon.c_NewNumAsiento; //miFun.AgregarNumAsi(n_idreg, c_NumAsi); } b_result = true; } return(b_result); }