Example #1
0
        public string cevapAl(string soru)
        {
            string   cevap    = null;
            sorgular sorgular = new sorgular();

            con = new MySqlConnection(getBaglanti());
            cmd = new MySqlCommand();
            con.Open();
            cmd.Connection  = con;
            cmd.CommandText = sorgular.cevapAl(soru);
            dr = cmd.ExecuteReader();
            if (dr.Read())
            {
                cevap = dr["cevap"].ToString();
            }
            con.Close();
            return(cevap);
        }
Example #2
0
        public string soruAl(int no)
        {
            string   soru     = null;
            sorgular sorgular = new sorgular();

            con = new MySqlConnection(getBaglanti());
            cmd = new MySqlCommand();
            con.Open();
            cmd.Connection  = con;
            cmd.CommandText = sorgular.soruAl(no);
            dr = cmd.ExecuteReader();
            if (dr.Read())
            {
                soru = dr["soru"].ToString();
            }
            con.Close();
            return(soru);
        }