using System; using System.Collections.Generic; using System.Configuration; using System.Data.SqlClient; using System.Data.SqlTypes; using System.Linq; using System.Text; using System.Xml; namespace Library.Requests { public class LibraryDoc : RequestItem { private _Author; public Author { get { return _end; } } public DateTime StartDate { get { return _start; } } public LibraryDoc() : base() { } public LibraryDoc(Int32 RequestID) : base(ItemID) { XmlElement root = _doc.DocumentElement; XmlNode node; node = root.SelectSingleNode("Author"); if (node != null) this._author = node.InnerText; public LibraryDoc(Int32 RequestID, String Title, Int32 RequestedBy, String Author) : base(RequestID, Title, CreatedBy, 10, Description) { this._Author = author XmlDocument xml = new XmlDocument(); XmlNode root = xml.CreateElement("fields"); xml.AppendChild(root); node = xml.CreateElement("Author"); node.AppendChild(xml.CreateTextNode(this.Author)); root.AppendChild(node); //now write everything to SQL this.WriteXml(xml); } public static LibraryDoc GetAuthorDocByID(Int32 RequestID) { return new LibraryDoc(RequestID); } public static void UpdateLibraryDoc(Int32 LibraryDocID, String Author) { LibraryDoc old = LibraryDoc.GetLibraryDocByID(LibraryDocID); if (old.Author != Author) RequestItem.UpdateField(LibraryDocID, Editor, "Author", Author); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)