示例#1
0
        public string Excluir(TRegistro_Adiantamento_X_CCusto val)
        {
            Hashtable hs = new Hashtable(2);

            hs.Add("@P_ID_ADTO", val.Id_adto);
            hs.Add("@P_ID_CCUSTOLAN", val.Id_ccustolan);

            return(executarProc("EXCLUI_FIN_ADIANTAMENTO_X_CCUSTO", hs));
        }
示例#2
0
        public TList_Adiantamento_X_CCusto Select(TpBusca[] vBusca, int vTop, string vNm_campo)
        {
            TList_Adiantamento_X_CCusto lista = new TList_Adiantamento_X_CCusto();
            bool podeFecharBco = false;

            if (Banco_Dados == null)
            {
                podeFecharBco = CriarBanco_Dados(false);
            }

            SqlDataReader reader = ExecutarBusca(SqlCodeBusca(vBusca, vTop, ""));

            try
            {
                while (reader.Read())
                {
                    TRegistro_Adiantamento_X_CCusto reg = new TRegistro_Adiantamento_X_CCusto();
                    if (!reader.IsDBNull(reader.GetOrdinal("id_adto")))
                    {
                        reg.Id_adto = reader.GetDecimal(reader.GetOrdinal("id_adto"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("id_ccustolan")))
                    {
                        reg.Id_ccustolan = reader.GetDecimal(reader.GetOrdinal("id_ccustolan"));
                    }
                    lista.Add(reg);
                }
            }
            finally
            {
                reader.Close();
                reader.Dispose();
                if (podeFecharBco)
                {
                    deletarBanco_Dados();
                }
            }
            return(lista);
        }