public EditFieldInfo(long editFieldID, string sectionName, string fieldName, int rank, IEditFieldHandler editFieldHandler, IEditFieldHandlerDatabaseInterface dataHandler) { this.fieldName = fieldName; this.sectionName = sectionName; this.editFieldID = editFieldID; this.editFieldHandler = editFieldHandler; this.dataHandler = dataHandler; this.rank = rank; }
public EditFieldInfo(long editFieldID, string sectionName, string fieldName, int rank, IEditFieldHandler editFieldHandler, IEditFieldHandlerDatabaseInterface dataHandler) { this.fieldName = fieldName; this.sectionName = sectionName; this.editFieldID = editFieldID; this.editFieldHandler = editFieldHandler; this.dataHandler = dataHandler; this.rank = rank; }
public bool Read(IDataReader reader) { editFieldID = (long)reader["EditFieldID"]; fieldName = (string)reader["FieldName"]; sectionName = (string)reader["SectionName"]; rank = Convert.ToInt32(reader["Rank"]); pageRevisionID = Convert.ToInt64(reader["PageRevisionID"]); IEditFieldObjectCreator c = ContentManager.GetEditFieldObjectCreator(reader["EditFieldTypeIdentifier"].ToString()); if (c == null) { return(false); } editFieldHandler = c.CreateHandler(); dataHandler = c.CreateDatabaseInterface(); return(true); }
internal static PageAdminSectionDefinition ReadPageAdminSectionXml(XmlElement cfxml) { PageAdminSectionDefinition def = new PageAdminSectionDefinition(); def.SectionName = cfxml.GetAttribute("Name"); XmlElement e = cfxml.SelectSingleNode("Label") as XmlElement; def.Label = e == null ? null : e.InnerText == "" ? null : e.InnerText; e = cfxml.SelectSingleNode("Hint") as XmlElement; def.Hint = e == null ? null : e.InnerText == "" ? null : e.InnerText; if (cfxml.HasAttribute("InSection")) { string inSection = cfxml.GetAttribute("InSection"); if (inSection != null && inSection != String.Empty) { def.InSection = inSection; } } XmlNodeList efnodes = cfxml.SelectNodes("EditFields/*"); foreach (XmlElement xml in efnodes) { IEditFieldObjectCreator creator = ContentManager.GetEditFieldObjectCreator(xml.Name); if (creator != null) { IEditFieldHandler handler = creator.CreateHandler(); handler.Initialise(xml); def.EditFieldHandlers.Add(handler); } } return(def); }
public bool Read(IDataReader reader) { editFieldID = (long)reader["EditFieldID"]; fieldName = (string)reader["FieldName"]; sectionName = (string)reader["SectionName"]; rank = Convert.ToInt32(reader["Rank"]); pageRevisionID = Convert.ToInt64(reader["PageRevisionID"]); IEditFieldObjectCreator c = ContentManager.GetEditFieldObjectCreator(reader["EditFieldTypeIdentifier"].ToString()); if (c == null) return false; editFieldHandler = c.CreateHandler(); dataHandler = c.CreateDatabaseInterface(); return true; }