private void SaveCurrentSetting() { if (this.selectPush == null) { return; } //获取当前选中的推送事项 StructDictItem item = (StructDictItem)this.selectPush.Tag;//this.showPushItems[index]; #region 修改员工短信Sns for (int i = 0; i < this.gridView1.RowCount; i++) { DataRow row = this.gridView1.GetDataRow(i); string value = row[TitleList.Check.ToString()].ToString(); StructAccount staff = showStaffs[i]; BigInteger.BigIntegerTools big = new BigInteger.BigIntegerTools(staff.Sns); //勾选上的 if (value.Equals("True")) { big.SumRights(item.Id); } else { big.RemoveRights(item.Id); } string sns = big.ToString(); // System.Console.WriteLine("sns:"+sns); //有改变 if (!sns.Equals(staff.Sns)) { StructAccount.Builder newStaff = new StructAccount.Builder(staff); newStaff.Sns = sns; this.showStaffs[i] = newStaff.Build(); } } #endregion #region 修改推送事项内容 if (!item.GetItem(1).Equals(textBox1.Text)) { StructDictItem.Builder newItem = new StructDictItem.Builder(item); newItem.SetItem(1, textBox1.Text); int index = this.showPushItems.IndexOf(item); this.showPushItems[index] = newItem.Build(); } #endregion }