public Edit(ProductsForm productForm) { this._productForm = productForm; this.InitializeComponent(); this._productService = InstanceFactory.GetInstance <IProductService>(); this._categoryService = InstanceFactory.GetInstance <ICategoryService>(); }
public Edit(ProductsForm productForm, Product product) { this._productForm = productForm; this.InitializeComponent(); this._productService = InstanceFactory.GetInstance <IProductService>(); this._categoryService = InstanceFactory.GetInstance <ICategoryService>(); this._product = product; this.tbxProductNameAdd.Text = product.ProductName; this.tbxQuantityPerUnit.Text = product.QuantityPerUnit; this.tbxStock.Text = product.UnitsInStock.ToString(); this.tbxUnitPrice.Text = product.UnitPrice.ToString(); }