void DeleteAltExecute(object param) { if (SelectedAltContractRate != null) { RemoveWeakEventListener(SelectedAltContractRate, ContractAltRateListener); this.ContractRateAltTarget.Remove(SelectedAltContractRate); AltContractRates.Remove(SelectedAltContractRate); if (AltContractRates.Count >= 1) { SelectedAltContractRate = AltContractRates[0]; } else { SelectedAltContractRate = null; } } }
public void ClearOutPendingAdds() { foreach (ContractRate contractRate in this.ContractRates) { if (contractRate.CONTRACT_RATE_ID == 0) { ContractRates.Remove(contractRate); break; } } foreach (ContractRateAlt contractRateAlt in AltContractRates) { if (contractRateAlt.RATE_NBR == 0) { AltContractRates.Remove(contractRateAlt); break; } } }