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();
        }
Exemplo n.º 2
0
        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();
        }