private void btnSave_Click(object sender, RoutedEventArgs e) { if (cmbType.SelectedIndex >= 0) { product.Type = (ProductTypeEntity)cmbType.SelectedItem; MessageBoxResult messageBoxResult = MessageBox.Show("Yakin simpan Barang?", "Konfirmasi Simpan", MessageBoxButton.YesNo); if (messageBoxResult == MessageBoxResult.Yes) { product.BarCode = txtBarcode.Text; product.Name = txtName.Text; product.AlertRed = Int32.Parse(txtExpiryRed.Text); product.AlertYellow = Int32.Parse(txtExpiryYellow.Text); product.AlertGreen = Int32.Parse(txtExpiryGreen.Text); productService.saveProduct(product); MessageBox.Show("Barang berhasil disimpan"); GenericWindow genericWindow = ((GenericWindow)this.Parent); //((MainWindow)genericWindow.Owner).refreshFrame(); genericWindow.Close(); } } else { MessageBox.Show("Pilih jenis Barang!"); } }
private void btnAdd_Click(object sender, RoutedEventArgs e) { GenericWindow windowAdd = new GenericWindow(); windowAdd.Content = createProductPage(null); windowAdd.Owner = (this.Tag as MainWindow); windowAdd.ShowDialog(); init(); }
private void btnAdd_Click(object sender, RoutedEventArgs e) { GenericWindow windowAdd = new GenericWindow(); Inventory inventoryPage = new Inventory(inventories); windowAdd.Content = inventoryPage; windowAdd.Owner = (this.Tag as MainWindow); windowAdd.ShowDialog(); loadData(); }
private void EditProductClicked(object sender, RoutedEventArgs e) { ProductEntity cellContent = (ProductEntity)dataGrid.SelectedItem; //MessageBox.Show(cellContent.Product.Name); GenericWindow windowInventoryList = new GenericWindow(); windowInventoryList.Content = createProductPage(cellContent); windowInventoryList.ShowDialog(); init(); }
private void SellPriceClicked(object sender, MouseButtonEventArgs e) { ProductStockEntity cellContent = (ProductStockEntity)dataGrid.SelectedItem; GenericWindow windowSellPriceHistory = new GenericWindow(); SellPriceHistory sellPriceHistoryPage = new SellPriceHistory(cellContent.Product); sellPriceHistoryPage.SetParent(commonPage); sellPriceHistoryPage.setAvgBuyPrice(cellContent.BuyPrice); windowSellPriceHistory.Content = sellPriceHistoryPage; windowSellPriceHistory.ShowDialog(); }
private void ProductNameClicked(object sender, MouseButtonEventArgs e) { ProductStockEntity cellContent = (ProductStockEntity)dataGrid.SelectedItem; //MessageBox.Show(cellContent.Product.Name); GenericWindow windowInventoryList = new GenericWindow(); ProductInventoryList inventoryListPage = new ProductInventoryList(cellContent.Product); inventoryListPage.SetParent(commonPage); windowInventoryList.Content = inventoryListPage; windowInventoryList.ShowDialog(); }
private void btnAdd_Click(object sender, RoutedEventArgs e) { GenericWindow windowAdd = new GenericWindow(); SellPriceMaintenance sellPricePage = new SellPriceMaintenance(product); sellPricePage.SetParent(commonPage); sellPricePage.setAvgBuyPrice(avgBuyPrice); windowAdd.Content = sellPricePage; windowAdd.Owner = (this.Tag as MainWindow); windowAdd.ShowDialog(); init(); }
private void EditProductClicked(object sender, RoutedEventArgs e) { InventoryItemEntity cellContent = (InventoryItemEntity)dataGrid.SelectedItem; //MessageBox.Show(cellContent.Product.Name); GenericWindow windowInventoryList = new GenericWindow(); InventoryMaintenance inventoryMaintenancePage = new InventoryMaintenance(cellContent); inventoryMaintenancePage.SetParent(commonPage); windowInventoryList.Content = inventoryMaintenancePage; windowInventoryList.ShowDialog(); init(); }
private void btnSave_Click(object sender, RoutedEventArgs e) { MessageBoxResult messageBoxResult = MessageBox.Show("Yakin simpan Harga Jual?", "Konfirmasi Simpan", MessageBoxButton.YesNo); if (messageBoxResult == MessageBoxResult.Yes) { SellPrice.SellingPrice = decimal.Parse(txtSellPrice.Text); SellPrice.Sale = (bool)radioTrue.IsChecked; SellPrice.Remarks = txtRemarks.Text; sellPriceService.saveSellPrice(SellPrice); GenericWindow genericWindow = ((GenericWindow)this.Parent); //((MainWindow)genericWindow.Owner).refreshFrame(); genericWindow.Close(); } }
private void btnSave_Click(object sender, RoutedEventArgs e) { MessageBoxResult messageBoxResult = MessageBox.Show("Yakin simpan Barang?", "Konfirmasi Simpan", MessageBoxButton.YesNo); if (messageBoxResult == MessageBoxResult.Yes) { //inventory.TransactionCode = txtTransactionCode.Text; inventory.PurchasePrice = Int32.Parse(txtPurchasePrice.Text); inventory.Quantity = Int32.Parse(txtQuantity.Text); inventory.ExpiredDate = dtExpired.SelectedDate.Value; inventory.Remarks = txtRemarks.Text; inventoryService.saveProductInventory(inventory); GenericWindow genericWindow = ((GenericWindow)this.Parent); //((MainWindow)genericWindow.Owner).refreshFrame(); genericWindow.Close(); } }
private void btnSave_Click(object sender, RoutedEventArgs e) { if (product == null) { MessageBox.Show("Harus pilih barang dulu!"); } else { inventory.Product = product; //inventory.TransactionCode = txtTransactionCode.Text; //inventory.PurchaseDate = dtPurchase.SelectedDate.Value; inventory.PurchasePrice = Int32.Parse(txtPurchasePrice.Text); inventory.Quantity = Int32.Parse(txtQuantity.Text); inventory.ExpiredDate = dtExpired.SelectedDate.Value; inventory.Remarks = txtRemarks.Text; //inventoryService.saveProductInventory(inventory); inventories.Add(inventory); GenericWindow genericWindow = ((GenericWindow)this.Parent); //((MainWindow)genericWindow.Owner).refreshFrame(); genericWindow.Close(); } }