Exemple #1
0
        public string Excluir(TRegistro_TransfLocal val)
        {
            Hashtable hs = new Hashtable(1);

            hs.Add("@P_ID_TRANSF", val.Id_transf);

            return(this.executarProc("EXCLUI_EST_TRANSFLOCAL", hs));
        }
Exemple #2
0
        public string Gravar(TRegistro_TransfLocal val)
        {
            Hashtable hs = new Hashtable(3);

            hs.Add("@P_ID_TRANSF", val.Id_transf);
            hs.Add("@P_DS_TRANSF", val.Ds_transf);
            hs.Add("@P_DT_LANCTO", val.Dt_lancto);

            return(this.executarProc("IA_EST_TRANSFLOCAL", hs));
        }
Exemple #3
0
        public TList_TransfLocal Select(TpBusca[] vBusca, Int32 vTop, string vNm_Campo)
        {
            TList_TransfLocal lista  = new TList_TransfLocal();
            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_TransfLocal reg = new TRegistro_TransfLocal();

                    if (!reader.IsDBNull(reader.GetOrdinal("id_transf")))
                    {
                        reg.Id_transf = reader.GetDecimal(reader.GetOrdinal("id_transf"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("ds_transf")))
                    {
                        reg.Ds_transf = reader.GetString(reader.GetOrdinal("ds_transf"));
                    }
                    if (!reader.IsDBNull(reader.GetOrdinal("dt_lancto")))
                    {
                        reg.Dt_lancto = reader.GetDateTime(reader.GetOrdinal("dt_lancto"));
                    }

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