public DataSet GetTodoList() { dataSet.Clear(); dataSet.ReadXml(ConfigurationClass.ReadSetting("TodoXMLFilePath")); DataTable table = dataSet.Tables[0]; return(dataSet); }
public int AddTodoListItem() { DataSet ds = this.GetTodoList(); DataRow newRow = ds.Tables[0].NewRow(); newRow["Title"] = "Place New Todo Title Here"; newRow["Text"] = "Place New Todo Text Here"; ds.Tables[0].Rows.Add(newRow); ds.WriteXml(ConfigurationClass.ReadSetting("TodoXMLFilePath")); return(ds.Tables[0].Rows.Count - 1); }
public void UPDATEListItem() { DataSet ds = this.GetTodoList(); foreach (DataTable table in ds.Tables) { foreach (DataRow row in table.Rows) { foreach (DataColumn column in table.Columns) { row[column] = 100.000; } } } ds.WriteXml(ConfigurationClass.ReadSetting("TodoXMLFilePath")); }
public bool RemoveTodoListItem(int recordID) { bool removeSuccessful = false; DataSet ds = this.GetTodoList(); DataRow row = ds.Tables[0].Rows[recordID]; try { row.Delete(); removeSuccessful = true; } catch (Exception e) { throw new ApplicationException("Error Deleting Todo Item: " + e.Message + "\n" + e.StackTrace); } ds.WriteXml(ConfigurationClass.ReadSetting("TodoXMLFilePath")); return(removeSuccessful); }
public void UpdateXMLDoc(DataSet newTodoListDataSet) { newTodoListDataSet.WriteXml(ConfigurationClass.ReadSetting("TodoXMLFilePath")); }
public YPosition() { _DYAttri = new Dictionary <string, YAttri>(); xmlOperate = new XmlOperate(ConfigurationClass.ReadSetting("xmlyPosition")); }
public XPosition() { _DTwoXAttri = new Dictionary <string, TwoXAttri>(); xmlOperate = new XmlOperate(ConfigurationClass.ReadSetting("xmlxPosition")); }
public ZPostionModel() { _DSixZAttri = new Dictionary <string, SixZAttri>(); _LSixZAttri = new List <SixZAttri>(); xmlOperate = new XmlOperate(ConfigurationClass.ReadSetting("xmlzPotion")); }
public ZCompensation() { _DSixZAttri = new Dictionary <string, SixZAttri>(); _LSixZAttri = new List <SixZAttri>(); xmlOperate = new XmlOperate(ConfigurationClass.ReadSetting("xmlzComp")); }