Ejemplo n.º 1
0
        private void AddRiceBtn(object sender, EventArgs e)
        {
            //add rice//

            r.minize();
            if (r.Count() < 0)
            {
                MessageBox.Show("out of stock");
            }

            t += r.price();
            l.add(r.name(), r.price());
            //to show num of product after get the total cost of order//
            numofrice.Text = Convert.ToString(r.Count()) + "in stock";
        }
Ejemplo n.º 2
0
 private void AddRiceBtn(object sender, EventArgs e)
 {
     //add rice//
     if (r.Count() == 0)
     {
         numofrice.Text = Convert.ToString(r.Count()) + "in stock";
         MessageBox.Show("out of stock");
     }
     else if (r.Count() > 0)
     {
         r.minize();
         t += r.price();
         l.add(r.name(), r.price());//add product in linked list//
         //to show num of product after press Add//
         numofrice.Text = Convert.ToString(r.Count()) + "in stock";
     }
 }