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(); } }