Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }