public AddProduct() { InitializeComponent(); productControl = new ProductControl(); BrandCombo.ItemsSource = productControl.GetAllBrands(); CategoryCombo.ItemsSource = productControl.GetAllCategories(); Product product = new Product() { Name = null, Price = 0.0m, Description = null, AmountOnStock = 0 }; Brand brand = new Brand() { Name = null }; Category category = new Category() { Name = null }; this.DataContext = new { Product = product, Brand = brand, Category = category }; }
private void btnMore_Click(object sender, EventArgs e) { ProductControl p = new ProductControl(username); ps.Add(p); flowLayoutPanel1.Controls.Add(p); }
public VendingMachine() { _totalValue = 0; _display = INSERTCOIN; _selectedProduct = null; _coinControl = new CoinControl(); _productControl = new ProductControl(); }
public DeleteProductGUI() { _productControl = new ProductControl(); InitializeComponent(); UpdateListBoxProducts(); }
private void InitProducts() { foreach (var item in Products.Identity.List) { var p = new ProductControl(item); p.BuyButton.Click += BuyButton_Click; flpMain.Controls.Add(p); } }
public Input(string username) { db = new PrjDAO(); ps = new List <ProductControl>(); this.username = username; InitializeComponent(); ProductControl p = new ProductControl(username); ps.Add(p); flowLayoutPanel1.Controls.Add(p); }
public UpdateProductGUI() { InitializeComponent(); pctr = new ProductControl(); brands = (List <Brand>)pctr.GetAllBrands(); categories = (List <Category>)pctr.GetAllCategories(); BrandCombo.ItemsSource = brands; CategoryCombo.ItemsSource = categories; listProducts.ItemsSource = pctr.GetAllProducts(); }
private void AddProduct(string name) { var prodCtrl = new ProductControl(name); prodCtrl.ProductOptionSelected += prodCtrl_ProductOptionSelected; panelProductList.Controls.Add(prodCtrl); prodCtrl.Dock = DockStyle.Top; if (name == "argos-saleslogix") { panelProductList.ScrollControlIntoView(prodCtrl); } }
public Main(ProviderControl providerControl, InvoiceControl invoiceControl, RequestControl requestControl, UsersControl usersControl, ReportControl reportsControl, ProductControl productControl, PersonalDataControl personalDataControl) { _logger = LogManager.GetCurrentClassLogger(); _logger.Debug("Iniciando Menu Principal"); InitializeComponent(); _providerControl = providerControl; _invoiceControl = invoiceControl; _requestControl = requestControl; _productControl = productControl; _usersControl = usersControl; _reportsControl = reportsControl; _personalDataControl = personalDataControl; }
private void FillProductsToView(IEnumerable <Product> products, FlowLayoutPanel view) { foreach (var p in products) { var ui = new ProductControl(); ui.ProductName = p.Name; ui.ProductPrice = p.Price.ToString(); ui.ProductID = p.ID; ui.Image = p.Image; view.Controls.Add(ui); } }
public ProductLayout(string productName, string layoutName, ControlsLayout controlLayout) { errorMsg = ""; try { this.productName = productName; if (layoutName == typeof(ProductLayout1).Name) { productLayout = new ProductLayout1(controlLayout); } else if (layoutName == typeof(ProductLayout2).Name) { productLayout = new ProductLayout2(controlLayout); } else if (layoutName == typeof(ProductLayout3).Name) { productLayout = new ProductLayout3(controlLayout); } else if (layoutName == typeof(ProductLayout4).Name) { productLayout = new ProductLayout4(controlLayout); } else if (layoutName == typeof(ProductLayout5).Name) { productLayout = new ProductLayout5(controlLayout); } else if (layoutName == typeof(ProductLayout6).Name) { productLayout = new ProductLayout6(controlLayout); } } catch (System.Exception e) { errorMsg = "Initializing product layout of " + productName + " failed with error: " + e.Message; #if DEBUG Logger.GetLogger().Error(errorMsg); #endif } finally { if (string.IsNullOrEmpty(errorMsg) && productLayout == null) { errorMsg = "No product with name " + productName; } } }
private void AddProductControl() { productControl = new ProductControl(); productControl.Location = new Point(15, 66); this.pnlMain.Controls.Add(productControl); productControl.SetEventHandler(new EventHandler(InsertProduct)); productControl.SetVendorsSource(vendors); productControl.SetMeasuresSource(measures); productControl.SetCategoriesSource(categories); }
private void DeleteProductControl() { if (this.pnlMain.Controls.IndexOf(productControl) > 0) { if (productControl != null) { this.pnlMain.Controls.Remove(productControl); productControl.Dispose(); productControl = null; } } }
/// <summary> /// Стандартный констуктор, инициирующий контрол /// </summary> public ProductForm() { InitializeComponent(); _productControl = new ProductControl(); Controls.Add(_productControl); }
private ProductControl UserControlAdd(int i) { ProductControl ctrl = new ProductControl(); return(ctrl); }
public ProductLineService() { productLineControl = new ProductLineControl(); productControl = new ProductControl(); }