public static int Insert(Bodovani bod)
        {
            Database db;

            db = new Database();
            db.Connect();

            SqlCommand command = db.CreateCommand("VlozeniBodovani");

            command.CommandType = CommandType.StoredProcedure;
            PrepareCommand(command, bod);

            int r = command.ExecuteNonQuery();

            db.Close();

            return(r);
        }
 private static void PrepareCommand(SqlCommand command, Bodovani bod)
 {
     command.Parameters.AddWithValue("@idZapas", bod.idZapas);
     command.Parameters.AddWithValue("@idHrac", bod.idHrac);
     command.Parameters.AddWithValue("@typ", bod.typ);
 }