Пример #1
0
        internal void RemoveFromList(OrderPanel orderPanel)
        {
            int i = 0;

            foreach (var item in _orderlist)
            {
                if (item == orderPanel)
                {
                    _orderlist.RemoveAt(i);
                    return;
                }
                i++;
            }
        }
Пример #2
0
        private void PopulateOrder(OrderPanel o)
        {
            foreach (DataGridViewRow item in dataGridView1.Rows)
            {
                o.SetText(item.Cells[0].Value.ToString());

                string   s    = item.Cells[0].Value.ToString();
                string[] salg = s.Split(',');
                int      sum  = int.Parse(salg[1]);


                Mc.LagreSalg(salg[0], sum);
            }
            _orderlist.Add(o);
        }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (dataGridView1.RowCount == 0)
            {
                return;
            }

            OrderPanel o = new OrderPanel(this);

            PopulateOrder(o);


            UpdatePanels();
            _totalsum         += _salgsum;
            _salgsum           = 0;
            totalsumlabel.Text = _totalsum + " nok";
            salglabel.Text     = _salgsum + " nok";
            _sales.Clear();
            ResetTime();
        }
Пример #4
0
        private void PopulateOrder(OrderPanel o)
        {
            foreach (DataGridViewRow item in dataGridView1.Rows)
            {
                o.SetText(item.Cells[0].Value.ToString());

                string s = item.Cells[0].Value.ToString();
                string[] salg = s.Split(',');
                int sum = int.Parse(salg[1]);

                Mc.LagreSalg(salg[0], sum);
            }
            _orderlist.Add(o);
        }
Пример #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (dataGridView1.RowCount == 0)
            {
                return;
            }

            OrderPanel o = new OrderPanel(this);

            PopulateOrder(o);

            UpdatePanels();
            _totalsum += _salgsum;
            _salgsum = 0;
            totalsumlabel.Text = _totalsum + " nok";
            salglabel.Text = _salgsum + " nok";
            _sales.Clear();
            ResetTime();
        }
Пример #6
0
 internal void RemoveFromList(OrderPanel orderPanel)
 {
     int i = 0;
     foreach (var item in _orderlist)
     {
         if (item == orderPanel)
         {
             _orderlist.RemoveAt(i);
             return;
         }
         i++;
     }
 }