private void Items_ItemRenamed(cItem sender, string NewName) { string sName = Encrypt(sender.Name); System.Data.DataRow oROW = this.Dataset.Tables[DatasetConnStr].Rows.Find(sName); if (oROW != null) { oROW[DatasetNameColumn] = Encrypt(NewName); oROW[DatasetContentColumn] = sender.ToContent(); sender.NameSet(NewName); } }
private void Items_ItemChanged(cItem sender) { string sName = Encrypt(sender.Name); System.Data.DataRow oROW = this.Dataset.Tables[DatasetConnStr].Rows.Find(sName); bool NewRow = false; if (oROW == null) { NewRow = true; oROW = this.Dataset.Tables[DatasetConnStr].NewRow(); oROW[DatasetNameColumn] = sName; } oROW[DatasetContentColumn] = sender.ToContent(); if (NewRow) { this.Dataset.Tables[DatasetConnStr].Rows.Add(oROW); } }