private void TextBox_KeyUp(object sender, KeyEventArgs e) { if (e.Key == System.Windows.Input.Key.Enter) { // your event handler here if (srsku.Text == "" || txttotal.Text == "") { e.Handled = false; } ShopingchartBLL shopingBLL = new ShopingchartBLL(); OrderProdukBeli oData = new OrderProdukBeli(); if (this.produkSelected != null) { oData.IdProduk = this.produkSelected.IdProduk; oData.ProdukKategori = this.produkSelected.ProdukKategori; oData.Sku = this.produkSelected.SKU; oData.SatuanDasar = this.produkSelected.SatuanDasar; oData.IdPajak = this.produkSelected.IdPajak; oData.NamaPajak = this.produkSelected.Pajak; oData.PersentasePajak = this.produkSelected.PersentasePajak; oData.HargaBeli = this.produkSelected.HargaBeli; oData.IdAkunPajakProduk = this.produkSelected.IdAkunPajak; oData.NamaProduk = this.produkSelected.NamaProduk; oData.IdTypeProduk = this.produkSelected.IdTipeProduk; oData.TypeProduk = this.produkSelected.TipeProduk; oData.AkunPersediaan = this.produkSelected.IdAkunPersediaan; oData.AkunPengirimanBeli = this.produkSelected.IdAkunPengirimanBeli; } oData.TotalPajakProduk = double.Parse(txttotaltax.Text); oData.IdTransaksi = int.Parse(txttota.Text); oData.DiskonProduk = double.Parse(txtdiskon1.Text); oData.TotalProduk = double.Parse(txttotal.Text); oData.TotalOrderProduk = double.Parse(txttotal1.Text); oData.Checkboxaktif = true; if (shopingBLL.AddOrderProdukbeli(oData) > 0) { this.ClearForm1(); MessageBox.Show("Add Order Buy Product successfully added !"); if (int.Parse(txttota.Text) != 0) { this.LoadDataSku(); this.LoadDataSku2(); } else if (int.Parse(txttota.Text) == 0) { this.LoadDataSku1(); } } else { MessageBox.Show("Add Order Buy Product failed to add !"); } e.Handled = true; } }
public void Addsku_Clicks(object sender, RoutedEventArgs e) { ShopingchartBLL shopingBLL = new ShopingchartBLL(); if (shopingBLL.AddOrderProdukbeli(this.GetData()) > 0) { this.ClearForm(); MessageBox.Show("Add Order Buy Product successfully added !"); this.newquota.LoadDataSku(); } else { MessageBox.Show("Add Order Buy Product failed to add !"); } this.newquota.DGSKUorder.Visibility = Visibility.Visible; this.Visibility = Visibility.Collapsed; }
private void produk_Click(object sender, RoutedEventArgs e) { ShopingchartBLL shopingBLL = new ShopingchartBLL(); if (shopingBLL.AddOrderProdukbeli(this.GetData()) > 0) { this.ClearForm1(); MessageBox.Show("Add Order Buy Product successfully added !"); if (int.Parse(txttota.Text) != 0) { this.LoadDataSku(); } else if (int.Parse(txttota.Text) == 0) { this.LoadDataSku1(); } } else { MessageBox.Show("Add Order Buy Product failed to add !"); } }