Example #1
0
        public override void UpdateContest(Contest t, int tid)
        {
            string       insert = "UPDATE Contests SET Beginning=?beg,Ending=?end,Name=?name WHERE TID=?tid";
            MySqlCommand comm   = new MySqlCommand(insert, (MySqlConnection)conn);

            comm.Parameters.Add("?beg", t.Beginning.ToString("yyyy.MM.dd hh:mm:ss"));
            comm.Parameters.Add("?end", t.Ending.ToString("yyyy.MM.dd hh:mm:ss"));
            comm.Parameters.Add("?name", t.Name);
            comm.Parameters.Add("?tid", tid);
            MySqlTransaction trans = ((MySqlConnection)conn).BeginTransaction(IsolationLevel.ReadCommitted);

            comm.Transaction = trans;
            try
            {
                comm.ExecuteScalar();
                trans.Commit();
            }
            catch (MySqlException)
            {
                trans.Rollback();
            }
        }
Example #2
0
 public abstract void UpdateContest(Contest t, int tid);
Example #3
0
 //ћетоды, относ¤щиес¤ к соревновани¤м
 public abstract int AddContest(Contest t);