/// <summary>
        /// Button to add new item to inventory
        /// </summary>
        private void btnNewItem_Click(object sender, EventArgs e)
        {
            // Declare and initialize form
            NewItem newItem = new NewItem(inventory, this);

            // Show the form
            newItem.ShowDialog(this);
        }
Beispiel #2
0
        private void addInventory_btn_Click(object sender, EventArgs e)
        {
            NewItem NewItem = new NewItem();

            NewItem.Show();

            /*SqlConnection connection1 = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\T2G_MainDB.mdf;Integrated Security=True");
             *  connection1.Open();
             *  SqlCommand addRecord = new SqlCommand("Insert Into Main_Inventory(Title,Details,Type,Brand,Price,Date_In) Values('" + newTitle.Text + "','" + newDetails.Text + "','" + newType.Text + "','" + newBrand.Text + "','" + newPrice.Text + "',GETDATE())", connection1);
             *  SqlDataReader reader = addRecord.ExecuteReader();
             *  reloadEdit();
             *  MessageBox.Show("New Inventory has been Added Successfuflly!");
             *  connection1.Close();*/
        }
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            NewItem NewItem = new NewItem();

            NewItem.Show();
        }