Пример #1
0
        public string Excluir(TRegistro_Local val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(1);
            hs.Add("@P_ID_LOCAL", val.Id_Local);


            return(this.executarProc("EXCLUI_RES_LOCAL", hs));
        }
Пример #2
0
        public string Gravar(TRegistro_Local val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(6);
            hs.Add("@P_ID_LOCAL", val.Id_Local);
            hs.Add("@P_DS_LOCAL", val.Ds_Local);
            hs.Add("@P_ST_REGISTRO", val.st_registro);


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

            if (Banco_Dados == null)
            {
                podeFecharBco = this.CriarBanco_Dados(false);
            }
            System.Data.SqlClient.SqlDataReader reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, vTop, vNM_Campo));
            try
            {
                while (reader.Read())
                {
                    TRegistro_Local rega = new TRegistro_Local();
                    if (!reader.IsDBNull(reader.GetOrdinal("Ds_Local")))
                    {
                        rega.Ds_Local = reader.GetString(reader.GetOrdinal("Ds_Local"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("Id_Local")))
                    {
                        rega.Id_Local = reader.GetDecimal(reader.GetOrdinal("Id_Local"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("st_registro")))
                    {
                        rega.st_registro = reader.GetString(reader.GetOrdinal("st_registro"));
                    }



                    lista.Add(rega);
                }
            }
            finally
            {
                reader.Close();
                reader.Dispose();
                if (podeFecharBco)
                {
                    this.deletarBanco_Dados();
                }
            }
            return(lista);
        }