Example #1
0
        public string Excluir(TRegistro_PistaBoliche val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(1);
            hs.Add("@P_ID_PISTA", val.Id_Pista);

            return(this.executarProc("EXCLUI_RES_PISTABOLICHE", hs));
        }
Example #2
0
 public string Gravar(TRegistro_PistaBoliche val)
 {
     System.Collections.Hashtable hs = new System.Collections.Hashtable(3);
     hs.Add("@P_ID_PISTA", val.Id_Pista);
     hs.Add("@P_DS_PISTA", val.Ds_Pista);
     hs.Add("@P_ST_REGISTRO", val.st_registro);
     hs.Add("@P_TP_SERVICO", val.Tp_servico);
     return(this.executarProc("IA_RES_PISTABOLICHE", hs));
 }
Example #3
0
        public TList_PistaBoliche Select(Utils.TpBusca[] vBusca, Int32 vTop, string vNM_Campo)
        {
            bool podeFecharBco        = false;
            TList_PistaBoliche listaa = new TList_PistaBoliche();

            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_PistaBoliche rPista = new TRegistro_PistaBoliche();
                    if (!reader.IsDBNull(reader.GetOrdinal("Id_Pista")))
                    {
                        rPista.Id_Pista = reader.GetDecimal(reader.GetOrdinal("Id_Pista"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("Ds_Pista")))
                    {
                        rPista.Ds_Pista = reader.GetString(reader.GetOrdinal("Ds_Pista"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("ST_Registro")))
                    {
                        rPista.st_registro = reader.GetString(reader.GetOrdinal("ST_Registro"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("Tp_servico")))
                    {
                        rPista.Tp_servico = reader.GetString(reader.GetOrdinal("Tp_servico"));
                    }
                    listaa.Add(rPista);
                }
            }
            finally
            {
                reader.Close();
                reader.Dispose();
                if (podeFecharBco)
                {
                    this.deletarBanco_Dados();
                }
            }
            return(listaa);
        }