Ejemplo n.º 1
0
        //display lotCode information
        private void DisplayLotCodeInfo(object[] objs, Domain.LotDataCollect.LotSimulationReport sim)
        {
            ucLabelComboxCurrentCarton.Clear();
            foreach (Carton2Lot item in objs)
            {
                ucLabelComboxCurrentCarton.AddItem(item.CartonCode, item.CartonCode);
            }
            ucLabelComboxCurrentCarton.SelectedIndex = 0;

            txtItemCode.Value = sim.ItemCode;
            txtMoCode.Value   = sim.MOCode;
            txtCartonNO.TextFocus(true, true);
        }
Ejemplo n.º 2
0
        public void UCLabelCombox_Test()
        {
            uCLabelCombox.Caption = "测试";
            Assert.AreEqual(uCLabelCombox.Caption, "测试");

            uCLabelCombox.AddItem("不良一", "不良一");
            uCLabelCombox.SelectedIndex = 0;

            Assert.AreEqual(uCLabelCombox.SelectedItemText, "不良一");
            Assert.AreEqual(uCLabelCombox.SelectedItemValue.ToString(), "不良一");

            uCLabelCombox.SelectedIndex = -1;
            uCLabelCombox.SetSelectItem("不良一");
            Assert.AreEqual(uCLabelCombox.SelectedIndex, 0);
            Assert.AreEqual(uCLabelCombox.SelectedItemText, "不良一");
            Assert.AreEqual(uCLabelCombox.SelectedItemValue.ToString(), "不良一");
        }
Ejemplo n.º 3
0
        //bind 料品下拉列表
        private void BindItem(BenQGuru.eMES.Common.Domain.IDomainDataProvider provider, string model, UCLabelCombox cbx)
        {
            cbx.Clear();
            this.txtItemDesc.InnerTextBox.Text = string.Empty;
            if (provider == null || model == null || model == string.Empty)
            {
                return;
            }

            BenQGuru.eMES.MOModel.ModelFacade _facade = new BenQGuru.eMES.MOModel.ModelFacade(provider);
            object[] objs = _facade.GetModelAllItem(model);
            if (objs != null)
            {
                foreach (object obj in objs)
                {
                    BenQGuru.eMES.Domain.MOModel.Model2Item mo = obj as BenQGuru.eMES.Domain.MOModel.Model2Item;
                    if (mo != null)
                    {
                        cbx.AddItem(mo.ItemCode, mo.ItemCode);
                    }
                }
            }
        }