private void bSellItemAdd_Click(object sender, EventArgs e) { QuantityForm form = new QuantityForm(); if (form.ShowDialog(1, DbActionsEnum.Create) == System.Windows.Forms.DialogResult.OK) { SaleItem si = new SaleItem(form.ResultData, this.prodsSellTab.getSelectedProduct()); this.saleCart.addSaleItem(si); } }
private void bSaleItemEdit_Click(object sender, EventArgs e) { QuantityForm form = new QuantityForm(); SaleItem pi = this.items[this.dgvSaleItems.SelectedRows[0].Index]; if (form.ShowDialog(pi.Quantity, DbActionsEnum.Update) == System.Windows.Forms.DialogResult.OK) { pi.Quantity = form.ResultData; this.dgvSaleItems.Refresh(); } }