Ejemplo n.º 1
0
        private void lbxPanelList_SelectedValueChanged(object sender, EventArgs e)
        {
            lbxCache.Items.Clear();
            lbxPanel.Items.Clear();
            stmsg.Text = "";

            lbPanelno.Text = "";

            var loc = lbxLocation.SelectedItem;

            if (loc == null)
            {
                return;
            }

            lbPanelno.Text = $"交地: {loc}";

            try {
                var pno = PanelInfo.QueryLastPanelNo(loc.ToString());
                stmsg.Text = pno;

                lbPanelno.Text = $"交地: {loc} 板号: {pno}";;

                var lst = QueryLabesByPanelNo(pno);

                if (lst == null)
                {
                    stmsg.Text = "labels: null.";
                    return;
                }
                else
                {
                    stmsg.Text = $"labels result: {lst.Count}";
                }

                foreach (var item in lst)
                {
                    if (item.isOnPanel)
                    {
                        lbxPanel.Items.Add(item.label);
                    }
                    else
                    {
                        lbxCache.Items.Add(item.label);
                    }
                }
                lbCacheTitle.Text = $"缓存状态({lbxCache.Items.Count})";
                lbPanelTitle.Text = $"码垛状态({lbxPanel.Items.Count})";
            } catch (Exception ex) {
                MessageBox.Show(ex.ToString());
            }
        }