public string Excluir(TRegistro_CFGContratoFin val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(1); hs.Add("@P_CD_EMPRESA", val.Cd_empresa); return(this.executarProc("EXCLUI_FIN_CFGCONTRATOFIN", hs)); }
public string Gravar(TRegistro_CFGContratoFin val) { System.Collections.Hashtable hs = new System.Collections.Hashtable(4); hs.Add("@P_CD_EMPRESA", val.Cd_empresa); hs.Add("@P_TP_DUPLICATA", val.Tp_duplicata); hs.Add("@P_TP_DOCTO", val.Tp_docto); hs.Add("@P_CD_HISTORICO", val.Cd_historico); return(this.executarProc("IA_FIN_CFGCONTRATOFIN", hs)); }
public TList_CFGContratoFin Select(TpBusca[] vBusca, Int32 vTop, string vNM_Campo) { TList_CFGContratoFin lista = new TList_CFGContratoFin(); System.Data.SqlClient.SqlDataReader reader = null; bool podeFecharBco = false; if (Banco_Dados == null) { podeFecharBco = this.CriarBanco_Dados(false); } try { reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, Convert.ToInt16(vTop), vNM_Campo)); while (reader.Read()) { TRegistro_CFGContratoFin reg = new TRegistro_CFGContratoFin(); if (!reader.IsDBNull(reader.GetOrdinal("cd_empresa"))) { reg.Cd_empresa = reader.GetString(reader.GetOrdinal("cd_empresa")); } if (!reader.IsDBNull(reader.GetOrdinal("nm_empresa"))) { reg.Nm_empresa = reader.GetString(reader.GetOrdinal("nm_empresa")).Trim(); } if (!reader.IsDBNull(reader.GetOrdinal("tp_duplicata"))) { reg.Tp_duplicata = reader.GetString(reader.GetOrdinal("tp_duplicata")); } if (!reader.IsDBNull(reader.GetOrdinal("ds_tpduplicata"))) { reg.Ds_tpduplicata = reader.GetString(reader.GetOrdinal("ds_tpduplicata")); } if (!reader.IsDBNull(reader.GetOrdinal("tp_movdup"))) { reg.Tp_movDup = reader.GetString(reader.GetOrdinal("tp_movdup")); } if (!reader.IsDBNull(reader.GetOrdinal("tp_docto"))) { reg.Tp_docto = reader.GetDecimal(reader.GetOrdinal("tp_docto")); } if (!reader.IsDBNull(reader.GetOrdinal("ds_tpdocto"))) { reg.Ds_tpdocto = reader.GetString(reader.GetOrdinal("ds_tpdocto")); } if (!reader.IsDBNull(reader.GetOrdinal("cd_historico"))) { reg.Cd_historico = reader.GetString(reader.GetOrdinal("cd_historico")); } if (!reader.IsDBNull(reader.GetOrdinal("ds_historico"))) { reg.Ds_historico = reader.GetString(reader.GetOrdinal("ds_historico")); } if (!reader.IsDBNull(reader.GetOrdinal("tp_movhist"))) { reg.Tp_movHist = reader.GetString(reader.GetOrdinal("tp_movhist")); } lista.Add(reg); } } finally { reader.Close(); reader.Dispose(); if (podeFecharBco) { this.deletarBanco_Dados(); } } return(lista); }