public void UpdateItem(string tableName, Dictionary <string, string> myCurrentData, Dictionary <string, string> myNewData) { var xmldt = GetItem(tableName); if (xmldt != null) { xmldt.Update(myCurrentData, myNewData); Ds.AcceptChanges(); Ds.WriteXml(DataBasePathFile); } if (LogDataObject != null) { AddLogItem(myNewData, "update", tableName); } }
public void RemoveItem(string tableName, Dictionary <string, string> myData) { var xmldt = GetItem(tableName); if (xmldt != null) { xmldt.Remove(myData); Ds.AcceptChanges(); Ds.WriteXml(DataBasePathFile); } if (LogDataObject != null) { AddLogItem(myData, "remove", tableName); } }
public void AddListItem(string tableName, List <Dictionary <string, string> > myData) { var xmldt = GetItem(tableName); if (xmldt != null) { foreach (var item in myData) { AddItem(tableName, item); if (LogDataObject != null) { AddLogItem(item, "add", tableName); } } Ds.AcceptChanges(); Ds.WriteXml(DataBasePathFile); } }