Exemple #1
0
        public string GravaCad_RamoAtividade(TRegistro_Cad_RamoAtividade val)
        {
            Hashtable hs = new Hashtable(20);

            hs.Add("@P_ID_RAMOATIVIDADE", val.Id_RamoAtividade);
            hs.Add("@P_DS_RAMOATIVIDADE", val.Ds_RamoAtividade);
            return(this.executarProc("IA_FIN_RAMOATIVIDADE", hs));
        }
Exemple #2
0
        public string DeletaCad_RamoAtividade(TRegistro_Cad_RamoAtividade val)
        {
            Hashtable hs = new Hashtable(2);

            hs.Add("@P_ID_RAMOATIVIDADE", val.Id_RamoAtividade);

            return(this.executarProc("EXCLUI_FIN_RAMOATIVIDADE", hs));
        }
Exemple #3
0
        public TList_Cad_RamoAtividade Select(TpBusca[] vBusca, Int32 vTop, string vNm_Campo)
        {
            TList_Cad_RamoAtividade lista  = new TList_Cad_RamoAtividade();
            SqlDataReader           reader = null;
            bool podeFecharBco             = false;

            if (Banco_Dados == null)
            {
                this.CriarBanco_Dados(false);
                podeFecharBco = true;
            }
            try
            {
                reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, Convert.ToInt16(vTop), vNm_Campo));
                while (reader.Read())
                {
                    TRegistro_Cad_RamoAtividade reg = new TRegistro_Cad_RamoAtividade();

                    if (!reader.IsDBNull(reader.GetOrdinal("Id_RamoAtividade")))
                    {
                        reg.Id_RamoAtividade = reader.GetDecimal(reader.GetOrdinal("Id_RamoAtividade"));
                    }
                    if (!(reader.IsDBNull(reader.GetOrdinal("Ds_RamoAtividade"))))
                    {
                        reg.Ds_RamoAtividade = reader.GetString(reader.GetOrdinal("Ds_RamoAtividade"));
                    }
                    lista.Add(reg);
                }
            }
            finally
            {
                reader.Close();
                reader.Dispose();
                if (podeFecharBco)
                {
                    this.deletarBanco_Dados();
                }
            }
            return(lista);
        }