Пример #1
0
        public void GetProductType()
        {
            //List<ProductType> list = (List<ProductType>)BaoHienRepository.SelectAll<ProductType>().Where<ProductType>(item => item.st == false).ToList<ProductType>();
            //int count = list.Count;

            ProductTypeService productTypeService = new ProductTypeService();
            ProductType        productType        = productTypeService.GetProductType(4);

            Assert.AreEqual <int>(4, productType.Id);;
        }
        public void GetProductType()
        {
            //List<ProductType> list = (List<ProductType>)BaoHienRepository.SelectAll<ProductType>().Where<ProductType>(item => item.st == false).ToList<ProductType>();
            //int count = list.Count;
           
            ProductTypeService productTypeService = new ProductTypeService();
            ProductType productType = productTypeService.GetProductType(4);

            Assert.AreEqual<int>(4, productType.Id); ;
        }
        public void loadDataForEditProductType(int productTypeId)
        {
            this.Text = "Chỉnh sửa loại sản phẩm này";
            this.btnAdd.Text = "Cập nhật";

            ProductTypeService productTypeService = new ProductTypeService();
           
            productType = productTypeService.GetProductType(productTypeId);
            if (productType != null)
            {
                txtDescription.Text = productType.Description;
                txtCode.Text = productType.TypeCode;
                txtName.Text = productType.TypeName;
            }
        }
        public void loadDataForEditProductType(int productTypeId)
        {
            this.Text        = "Chỉnh sửa loại sản phẩm này";
            this.btnAdd.Text = "Cập nhật";

            ProductTypeService productTypeService = new ProductTypeService();

            productType = productTypeService.GetProductType(productTypeId);
            if (productType != null)
            {
                txtDescription.Text = productType.Description;
                txtCode.Text        = productType.TypeCode;
                txtName.Text        = productType.TypeName;
            }
        }