public FormPhoneComps() { InitializeComponent(); Lan.F(this); _listPhoneCompsOrig = PhoneComps.GetDeepCopy(); _listPhoneComps = _listPhoneCompsOrig.Select(x => x.Copy()) .OrderBy(x => x.PhoneExt) .ThenBy(x => x.ComputerName) .ToList(); }
private void butOK_Click(object sender, EventArgs e) { //Sync the in memory list with the deep copy that was made from our cache when this window loaded. if (PhoneComps.Sync(_listPhoneComps, _listPhoneCompsOrig)) { //Changes were made when the sync was called. Let other workstations know about the changes. DataValid.SetInvalid(InvalidType.PhoneComps); } DialogResult = DialogResult.OK; }