Пример #1
0
        public string DeletarEmpreendimento_X_LanCCusto(TRegistro_Empreendimento_X_lanCCusto val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(2);
            hs.Add("@P_ID_EMPREENDIMENTO", val.Id_empreendimento);
            hs.Add("@P_ID_CCUSTOLAN", val.Id_ccustolan);

            return(this.executarProc("EXCLUI_FIN_EMPREENDIMENTO_X_LANCCUSTO", hs));
        }
Пример #2
0
        public TList_Empreendimento_X_LanCCusto Select(TpBusca[] vBusca, Int32 vTop, string vNM_Campo)
        {
            bool podeFecharBco = false;
            TList_Empreendimento_X_LanCCusto lista = new TList_Empreendimento_X_LanCCusto();

            if (Banco_Dados == null)
            {
                this.CriarBanco_Dados(false);
                podeFecharBco = true;
            }
            System.Data.SqlClient.SqlDataReader reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, vTop, vNM_Campo));
            try
            {
                while (reader.Read())
                {
                    TRegistro_Empreendimento_X_lanCCusto reg = new TRegistro_Empreendimento_X_lanCCusto();
                    if (!(reader.IsDBNull(reader.GetOrdinal("ID_Empreendimento"))))
                    {
                        reg.Id_empreendimento = reader.GetDecimal(reader.GetOrdinal("ID_Empreendimento"));
                    }
                    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)
                {
                    this.deletarBanco_Dados();
                }
            }
            return(lista);
        }