Esempio n. 1
0
        public void GetProductTypes()
        {
            //List<ProductType> list = (List<ProductType>)BaoHienRepository.SelectAll<ProductType>().Where<ProductType>(item => item.st == false).ToList<ProductType>();
            //int count = list.Count;

            ProductTypeService productTypeService = new ProductTypeService();
            List <ProductType> productTypes       = productTypeService.GetProductTypes();

            Assert.AreEqual <bool>(true, productTypes.Count > 0);;
        }
        public void GetProductTypes()
        {
            //List<ProductType> list = (List<ProductType>)BaoHienRepository.SelectAll<ProductType>().Where<ProductType>(item => item.st == false).ToList<ProductType>();
            //int count = list.Count;

            ProductTypeService productTypeService = new ProductTypeService();
            List<ProductType> productTypes = productTypeService.GetProductTypes();

            Assert.AreEqual<bool>(true, productTypes.Count > 0); ;
        }
        public void loadProductTypeList()
        {
            ProductTypeService productTypeService = new ProductTypeService();
            List <ProductType> productTypes       = productTypeService.GetProductTypes();

            if (productTypes != null)
            {
                setUpDataGrid(productTypes);
                //dgvProductTypeList.DataSource = productTypes;
            }
        }
 public void loadProductTypeList()
 {
     
     ProductTypeService productTypeService = new ProductTypeService();
     List<ProductType> productTypes = productTypeService.GetProductTypes();
     if (productTypes != null)
     {
         setUpDataGrid(productTypes);
         //dgvProductTypeList.DataSource = productTypes;
     }
 }
 public void loadProductList()
 {            
     ProductService productService = new ProductService();
     List<Product> products = productService.GetProducts().OrderBy(x => x.ProductCode).ToList();
     setUpDataGrid(products);
     ProductTypeService productTypeService = new ProductTypeService();
     List<ProductType> productTypes = productTypeService.GetProductTypes();
     productTypes.Add(new ProductType() { Id = 0, TypeName = "Tất cả" });
     productTypes = productTypes.OrderBy(x => x.Id).ToList();
     if (productTypes != null)
     {
         cbProductTypes.DataSource = productTypes;
         cbProductTypes.DisplayMember = "TypeName";
         cbProductTypes.ValueMember = "Id";
     }
 }
 void LoadDataCombobox()
 {
     ProductTypeService productTypeService = new ProductTypeService();
     ProductType pt = new ProductType
     {
         Id = 0,
         TypeName = "Tất cả"
     };
     productTypes = productTypeService.GetProductTypes();
     productTypes.Add(pt);
     productTypes = productTypes.OrderBy(pts => pts.Id).ToList();
     if (productTypes != null)
     {
         cbmProductTypes.DataSource = productTypes;
         cbmProductTypes.DisplayMember = "TypeName";
         cbmProductTypes.ValueMember = "Id";
     }
     LoadProducts(0);
 }
        void LoadDataCombobox()
        {
            ProductTypeService productTypeService = new ProductTypeService();
            ProductType        pt = new ProductType
            {
                Id       = 0,
                TypeName = "Tất cả"
            };

            productTypes = productTypeService.GetProductTypes();
            productTypes.Add(pt);
            productTypes = productTypes.OrderBy(pts => pts.Id).ToList();
            if (productTypes != null)
            {
                cbmProductTypes.DataSource    = productTypes;
                cbmProductTypes.DisplayMember = "TypeName";
                cbmProductTypes.ValueMember   = "Id";
            }
            LoadProducts(0);
        }
Esempio n. 8
0
        public void loadProductList()
        {
            ProductService productService = new ProductService();
            List <Product> products       = productService.GetProducts().OrderBy(x => x.ProductCode).ToList();

            setUpDataGrid(products);
            ProductTypeService productTypeService = new ProductTypeService();
            List <ProductType> productTypes       = productTypeService.GetProductTypes();

            productTypes.Add(new ProductType()
            {
                Id = 0, TypeName = "Tất cả"
            });
            productTypes = productTypes.OrderBy(x => x.Id).ToList();
            if (productTypes != null)
            {
                cbProductTypes.DataSource    = productTypes;
                cbProductTypes.DisplayMember = "TypeName";
                cbProductTypes.ValueMember   = "Id";
            }
        }
        private void loadSomeData()
        {
            if (productTypes == null)
            {
                ProductTypeService productTypeService = new ProductTypeService();
                productTypes = productTypeService.GetProductTypes();
            }

            if (productTypes != null)
            {
                cmbType.DataSource    = productTypes;
                cmbType.DisplayMember = "TypeName";
                cmbType.ValueMember   = "Id";
            }

            BaseAttributeService baseAttributeService = new BaseAttributeService();

            if (baseAttributes == null)
            {
                baseAttributes = baseAttributeService.GetBaseAttributes();
            }
        }
        private void loadSomeData()
        {
            if (productTypes == null)
            {
                ProductTypeService productTypeService = new ProductTypeService();
                productTypes = productTypeService.GetProductTypes();
            }
            
            if (productTypes != null)
            {
                cmbType.DataSource = productTypes;
                cmbType.DisplayMember = "TypeName";
                cmbType.ValueMember = "Id";
            }

            BaseAttributeService baseAttributeService = new BaseAttributeService();
            if (baseAttributes == null)
            {
                baseAttributes = baseAttributeService.GetBaseAttributes();
            }      
        }