public List <IProductLineSaleItem> GetProductLineSaleItems()
        {
            List <IProductLineSaleItem> items = new List <IProductLineSaleItem>();

            items = ProductItems.ToList();

            return(items);
        }
        private StoreView _setAndGetProductItems(IDbConnection connection, bool update = false, byte?typeId = null)
        {
            if (ProductItems == null || update)
            {
                var storeData = _psCache.LocalWhere(connection, i => i.Trash == false).ToList();
                var tTypes    = _ptCache.LocalFlilteredByKeys(connection, storeData.Select(i => i.ProductTypeId));

                ProductItems = storeData.Select(s => new StoreViewItem
                {
                    Active              = !s.Trash,
                    Date                = s.Date,
                    ProductTypeId       = s.ProductTypeId,
                    ProductStoreId      = s.Id,
                    ProductCost         = (double)s.Cost,
                    ProductCurrencyCode = s.CurrencyCode,
                    ProductItemProperty = s.Property,
                    TypeText            = tTypes.First(i => i.Id == s.ProductTypeId).Property.TranslateText
                }).ToList();
            }

            if (RepoList == null || update)
            {
                RepoList = GetProductTypesBaseAll(connection);
            }
            var result = new StoreView
            {
                SelectList = RepoList.ToList()
            };

            if (typeId == null || typeId == 0)
            {
                result.StoreList = ProductItems.ToList();
                return(result);
            }
            result.StoreList = ProductItems.Where(i => i.ProductTypeId == typeId).ToList();
            return(result);
        }