Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        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);
            }
        }