Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            user = (User)Session["userObj"];

            if (user == null)
            {
                Response.Redirect("Main.aspx");
                return;
            }

            dbUtil = new DBUtil();

            verse = dbUtil.GetRandomVerse();

            GenVerseText();
            GenClearArray();
            GenRawArray();

            Session["verseId"] = verse.GetId();
        }
Beispiel #2
0
        public void UpdateVerse(Verse verse)
        {
            connection.Open();

            SqlCommand command = connection.CreateCommand();

            command.CommandText = String.Format("UPDATE Verses SET BestTime = {0} WHERE (Id={1})", verse.GetBestTime(), verse.GetId());

            command.ExecuteNonQuery();

            connection.Close();
        }