private void btmOK_Click(object sender, EventArgs e) { this.btmOK.Enabled = false; this.iiInsert.dblAmount = InvoiceItem.GetNewSupply(this.cnConnection, this.iiInsert.strEquipStorecode, double.Parse(this.tbAmount.Text.Trim())); this.iiInsert.dblPrice = double.Parse(this.tbPrice.Text.Trim()); iiInsert.Insert(this.cnConnection); InvoiceItems frmInvoiceItems = (InvoiceItems)this.Owner; frmInvoiceItems.SearchInvoiceItems(); this.Close(); }
private void btmOK_Click(object sender, EventArgs e) { this.btmOK.Enabled = false; double dblSumSupplyLoc = double.Parse(this.tbAmount.Text.Trim()) - this.dblOrginalSupply; this.iiUpdate.dblAmount = InvoiceItem.GetNewSupply(this.cnConnection, this.iiUpdate.strEquipStorecode, dblSumSupplyLoc); this.iiUpdate.dblPrice = double.Parse(this.tbPrice.Text.Trim()); this.iiUpdate.Update(this.cnConnection); InvoiceItems frmInvoiceItems = (InvoiceItems)this.Owner; frmInvoiceItems.SearchInvoiceItems(); this.Close(); }
private void BtmInsertInvoiceItems_Click(object sender, EventArgs e) { if (this.dgvInvoices.SelectedRows.Count != 0) { this.btmInvoiceItems.Enabled = false; InvoiceItems frmInvoiceItems = new InvoiceItems(); frmInvoiceItems.iiSearch.intInvoiceNumber = (int)this.dgvInvoices.SelectedRows[0].Cells["intNumber"].Value; frmInvoiceItems.invInvoice.intNumber = (int)this.dgvInvoices.SelectedRows[0].Cells["intNumber"].Value; frmInvoiceItems.invInvoice.intVendorNumber = (int)this.dgvInvoices.SelectedRows[0].Cells["intVendorNumber"].Value; frmInvoiceItems.invInvoice.dtDate = (DateTime)this.dgvInvoices.SelectedRows[0].Cells["datDate"].Value; frmInvoiceItems.cnConnection = this.cnConnection; frmInvoiceItems.Owner = this; frmInvoiceItems.usUser = this.usUser; frmInvoiceItems.setSettings = this.setSettings; frmInvoiceItems.ShowDialog(); this.btmInvoiceItems.Enabled = true; } }