Beispiel #1
0
 public static UCMaterialIn GetUCMaterialIn(User user)
 {
     if (ucMaterialIn == null)
     {
         lock (obj)
         {
             if (ucMaterialIn == null)
             {
                 ucMaterialIn = new UCMaterialIn(user);
             }
         }
     }
     ucMaterialIn.Reset();
     ucMaterialIn.lblMessage.Text = "请扫描Van号";
     return ucMaterialIn;
 }
Beispiel #2
0
 public static UCMaterialIn GetUCMaterialIn(User user, bool isReturn)
 {
     if (ucMaterialIn == null)
     {
         lock (obj)
         {
             if (ucMaterialIn == null)
             {
                 ucMaterialIn = new UCMaterialIn(user, isReturn);
             }
         }
     }
     ucMaterialIn.user = user;
     ucMaterialIn.Reset();
     ucMaterialIn.lblMessage.Text = "请扫描生产单";
     return ucMaterialIn;
 }
Beispiel #3
0
        private void SwitchModule(CodeMaster.TerminalPermission module)
        {
            if (module == CodeMaster.TerminalPermission.M_Switch)
            {
                if (this.user != null)
                {
                    this.ucModuleSelect = new UCModuleSelect(this.user);
                    this.ucModuleSelect.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                    this.ucModuleSelect.ModuleSelectExitEvent += new ModuleSelectExitHandler(this.LoadUCLogin);
                    this.AddModule(this.ucModuleSelect);
                    this.Text = "模块选择_Sconit_SD";
                }
                else
                {
                    this.ucModuleSelect.ModuleSelectExitEvent += new ModuleSelectExitHandler(this.LoadUCLogin);
                    this.LoadUCLogin();
                }
            }
            else if (module == CodeMaster.TerminalPermission.Client_OrderShip)
            {
                UCShip ucShip = new UCShip(this.user);//.GetUCShip(user);
                ucShip.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucShip);
                ucShip.tbBarCode.Focus();
                this.Text = "发货";
            }
            else if (module == CodeMaster.TerminalPermission.Client_Receive)
            {
                UCReceive ucReceive = new UCReceive(this.user);//.GetUCReceive(this.user);
                ucReceive.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucReceive);
                ucReceive.tbBarCode.Focus();
                this.Text = "收货";
            }
            else if (module == CodeMaster.TerminalPermission.Client_Transfer)
            {
                UCTransfer ucTransfer = new UCTransfer(this.user);//.GetUCTransfer(this.user);
                ucTransfer.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucTransfer);
                ucTransfer.tbBarCode.Focus();
                this.Text = "移库";
            }
            else if (module == CodeMaster.TerminalPermission.Client_PickList)
            {
                UCPickList ucPickList = new UCPickList(this.user);
                ucPickList.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucPickList);
                ucPickList.tbBarCode.Focus();
                this.Text = "拣货";
            }
            else if (module == CodeMaster.TerminalPermission.Client_PickListShip)
            {
                UCPickListShip UCPickListShip = new UCPickListShip(this.user);//.GetUCPickListShip(this.user);
                UCPickListShip.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(UCPickListShip);
                UCPickListShip.tbBarCode.Focus();
                this.Text = "拣货发货";
            }
            else if (module == CodeMaster.TerminalPermission.Client_PutAway)
            {
                UCPutAway ucPutAway = new UCPutAway(this.user);//.GetUCPutAway(this.user);
                ucPutAway.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucPutAway);
                ucPutAway.tbBarCode.Focus();
                this.Text = "上架";
            }
            else if (module == CodeMaster.TerminalPermission.Client_Pickup)
            {
                var ucPickUp = new UCPickUp(this.user);//.GetUCPickUp(this.user);
                ucPickUp.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucPickUp);
                this.Text = "下架";
            }
            else if (module == CodeMaster.TerminalPermission.Client_AnDon)
            {
                UCAnDon ucAnDon = new UCAnDon(this.user);//.GetUCAnDon(this.user);
                ucAnDon.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                AddModule(ucAnDon);
                ucAnDon.tbBarCode.Focus();
                this.Text = "按灯";
                //this.ucDevanning.Height = height;
            }
            else if (module == CodeMaster.TerminalPermission.Client_StockTaking)
            {
                UCStockTaking ucStockTaking = new UCStockTaking(this.user);//.GetUCStockTaking(this.user);
                ucStockTaking.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucStockTaking);
                ucStockTaking.tbBarCode.Focus();
                this.Text = "盘点";
            }

            else if (module == CodeMaster.TerminalPermission.Client_MaterialIn)
            {
                UCMaterialIn ucMaterialIn = new UCMaterialIn(this.user, false);//.GetUCMaterialIn(this.user, false);
                ucMaterialIn.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucMaterialIn);
                ucMaterialIn.tbBarCode.Focus();
                this.Text = "投料";
            }
            else if (module == CodeMaster.TerminalPermission.Client_ForceMaterialIn)
            {
                var ucForceMaterialIn = new UCForceMaterialIn(this.user, false);
                ucForceMaterialIn.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucForceMaterialIn);
                ucForceMaterialIn.tbBarCode.Focus();
                this.Text = "强制投料";
            }
            else if (module == CodeMaster.TerminalPermission.Client_Qualify)
            {
                var ucJudgeInspect = new UCJudgeInspect(this.user);
                ucJudgeInspect.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucJudgeInspect);
                ucJudgeInspect.tbBarCode.Focus();
                this.Text = "合格";
            }
            else if (module == CodeMaster.TerminalPermission.Client_RePack)
            {
                var ucRePack = new UCRePack(this.user);
                ucRePack.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucRePack);
                ucRePack.tbBarCode.Focus();
                this.Text = "翻箱";
            }
            else if (module == CodeMaster.TerminalPermission.Client_UnPack)
            {
                var ucUnPack = new UCUnPack(this.user);
                ucUnPack.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucUnPack);
                ucUnPack.tbBarCode.Focus();
                this.Text = "拆箱";
            }
            else if (module == CodeMaster.TerminalPermission.Client_Pack)
            {
                var ucPack = new UCPack(this.user);
                ucPack.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucPack);
                ucPack.tbBarCode.Focus();
                this.Text = "装箱";
            }
            else if (module == CodeMaster.TerminalPermission.Client_Inspect)
            {
                var ucInspect = new UCInspect(this.user);
                ucInspect.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucInspect);
                ucInspect.tbBarCode.Focus();
                this.Text = "报验";
            }
            else if (module == CodeMaster.TerminalPermission.Client_WorkerWaste)
            {
                var ucWorkerWaste = new UCWorkerWaste(this.user);
                ucWorkerWaste.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucWorkerWaste);
                ucWorkerWaste.tbBarCode.Focus();
                this.Text = "工废";
            }
            else if (module == CodeMaster.TerminalPermission.Client_PickListOnline)
            {
                var ucPickListOnline = new UCPickListOnline(this.user);
                ucPickListOnline.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucPickListOnline);
                ucPickListOnline.tbBarCode.Focus();
                this.Text = "拣货单上线";
            }
            else if (module == CodeMaster.TerminalPermission.Client_HuStatus)
            {
                var ucHuStatus = new UCHuStatus(this.user);
                ucHuStatus.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucHuStatus);
                ucHuStatus.tbBarCode.Focus();
                this.Text = "条码状态";
            }
            else if (module == CodeMaster.TerminalPermission.Client_ProductionOnline)
            {
                UCProductOrderOnline ucProductOrderOnline = new UCProductOrderOnline(this.user);//.GetUCProductOrderOnline(this.user);
                ucProductOrderOnline.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucProductOrderOnline);
                ucProductOrderOnline.tbBarCode.Focus();
                this.Text = "上线";
            }
            else if (module == CodeMaster.TerminalPermission.Client_MiscInOut)
            {
                UCMisInOut ucMisInOut = new UCMisInOut(this.user);//.GetUCMisInOut(this.user);
                ucMisInOut.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucMisInOut);
                ucMisInOut.tbBarCode.Focus();
                this.Text = "计划外出入库";
            }
            else if (module == CodeMaster.TerminalPermission.Client_HuClone)
            {
                UCHuClone ucHuClone = new UCHuClone(this.user);//.GetUCHuClone(this.user);
                ucHuClone.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucHuClone);
                ucHuClone.tbBarCode.Focus();
                this.Text = "条码克隆";
            }
            else if (module == CodeMaster.TerminalPermission.Client_MaterialReturn)
            {
                UCMaterialIn ucMaterialIn = new UCMaterialIn(this.user, true);//.GetUCMaterialIn(this.user, true);
                ucMaterialIn.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucMaterialIn);
                ucMaterialIn.tbBarCode.Focus();
                this.Text = "退料";
            }
            else if (module == CodeMaster.TerminalPermission.Client_Freeze)
            {
                UCFreeze ucFreeze = new UCFreeze(this.user);//.GetUCFreeze(this.user);
                ucFreeze.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucFreeze);
                ucFreeze.tbBarCode.Focus();
                this.Text = "库存冻结";
            }
            else if (module == CodeMaster.TerminalPermission.Client_UnFreeze)
            {
                UCUnFreeze ucUnFreeze = new UCUnFreeze(this.user);//.GetUCUnFreeze(this.user);
                ucUnFreeze.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucUnFreeze);
                ucUnFreeze.tbBarCode.Focus();
                this.Text = "库存冻结";
            }
            else if (module == CodeMaster.TerminalPermission.Client_QuickReturn)
            {
                UCQuickReturn ucQuickReturn = new UCQuickReturn(this.user);
                ucQuickReturn.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucQuickReturn);
                ucQuickReturn.tbBarCode.Focus();
                this.Text = "快速退库";
            }

            else if (module == CodeMaster.TerminalPermission.Client_ProductionOffline)
            {
                UCReceiveProdOrder ucReceiptProdOrder = new UCReceiveProdOrder(this.user);
                ucReceiptProdOrder.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(ucReceiptProdOrder);
                ucReceiptProdOrder.tbBarCode.Focus();
                this.Text = "生产收货";
            }
            else if (module == CodeMaster.TerminalPermission.Client_FiReceipt)
            {
                UCFiReceipt uc = new UCFiReceipt(this.user);//.GetUCFiReceipt(this.user);
                uc.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(uc);
                uc.tbBarCode.Focus();
                this.Text = "后加工生产入库";
            }
            else if (module == CodeMaster.TerminalPermission.Client_StartAging)
            {
                UCHuAging uc = new UCHuAging(this.user, true);//.GetUCHuAging(this.user, true);
                uc.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(uc);
                uc.tbBarCode.Focus();
                this.Text = "老化开始";
            }
            else if (module == CodeMaster.TerminalPermission.Client_Aging)
            {
                UCHuAging uc = new UCHuAging(this.user, false);//.GetUCHuAging(this.user, false);
                uc.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(uc);
                uc.tbBarCode.Focus();
                this.Text = "老化结束";
            }
            else if (module == CodeMaster.TerminalPermission.Client_Filter)
            {
                UCHuFilter uc = new UCHuFilter(this.user);//.GetUCHuFilter(this.user);
                uc.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(uc);
                uc.tbBarCode.Focus();
                this.Text = "过滤";
            }
            else if (module == CodeMaster.TerminalPermission.Client_SparePartChk)
            {
                UCSpChk uc = new UCSpChk(this.user);//.GetUCHuFilter(this.user);
                uc.ModuleSelectionEvent += new ModuleSelectHandler(this.SwitchModule);
                this.AddModule(uc);
                uc.tbBarCode.Focus();
                this.Text = "Check";
            }
        }