Ejemplo n.º 1
0
 public void EditProductPicturePathTest()
 {
     _productManagement._writeNewData += EventHandler;
     _productManagement.EditProductPicturePath(_productManagement.AllProducts[0], "path");
     Assert.AreEqual(_productManagement.AllProducts[0].ProductPicturePath, "path");
     _productManagement._writeNewData += EventHandler;
 }
Ejemplo n.º 2
0
        // 修改商品
        public void ModifyProduct(int rowIndex, String[] content)
        {
            List <Product> products = _productManagement.AllProducts;

            content[PATH_INDEX] = this.CopyFileToResources(content[PATH_INDEX]);
            _productManagement.EditProductName(products[rowIndex], content[NAME_INDEX]);
            _productManagement.EditProductPrice(products[rowIndex], content[PRICE_INDEX]);
            _productManagement.EditProductCategory(products[rowIndex], content[CATEGORY_INDEX]);
            _productManagement.EditProductPicturePath(products[rowIndex], content[PATH_INDEX]);
            _productManagement.EditProductDetail(products[rowIndex], content[DETAIL_INDEX]);
        }