internal List <TDto> RetrieveAllSellingPeriod <TDto>(IDataConverter <SellingPeriodData, TDto> converter) where TDto : class { ArgumentValidator.IsNotNull("converter", converter); ISellingPeriodService service = UnitOfWork.GetService <ISellingPeriodService>(); var query = service.GetAll(); if (query.HasResult) { return(query.DataToDtoList(converter).ToList()); } return(null); }
internal IList <BindingListItem> GetBindingList() { List <BindingListItem> dataSource = new List <BindingListItem>(); ISellingPeriodService service = UnitOfWork.GetService <ISellingPeriodService>(); var query = service.GetAll(); if (query.HasResult) { foreach (SellingPeriodData data in query.DataList) { dataSource.Add(new BindingListItem(data.Id, data.Name)); } } return(dataSource); }