Пример #1
0
 private void addNewRow()
 {
     ManageInventoryForm frmMngInv = new ManageInventoryForm(true);
     frmMngInv.ShowDialog();
     if (frmMngInv.DialogResult == DialogResult.OK)
     {
         // Item canot already be on the invoice
         if (!m_invBuilder.itemAlreadyOnInvoice(frmMngInv.SelectedID))
         {
             int rowid = dgvInvoice.Rows.Add();
             int invID = (m_currentInvoice == null) ? -1 : m_currentInvoice.invID;
             Database.inventory newItem = m_invBuilder.addNewItem(frmMngInv.SelectedID, 1);
             dgvInvoice.Rows[rowid].Cells[1].Value = newItem.itryName;
             dgvInvoice.Rows[rowid].Cells[2].Value = newItem.itryDesc;
             dgvInvoice.Rows[rowid].Cells[3].Value = newItem.itrySellingPrive;
             dgvInvoice.Rows[rowid].Cells[5].Value = 1;
         }
     }
 }
Пример #2
0
 private void tsbManageInventory_Click(object sender, EventArgs e)
 {
     if (!checkForOpenForm("ManageInventoryForm"))
     {
         ManageInventoryForm frmMngInvetory = new ManageInventoryForm();
         frmMngInvetory.MdiParent = this;
         frmMngInvetory.Show();
     }
 }