///<summary>It's unnecessary to continuously re-fill the list of fees that this window uses to display. ///This method is a helper method that can be manually called when it is known that the fees for this code have changed. ///This removes the need to have it within FillGrid().</summary> private void FillAndSortListFees() { _listFees = Fees.GetFeesForCode(_procCode.CodeNum); //Create a temporary list that will be used to keep track of the Fees after they've been sorted within each fee schedule. List <Fee> listFees = new List <Fee>(); for (int i = 0; i < _listFeeScheds.Count; i++) { listFees.AddRange(_listFees.FindAll(fee => fee.FeeSched == _listFeeScheds[i].FeeSchedNum && fee.CodeNum == _procCode.CodeNum) .OrderBy(fee => fee.ClinicNum) .ThenBy(fee => fee.ProvNum)); } _listFees = new List <Fee>(listFees); //Update the class-wide list that FillGrid() uses so the fees are displayed correctly. }
///<summary></summary> private void FillAndSortListFees() { List <long> listClinicNums = Clinics.GetForUserod(Security.CurUser, true).Select(x => x.ClinicNum).ToList(); _listFees = Fees.GetFeesForCode(_procCode.CodeNum, listClinicNums); //already sorted }