Esempio n. 1
0
        private void btnInventory_Click(object sender, EventArgs e)
        {
            var inventory = new InventoryDetails();

            inventory.Show();
            Hide();
        }
Esempio n. 2
0
        private void btnReorder_Click(object sender, EventArgs e)
        {
            int newStock = InventoryDetails.setstockonhand + Convert.ToInt32(txtReorder.Text);

            try
            {
                Connection.Connection.DB();
                Functions.Function.gen     = "UPDATE product SET stockonhand = '" + newStock + "' WHERE productid = '" + InventoryDetails.setproductid + "' ; UPDATE product SET reorderstock = '" + txtReorder.Text + "' WHERE productid = '" + InventoryDetails.setproductid + "' ";
                Functions.Function.command = new SqlCommand(Functions.Function.gen, Connection.Connection.con);
                Functions.Function.command.ExecuteNonQuery();
                MessageBox.Show("Saved.", "Saved", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Connection.Connection.con.Close();
                var inventory = new InventoryDetails();
                inventory.Show();
                Hide();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }