/// <summary> /// update Contract /// </summary> /// <param name="myContract"></param> public void UpdateContract(Contract myContract) { int index = myXML.GetContractList().FindIndex(x => x.TransactionNumber == myContract.TransactionNumber); if (index == -1) { throw new Exception("Contract not exist"); } myXML.UpdateContract(myContract); }