Esempio n. 1
0
        void addPLUtolist(PLUcommon p)
        {
            plus.Add(p);

            Console.WriteLine("PLU Code is :" + p.PLUcode.scode);
            Console.WriteLine("PLU Description :" + p.description);

            ListViewItem item = new ListViewItem(p.PLUcode.scode);
            item.Tag = p;

            item.SubItems.Add(p.description);
            item.SubItems.Add(String.Format("£{0:0.00}", (double)p.price / 100));
            listView1.Items.Add(item);
        }
Esempio n. 2
0
        public Form_Editor(PLUcommon p)
        {
            InitializeComponent();

            if (p == null)
            {
                //FIX ME we need a dymanic way of selecting which PLUcommon to instance
                p = new ER230_PLU();
                plu = p;
                return;
            }

            plu = p;

            Int32[] status = new Int32[1];
            status[0] = p.status;

            ba = new BitArray(status);

            this.checkBox_N1_1.Checked = ba.Get(0);
            this.checkBox_N1_2.Checked = ba.Get(1);
            this.checkBox_N1_4.Checked = ba.Get(2);

            this.checkBox_N2_1.Checked = ba.Get(3);
            this.checkBox_N2_2.Checked = ba.Get(4);
            this.checkBox_N2_4.Checked = ba.Get(5);

            this.checkBox_N3_1.Checked = ba.Get(6);
            this.checkBox_N3_2.Checked = ba.Get(7);
            this.checkBox_N3_4.Checked = ba.Get(8);

            this.checkBox_N4_1.Checked = ba.Get(9);
            this.checkBox_N4_2.Checked = ba.Get(10);
            this.checkBox_N4_4.Checked = ba.Get(11);

            this.checkBox_N5_1.Checked = ba.Get(12);
            this.checkBox_N5_2.Checked = ba.Get(13);
            //this.checkBox_N5_4.Checked = ba.Get(14);

            //this.checkBox_N6_1.Checked = ba.Get(15);
            this.checkBox_N6_2.Checked = ba.Get(16);
            this.checkBox_N6_4.Checked = ba.Get(17);

            this.checkBox_N7_1.Checked = ba.Get(18);
            //this.checkBox_N7_2.Checked = ba.Get(19);
            this.checkBox_N7_4.Checked = ba.Get(20);

            this.checkBox_N8_1.Checked = ba.Get(21);
            this.checkBox_N8_2.Checked = ba.Get(22);
            this.checkBox_N8_4.Checked = ba.Get(23);

            this.checkBox_N9_1.Checked = ba.Get(24);
            this.checkBox_N9_2.Checked = ba.Get(25);
            this.checkBox_N9_4.Checked = ba.Get(26);

            textBox_description.Text = plu.description;
            textBox_PLU.Text = plu.PLUcode.scode;
            textBox_price1.Text = String.Format("{0}",plu.price);
            textBox_price2.Text =  String.Format("{0}",plu.price2);

            numericUpDown_group1.Value = plu.groups[0];
            numericUpDown_group2.Value = plu.groups[1];
            numericUpDown_group3.Value = plu.groups[2];

            textBox_linkPLU.Text = plu.linkPLUcode.scode;

            numericUpDown_autotare.Value = plu.autotare;
            numericUpDown_mixmatch.Value = plu.mixandmatch;
        }