// Fetch row data from xml using xml dataset protected void XmlFetchRowData() { if (File.Exists(xmlFile)) { // Get data from xml file website.ReadXml(xmlFile); row = (Company.WebsiteRow)website.Rows[0]; //Page.Title = row.Title; lbCopyright.Text = string.Format("{0} {1}", row.Copyright, row.Company); lbDoneBy.Text = string.Format("{0} {1}", Properties.Resources.DoneBy, row.WebDeveloper); } }
// Save new data to xml file using xml dataset techniques protected bool XmlSaveData() { about.ReadXml(this.xmlFile); row = (Company.WebsiteRow)about.Rows[0]; row.Company = txtCompany.Text; row.Title = txtTitle.Text; row.Logo = this.FullPath; try { about.AcceptChanges(); about.WriteXml(this.xmlFile); return true; } catch { return false; } }
// Fetch row data from xml using xml dataset protected void XmlFetchRowData() { if (File.Exists(this.xmlFile)) { // Get data from xml file about.ReadXml(this.xmlFile); row = (Company.WebsiteRow)about.Rows[0]; txtCompany.Text = row.Company; txtTitle.Text = row.Title; mwcAsyncImageUpload.InitializeUploadBox(false, row.Logo); } else { BaseSys.ShowMsg(msgPanel, lbMsg, Properties.Resources.XmlFileNotFound, "error"); } }