예제 #1
0
    void UpdateChoice(AtavismEditorOptionChoice entry)
    {
        string query = "UPDATE editor_option_choice";
        query += " SET ";
        query += entry.UpdateList ();
        query += " WHERE id=?id";

        // Setup the register data
        List<Register> update = new List<Register> ();
        foreach (string field in entry.fields.Keys) {
            update.Add (entry.fieldToRegister (field));
        }

        DatabasePack.Update (DatabasePack.contentDatabasePrefix, query, update);
    }
예제 #2
0
    void InsertChoice(AtavismEditorOptionChoice entry)
    {
        string query = "INSERT INTO editor_option_choice";
        query += " (optionTypeID, choice) ";
        query += "VALUES ";
        query += " (" + entry.optionTypeID + ",'" + entry.choice + "') ";

        // Setup the register data
        List<Register> update = new List<Register> ();
        foreach (string field in entry.fields.Keys) {
            update.Add (entry.fieldToRegister (field));
        }

        int itemID = -1;
        itemID = DatabasePack.Insert (DatabasePack.contentDatabasePrefix, query, update);

        entry.id = itemID;
    }