//Product tab private void addProductButton_Click(object sender, EventArgs e) { var addProductDialog = new ProductDialog(DialogState.Add); addProductDialog.ShowDialog(this); updateProductTable(); }
private void openProductButton_Click(object sender, EventArgs e) { var id = GetSelectedIdFromTable(productTable); var addProductDialog = new ProductDialog(DialogState.Open, id); addProductDialog.ShowDialog(this); }
private void AddNewProductClick(object sender, RoutedEventArgs e) { ProductDialog productDialog = new ProductDialog(); if (true == productDialog.ShowDialog()) { InitCombo(); } }
private async void Select_Click(object sender, RoutedEventArgs e) { ProductDialog dialog = new ProductDialog(); var button = await dialog.EnqueueAndShowIfAsync(); if (button == ContentDialogResult.Primary) { SelectedProductTextBlock.Visibility = Visibility.Visible; SelectedProductTextBlock.Text = $"Selected product: {(selectedProduct = dialog.Product).Name}"; ProductGUID.Text = selectedProduct.Id.ToString(); } }
private void _btnProduct_ItemClick(object sender, ItemClickEventArgs e) { Form frm = CheckForm(typeof(ProductDialog)); if (frm == null) { ProductDialog forms = new ProductDialog(); forms.MdiParent = this; forms.Show(); } else { frm.Activate(); } }
private async void Add_Click(object sender, RoutedEventArgs e) { ProductDialog dialog = new ProductDialog(true); var button = await dialog.EnqueueAndShowIfAsync(); if (button == ContentDialogResult.Primary) { if (!items.Any(x => x.OrderProduct.Product.Id == dialog.Product.Id)) { items.Add( new OrderProductViewModel( new OrderProduct() { ProductId = dialog.Product.Id, Product = dialog.Product } ) ); } } }
public ProductDialog get_product_dialog(ProductDialog dialog) { return(dialog); }
public ProductDialog get_product_dialog(ProductDialog dialog) { return dialog; }