예제 #1
0
        private void add()
        {
            Product prod = new Product();

            prod.Name         = nameText.Text;
            prod.Type         = typeText.Text;
            prod.Quantity_box = Convert.ToInt32(quantityNumericUpDown.Value);
            prod.Weight       = decimal.Parse(weightText.Text);
            prod.Box_id       = Int32.Parse(boxIdText.Text);

            InsertSQL prodHnd   = new InsertSQL();
            int       addrecord = prodHnd.addNewProduct(prod);

            MessageBox.Show("Your record is added");
            this.Close();
        }