예제 #1
0
        private void BtnRequestProd_Click(object sender, EventArgs e)
        {
            string nameProd = tbNameProd.Text;
            int    number   = Convert.ToInt32(tbNumProd.Text);
            bool   ifThere  = false;

            foreach (Product p in ProductManagment.ProductsSales)
            {
                if (p.Name == nameProd)
                {
                    ProductManagment.AddRequest(nameProd, number);
                    managment.UPDATEprodRequest(nameProd);
                    managment.AddProductinRequest(p);
                    MessageBox.Show("Done!");
                    ifThere = true;
                }
            }
            if (ifThere == false)
            {
                MessageBox.Show("Product Not Found!");
            }

            RequestsUpdate();
        }