protected void exec_del_attribute(section.type_section st, long id, section_attr.section_attr_type at, string code) { db_conn.exec(core.parse_query("sections.delete-attribute" , new Dictionary <string, object>() { { "section_id", id }, { "attr_type", at.ToString() } , { "attr_code", code }, { "section_type", st } })); }
public void set_attribute(string code, section_attr.section_attr_type type, object value) { section_attr a = _attributes.FirstOrDefault(x => x.code == code); if (a == null) { a = new section_attr(code, type, value); _attributes.Add(a); } else { if (a.type != type) { throw new Exception("l'attributo '" + code + "' non è di tipo '" + type.ToString() + "'"); } a.value = value; } }