예제 #1
0
        public string GetDescricao(string select, string txt1, string txt2)
        {
            utils u = new utils();

            utils.RCE(txt1);

            string busca = select + Convert.ToInt32(txt1);
            string descricao;

            SqlConnection con = new SqlConnection();

            con.ConnectionString = utils.ConexaoDb();
            SqlCommand sqlCommand = new SqlCommand(busca, con);

            con.Open();
            SqlDataReader dR = sqlCommand.ExecuteReader();

            if (dR.Read())
            {
                txt2 = dR[0].ToString();
            }
            else
            {
                txt2 = "";
            }
            descricao = txt2;
            con.Close();
            return(descricao);
        }