Exemple #1
0
        public void SetFeeSchedule(FeeSchedule feeSchedule)
        {
            if (feeSchedule == null)
            {
                throw new ArgumentNullException(nameof(feeSchedule));
            }
            var existingSchedule = FeeSchedules.FirstOrDefault(a => a.Product.ProductCode == feeSchedule.Product.ProductCode);

            if (existingSchedule != null)
            {
                FeeSchedules.Remove(existingSchedule);
            }
            FeeSchedules.Add(feeSchedule);
        }
Exemple #2
0
        private void SetFeeSchedule(FeeScheduleViewModel feeScheduleData)
        {
            if (feeScheduleData == null)
            {
                throw new ArgumentNullException(nameof(feeScheduleData));
            }
            var existingSchedule = FeeSchedules.FirstOrDefault(a => a.Product.ProductCode == feeScheduleData.Product.ProductCode);

            if (existingSchedule != null)
            {
                FeeSchedules.Remove(existingSchedule);
            }
            FeeSchedules.Add(feeScheduleData);
        }