예제 #1
0
        protected override void Loading()
        {
            if (UserStatics.OptrType == "Test")
            {
                ctProcess.Enabled = false;
                label14.Text      = "复测产量";
            }

            ctProcess.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "工序");
            ctProcess.DisplayMember = "Name";

            ctGrouping.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "班组");
            ctGrouping.DisplayMember = "Name";

            ctRepairMonitor.DataSource    = BllEquipmentDee.GetRepairMonitorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctRepairMonitor.DisplayMember = "Name";

            ctGroupMonitor.DataSource    = BllEquipmentDee.GetGroupMonitorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctGroupMonitor.DisplayMember = "Name";

            ctOperator.DataSource    = BllEquipmentDee.GetOperatorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctOperator.DisplayMember = "Name";

            if (!IsAdd)
            {
                var obj = EquipmentDee.FindById(long.Parse(ItemID));
                FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
            }
        }
        protected override void Loading()
        {
            toolStripStatusLabel1.Text = toolStripStatusLabel1.Text + ",按F7选机台。";
            if (UserStatics.OptrType == "Test")
            {
                ctCurrentProduct.Enabled = false;
                ctProcess.Enabled        = false;
                label14.Text             = "复测产量";
            }
            else
            {
                ctProcess.Enabled = false;
            }

            ctProductAdaptation.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "适应产品");
            ctProductAdaptation.DisplayMember = "Name";

            ctProcess.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "工序");
            ctProcess.DisplayMember = "Name";

            ctGrouping.DataSource    = CommonStatics.GetDict(UserStatics.OptrType, "班组");
            ctGrouping.DisplayMember = "Name";

            ctRepairMonitor.DataSource    = BllEquipmentDee.GetRepairMonitorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctRepairMonitor.DisplayMember = "Name";

            ctGroupMonitor.DataSource    = BllEquipmentDee.GetGroupMonitorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctGroupMonitor.DisplayMember = "Name";

            ctOperator.DataSource    = BllEquipmentDee.GetOperatorByWorkShop(UserStatics.OptrType, UserStatics.WorkShop);
            ctOperator.DisplayMember = "Name";



            if (!IsAdd)
            {
                var obj = EquipmentDee.FindById(long.Parse(ItemID));
                FrmAddEditBindComboBoxText.BindObjectToControls(obj, tabPage1);
            }
            else
            {
                ctDeeDate.Value = DateTime.Now.AddDays(-1);
            }
        }