Esempio n. 1
0
 private void enterNewInventoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (iRowClick != -9)
     {
         GlobalClass.ConsignerID = int.Parse(dataGridView1[0, iRowClick].Value.ToString());
         GlobalClass.ConsignerSearchName = dataGridView1[2, iRowClick].Value.ToString() + " " + dataGridView1[1, iRowClick].Value.ToString();
         NewInventory newForm = new NewInventory();
         newForm.MdiParent = this.MdiParent;
         newForm.Show();
     }
     else
     {
         iRowClick = -9;
     }
 }
Esempio n. 2
0
        private void cmdSave_Click(object sender, EventArgs e)
        {
            //Save
            if (txtConsignorID.Text == string.Empty)
            {
                if ((txtLastName.Text != string.Empty) & (txtFirstName.Text != string.Empty))
                {
                    NewConsignorInsert();
                    DialogResult dr = MessageBox.Show("Enter New Inventory for this Consignor?", "New Consignor", MessageBoxButtons.YesNo);
                    if (dr == System.Windows.Forms.DialogResult.Yes)
                    {
                        //spawn the enter new inventory form
                        GlobalClass.ConsignerID = int.Parse(txtConsignorID.Text.ToString());
                        GlobalClass.ConsignerSearchName = txtFirstName.Text + " " + txtLastName.Text;

                        NewInventory newForm = new NewInventory();
                        newForm.MdiParent = this.MdiParent;
                        newForm.Show();
                    }
                }
                else
                {
                    MessageBox.Show("Incomplete data entered", "New Consignor", MessageBoxButtons.OK);
                }
            }
            else
            {
                bool result = ConsignorUpdate();
                if (result)
                {
                    MessageBox.Show("Data Saved", "Consignor Data", MessageBoxButtons.OK);
                }
                else
                {
                    MessageBox.Show("Data was not Saved - there was an issue", "Consignor Data", MessageBoxButtons.OK);
                }
            }
                ClearConsignor();
        }
Esempio n. 3
0
 private void addInventoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     NewInventory childForm = new NewInventory();
     childForm.MdiParent = this;
     childForm.Show();
 }