Пример #1
0
 public Edit(ProductsForm productForm)
 {
     this._productForm = productForm;
     this.InitializeComponent();
     this._productService  = InstanceFactory.GetInstance <IProductService>();
     this._categoryService = InstanceFactory.GetInstance <ICategoryService>();
 }
Пример #2
0
 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();
 }