internal static RatedRouteDto Get(Rbr_Db pDb, short pCarrierAcctId, int pBaseRouteId) { var _carrierRouteRow = pDb.CarrierRouteCollection.GetByCarrierAcctIdRouteId(pCarrierAcctId, pBaseRouteId); var _carrierAcct = CarrierAcctManager.GetAcct(pDb, pCarrierAcctId); return(Get(pDb, _carrierAcct, _carrierRouteRow)); }
internal static RatedRouteDto Get(Rbr_Db pDb, int pCarrierRouteId) { var _carrierRouteRow = pDb.CarrierRouteCollection.GetByPrimaryKey(pCarrierRouteId); var _carrierAcct = CarrierAcctManager.GetAcct(pDb, _carrierRouteRow.Carrier_acct_id); return(Get(pDb, _carrierAcct, _carrierRouteRow)); }
internal static RatedRouteDto[] GetByCarrierAcctIdCountryId(Rbr_Db pDb, short pCarrierAcctId, int pCountryId) { var _list = new ArrayList(); var _carrierAcct = CarrierAcctManager.GetAcct(pDb, pCarrierAcctId); var _carrierRouteRows = pDb.CarrierRouteCollection.GetByCarrierAcctIdCountryId(pCarrierAcctId, pCountryId); foreach (var _carrierRouteRow in _carrierRouteRows) { var _route = Get(pDb, _carrierAcct, _carrierRouteRow); _list.Add(_route); } if (_list.Count > 1) { var _sortInfos = new[] { new SortInfo(RatedRouteDto.CountryName_PropName, ListSortDirection.Ascending), new SortInfo(RatedRouteDto.Name_PropName, ListSortDirection.Ascending) }; _list.Sort(new GenericComparer(_sortInfos)); } return((RatedRouteDto[])_list.ToArray(typeof(RatedRouteDto))); }