public override Messages Action(object act) { base.Action(act); Messages msg = new Messages(); if (act == null) { return(msg); } DataCollect.Action.ActionEventArgs args; if (ObjectState == null) { args = new BenQGuru.eMES.DataCollect.Action.ActionEventArgs(); } else { args = ObjectState as DataCollect.Action.ActionEventArgs; } string data = act.ToString().ToUpper().Trim(); /* * msg = CheckData(data); * if(msg.IsSuccess()) * { #region Key logic,Push next action and fill it with data * ObjectState = args; * * ActionPassword acPwd = new ActionPassword(); * * acPwd.LastAction = this; * * acPwd.ObjectState = ObjectState; * this.NextAction = acPwd; #endregion * * args.UserCode = data; * * msg.Add(new Message(MessageType.Data,"",new object[]{args})); * } */ args.UserCode = (act as IDCTClient).LoginedUser; args.ResourceCode = (act as IDCTClient).ResourceCode; switch (data) { //归属工单 case ActionType.DataCollectAction_GoMO: ActionGotoMO actionGotoMO = new ActionGotoMO(); actionGotoMO.ObjectState = args; this.NextAction = actionGotoMO; (act as IDCTClient).CachedAction = actionGotoMO; //currentAction = actionGotoMO; break; //采集GOOD, added by jessie lee case ActionType.DataCollectAction_GOOD: ActionCollectGood actionCollectGood = new ActionCollectGood(); actionCollectGood.ObjectState = args; this.NextAction = actionCollectGood; (act as IDCTClient).CachedAction = actionCollectGood; break; //采集NG, added by jessie lee, 10/05/2006 case ActionType.DataCollectAction_NG: ActionCollectNG actionCollectNG = new ActionCollectNG(); actionCollectNG.ObjectState = args; this.NextAction = actionCollectNG; (act as IDCTClient).CachedAction = actionCollectNG; break; //采集SMTNG, added by jessie lee, 10/05/2006 case ActionType.DataCollectAction_SMTNG: ActionCollectSMTNG actionCollectSMTNG = new ActionCollectSMTNG(); actionCollectSMTNG.ObjectState = args; this.NextAction = actionCollectSMTNG; (act as IDCTClient).CachedAction = actionCollectSMTNG; break; //采集OUTLINEGOOD, added by jessie lee, 2006/8/18 case ActionType.DataCollectAction_OutLineGood: ActionCollectOutlineGood actionCollectOutlineGood = new ActionCollectOutlineGood(); actionCollectOutlineGood.ObjectState = args; this.NextAction = actionCollectOutlineGood; (act as IDCTClient).CachedAction = actionCollectOutlineGood; break; //采集OUTLINENG, added by jessie lee, 2006/8/18 case ActionType.DataCollectAction_OutLineNG: ActionCollectOutlineNG actionCollectOutlineNG = new ActionCollectOutlineNG(); actionCollectOutlineNG.ObjectState = args; this.NextAction = actionCollectOutlineNG; (act as IDCTClient).CachedAction = actionCollectOutlineNG; break; //Keyparts上料, added by jessie lee, 10/05/2006 case ActionType.DataCollectAction_CollectKeyParts: ActionCollectKeyparts actionCollectKeyparts = new ActionCollectKeyparts(); actionCollectKeyparts.ObjectState = args; this.NextAction = actionCollectKeyparts; (act as IDCTClient).CachedAction = actionCollectKeyparts; break; case BaseDCTDriver.NEXTOP: ActionNextOP actionNextOP = new ActionNextOP(); this.NextAction = actionNextOP; (act as IDCTClient).CachedAction = actionNextOP; break; case ActionType.DataCollectAction_CompareAppendix: ActionCompareApp actionCartonCompare = new ActionCompareApp(); this.NextAction = actionCartonCompare; (act as IDCTClient).CachedAction = actionCartonCompare; break; case ActionType.DataCollectAction_Mix: ActionCollectMix actionCollectMix = new ActionCollectMix(); this.NextAction = actionCollectMix; break; case ActionType.DataCollectAction_KBatch: ActionBatchWithKeypaerts actionBatchWithKeypaerts = new ActionBatchWithKeypaerts(); this.NextAction = actionBatchWithKeypaerts; break; case ActionType.DataCollectAction_CompareProductCode: ActionCompareProductCode actionCompareProductCode = new ActionCompareProductCode(); this.NextAction = actionCompareProductCode; (act as IDCTClient).CachedAction = actionCompareProductCode; break; case ActionType.DataCollectAction_CompareTwo: ActionCompareAppAndProductCode actionCompareAppAndProductCode = new ActionCompareAppAndProductCode(); this.NextAction = actionCompareAppAndProductCode; (act as IDCTClient).CachedAction = actionCompareAppAndProductCode; break; case ActionType.DataCollectAction_AutoNG: ActionAutoNG actionAutoNG = new ActionAutoNG(); this.NextAction = actionAutoNG; (act as IDCTClient).CachedAction = actionAutoNG; break; case ActionType.DataCollectAction_FGPacking: ActionFGPacking actionFGPacking = new ActionFGPacking(); this.NextAction = actionFGPacking; (act as IDCTClient).CachedAction = actionFGPacking; break; case ActionType.DataCollectAction_ONPost: ActionCollectONPost actionCollectONPost = new ActionCollectONPost(); this.NextAction = actionCollectONPost; (act as IDCTClient).CachedAction = actionCollectONPost; break; case ActionType.DataCollectAction_OffPost: ActionCollectOffPost actionCollectOffPost = new ActionCollectOffPost(); this.NextAction = actionCollectOffPost; (act as IDCTClient).CachedAction = actionCollectOffPost; break; default: ActionRCard actionRCard = new ActionRCard(); //actionRCard.ObjectState = args; this.NextAction = actionRCard; break; } return(msg); }
// Added end public override Messages Action(object act) { Messages msg = new Messages(); ActionOnLineHelper _helper = null; BenQGuru.eMES.Common.DomainDataProvider.SQLDomainDataProvider domainProvider = null; if (act == null) { return(msg); } DataCollect.Action.ActionEventArgs args; if (ObjectState == null) { args = new BenQGuru.eMES.DataCollect.Action.ActionEventArgs(); args.RunningCard = act.ToString().ToUpper().Trim(); } else { args = ObjectState as DataCollect.Action.ActionEventArgs; } string data = act.ToString().ToUpper().Trim(); //Keyparts //Laws Lu,2006/06/03 添加 获取已有连接 if ((act as IDCTClient).DBConnection != null) { domainProvider = (act as IDCTClient).DBConnection as BenQGuru.eMES.Common.DomainDataProvider.SQLDomainDataProvider; } else { domainProvider = Common.DomainDataProvider.DomainDataProviderManager.DomainDataProvider() as BenQGuru.eMES.Common.DomainDataProvider.SQLDomainDataProvider; (act as IDCTClient).DBConnection = domainProvider; } msg = CheckData(data, domainProvider); if (keypartsHT == null) { // 按照逻辑,走到这个分支应该是错误的 string strFile = @"C:\DCT_EmptyMessage.txt"; string strLine = DateTime.Now.ToString("yyyy-MM-dd HH:mi:ss") + "\t" + "ActionCollectKeyParts" + "\t" + "Missing Product In Action, RunningCard:" + args.RunningCard + ",Input:" + data; System.IO.StreamWriter writer = new System.IO.StreamWriter(strFile, true); writer.WriteLine(strLine); writer.Close(); // if (msg.IsSuccess() && (keypartsHT == null || keypartsHT.ContainsKey("ProdcutInfo") == false)) { //检查序列号 _helper = new ActionOnLineHelper(domainProvider); msg = _helper.GetIDInfo(args.RunningCard); // Added by Icyer 2006/12/14 // 检查序列号 ProductInfo product = (ProductInfo)msg.GetData().Values[0]; if (product == null || product.LastSimulation == null) { msg.ClearMessages(); msg.Add(new Message(MessageType.Error, "$NoSimulation")); } // base.Action (act); // ActionCollectKeyparts actionCollectKeyparts = this; // this.NextAction = actionCollectKeyparts; // this.Status = ActionStatus.PrepareData; // return msg; // Added end } if (msg.IsSuccess() && (keypartsHT == null || keypartsHT.ContainsKey("KeypartsInfo") == false)) { try { keypartsHT = new Hashtable(); keypartsHT.Add("ProdcutInfo", msg); ProductInfo product = (ProductInfo)msg.GetData().Values[0]; /* Removed by Icyer 2006/12/14 * 如果序列号已在本上料工序,则GetMORouteNextOperation会取下一个工序,导致找不到OPBOM * 改变推导OPBOM的逻辑 * ItemFacade itemFacade = new ItemFacade(domainProvider); * object op = itemFacade.GetMORouteNextOperation( * product.LastSimulation.MOCode, * product.LastSimulation.RouteCode, * product.LastSimulation.OPCode); * * OPBOMFacade opBOMFacade=new OPBOMFacade( domainProvider); * object[] objBomDetail = opBOMFacade.GetOPBOMDetails( * product.LastSimulation.MOCode, * product.LastSimulation.RouteCode, * (op as ItemRoute2OP).OPCode); */ // Added by Icyer 2006/12/14 IDCTClient client = act as IDCTClient; OPBOMFacade opBOMFacade = new OPBOMFacade(domainProvider); object[] objBomDetail = null; DataCollect.ActionOnLineHelper onLine = new ActionOnLineHelper(domainProvider); Messages messages1 = onLine.CheckID( new CKeypartsActionEventArgs( ActionType.DataCollectAction_CollectKeyParts, product.LastSimulation.RunningCard, client.LoginedUser, client.ResourceCode, product, null, null)); if (messages1.IsSuccess() == true) { objBomDetail = opBOMFacade.GetOPBOMDetails( product.NowSimulation.MOCode, product.NowSimulation.RouteCode, product.NowSimulation.OPCode); } else { throw new Exception(messages1.OutPut()); } // Added end MOFacade moFacade = new MOFacade(domainProvider); object mo = moFacade.GetMO(product.LastSimulation.MOCode); OPBomKeyparts opBomKeyparts = new OPBomKeyparts(objBomDetail, Convert.ToInt32(((MO)mo).IDMergeRule), domainProvider); if (opBomKeyparts.Count == 0) { /* Removed by Icyer 2006/12/27 @ YHI * msg.Add(new Message(MessageType.Error, "$CS_NOOPBomInfo $CS_Param_MOCode="+product.LastSimulation.MOCode +" $CS_Param_RouteCode="+product.LastSimulation.RouteCode +" $CS_Param_OPCode ="+product.LastSimulation.OPCode)); * throw new Exception(msg.OutPut()); */ throw new Exception("$CS_NOOPBomInfo"); } else { //opBomKeyparts.AddKeyparts(data, product.LastSimulation.MOCode); // Removed by Icyer 2006/12/14 keypartsHT.Add("KeypartsInfo", opBomKeyparts); } } catch (Exception ex) { /* Removed by Icyer 2006/12/27 @ YHI * keypartsHT = null; * this.NeedCancel = true; * throw ex; */ // Added by Icyer 2006/12/27 @ YHI base.Action(act); ActionCollectKeyparts actionCollectKeyparts = this; this.NextAction = actionCollectKeyparts; this.Status = ActionStatus.PrepareData; msg.ClearMessages(); msg.Add(new UserControl.Message(MessageType.Error, ex.Message)); msg.Add(new UserControl.Message(MessageType.Normal, "$DCT_PLEASE_INPUT_Keyparts")); return(msg); // Added end } } } if (msg.IsSuccess()) { OPBomKeyparts opBomKeyparts = (OPBomKeyparts)keypartsHT["KeypartsInfo"]; msg = keypartsHT["ProdcutInfo"] as Messages; MO moWillGo = (MO)keypartsHT["MOWillGo"]; ProductInfo product = (ProductInfo)msg.GetData().Values[0]; Messages msgResult = new Messages(); if (opBomKeyparts.Count > opBomKeyparts.GetbomKeypartCount()) { try { //opBomKeyparts.AddKeyparts(data, product.LastSimulation.MOCode); if (moWillGo == null) { msgResult.AddMessages(opBomKeyparts.AddKeyparts(data, product.LastSimulation.MOCode)); } else { msgResult.AddMessages(opBomKeyparts.AddKeyparts(data, moWillGo.MOCode)); } } catch (Exception ex) { msgResult.Add(new UserControl.Message(MessageType.Error, ex.Message)); } keypartsHT["KeypartsInfo"] = opBomKeyparts; } if (msgResult.IsSuccess() == false || opBomKeyparts.Count > opBomKeyparts.GetbomKeypartCount()) { base.Action(act); ActionCollectKeyparts actionCollectKeyparts = this; this.NextAction = actionCollectKeyparts; this.Status = ActionStatus.PrepareData; this.OutMesssage = new UserControl.Message(MessageType.Normal, "$DCT_PLEASE_INPUT_Keyparts " + (opBomKeyparts.GetbomKeypartCount() + 1).ToString() + "/" + opBomKeyparts.Count.ToString()); if (msgResult.IsSuccess() == false) { //msgResult.Add(new UserControl.Message(MessageType.Normal, "$DCT_PLEASE_INPUT_Keyparts")); return(msgResult); } else { return(msg); } } //((BenQGuru.eMES.Common.DomainDataProvider.SQLDomainDataProvider)domainProvider).PersistBroker.OpenConnection(); domainProvider.BeginTransaction(); try { BenQGuru.eMES.BaseSetting.BaseModelFacade dataModel = new BenQGuru.eMES.BaseSetting.BaseModelFacade(domainProvider); Resource resource = (Resource)dataModel.GetResource(args.ResourceCode); _helper = new ActionOnLineHelper(domainProvider); DataCollectFacade dataCollect = new DataCollect.DataCollectFacade(domainProvider); ActionCheckStatus actionCheckStatus = new ActionCheckStatus(); actionCheckStatus.ProductInfo = product; actionCheckStatus.ProductInfo.Resource = resource; ExtendSimulation lastSimulation = actionCheckStatus.ProductInfo.LastSimulation; BenQGuru.eMES.Material.WarehouseFacade wfacade = null; if (System.Configuration.ConfigurationSettings.AppSettings["NeedMaterialModule"].Trim() == "1") { wfacade = new WarehouseFacade(domainProvider); } IDCTClient client = act as IDCTClient; msg.AddMessages(_helper.ActionWithTransaction( new CKeypartsActionEventArgs( ActionType.DataCollectAction_CollectKeyParts, product.NowSimulation.RunningCard, client.LoginedUser, client.ResourceCode, product, opBomKeyparts, wfacade), actionCheckStatus)); // Added by Icyer 2006/12/28 @ YHI 采集集成上料 bool bLoadedINNO = false; if (this.NeedCollectINNO == true && msg.IsSuccess() == true) { string strRCard = product.NowSimulation.RunningCard; UserControl.Messages msgProduct = _helper.GetIDInfo(strRCard); product = (ProductInfo)msgProduct.GetData().Values[0]; CINNOActionEventArgs argsInno = new CINNOActionEventArgs( ActionType.DataCollectAction_CollectINNO, strRCard, client.LoginedUser, client.ResourceCode, product, INNOCode, wfacade ); IAction action = new BenQGuru.eMES.DataCollect.Action.ActionFactory(domainProvider).CreateAction(ActionType.DataCollectAction_CollectINNO); msg.AddMessages(action.Execute(argsInno)); if (msg.IsSuccess() == true) { bLoadedINNO = true; msg.Add(new UserControl.Message(MessageType.Success, string.Format("$CS_INNO_CollectSuccess[" + this.INNOCode + "] $CS_Keyparts_CollectSuccess"))); } } // Added end if (msg.IsSuccess()) { if (System.Configuration.ConfigurationSettings.AppSettings["NeedMaterialModule"].Trim() == "1") { if (wfacade != null) { wfacade.ExecCacheSQL(); } } domainProvider.CommitTransaction(); if (bLoadedINNO == false) { msg.Add(new UserControl.Message(MessageType.Success, string.Format("$CS_Keyparts_CollectSuccess"))); } } else { domainProvider.RollbackTransaction(); } } catch (Exception ex) { domainProvider.RollbackTransaction(); msg.Add(new UserControl.Message(ex)); } finally { ((BenQGuru.eMES.Common.DomainDataProvider.SQLDomainDataProvider)domainProvider).PersistBroker.CloseConnection(); } base.Action(act); ActionRCard actRcard1 = new ActionRCard(); actRcard1.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_RunningCard"); this.NextAction = actRcard1; this.ObjectState = null; this.keypartsHT = null; this.Status = ActionStatus.PrepareData; return(msg); } base.Action(act); //Web.Helper.ActionType acttype = new Web.Helper.ActionType(); // if(acttype.Items.Contains(args.RunningCard)) // { // (act as IDCTClient).CachedAction = null; // } ActionRCard actRcard = new ActionRCard(); actRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_RunningCard"); this.NextAction = actRcard; // Added by Icyer 2006/12/14 this.ObjectState = null; this.keypartsHT = null; this.Status = ActionStatus.PrepareData; // Added end return(msg); }
public override Messages Action(object act) { base.Action(act); Messages msg = new Messages(); if (act == null) { return(msg); } DataCollect.Action.ActionEventArgs args; if (ObjectState == null) { args = new BenQGuru.eMES.DataCollect.Action.ActionEventArgs(); } else { args = ObjectState as DataCollect.Action.ActionEventArgs; } string data = act.ToString().ToUpper().Trim(); //msg = CheckData(data); if (msg.IsSuccess()) { #region Key logic,Push next action and fill it with data args.RunningCard = data; ObjectState = args; Web.Helper.ActionType acttype = new Web.Helper.ActionType(); acttype.Items.Add(BaseDCTDriver.NEXTOP); ActionRCard acRcard = new ActionRCard(); if ((act as IDCTClient).CachedAction != null && !acttype.Items.Contains(args.RunningCard))//如果存在缓存的Action则利用缓存的Action { BaseDCTAction action = (act as IDCTClient).CachedAction; if (!(action is ActionCollectNG) && !(action is ActionCollectSMTNG) && !(action is ActionCollectOutlineNG) && !(action is ActionCollectKeyparts) && !(action is ActionBatchWithKeypaerts) && !(action is ActionCollectMix)) { action.ObjectState = ObjectState; } this.NextAction = action; } else if ((act as IDCTClient).CachedAction == null && !acttype.Items.Contains(args.RunningCard)) { ActionFactory acFac = new ActionFactory(); acFac.ObjectState = ObjectState; this.NextAction = acFac; } else if (acttype.Items.Contains(args.RunningCard)) { //ActionRCard acRcard = new ActionRCard(); //acRcard.ObjectState = ObjectState; this.NextAction = acRcard; } bool bIsAction = true; if (acttype.Items.Contains(args.RunningCard)) { switch (args.RunningCard) { //归属工单 case ActionType.DataCollectAction_GoMO: ActionGotoMO actionGotoMO = new ActionGotoMO(); //actionGotoMO.ObjectState = acRcrd.ObjectState; acRcard.NextAction = actionGotoMO; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_MOCode"); (act as IDCTClient).CachedAction = actionGotoMO; break; //采集GOOD, added by jessie lee case ActionType.DataCollectAction_GOOD: ActionCollectGood actionCollectGood = new ActionCollectGood(); //actionCollectGood.ObjectState = ObjectState; acRcard.NextAction = actionCollectGood; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$DCT_GOOD_Please_Input_GOOD_SN"); // Added by Icyer 2007/08/22 // 做良品采集时做归属工单 //changed by hiro 2008/08/27 //if ((act as IDCTClient).CachedAction is Action.ActionGotoMO) //{ // if (((Action.ActionGotoMO)(act as IDCTClient).CachedAction).moCode != string.Empty) // { // actionCollectGood.NeedGoMO = true; // actionCollectGood.NeedGoMOCode = ((Action.ActionGotoMO)(act as IDCTClient).CachedAction).moCode; // } //} // Added end (act as IDCTClient).CachedAction = actionCollectGood; break; //采集NG, added by jessie lee, 10/05/2006 case ActionType.DataCollectAction_NG: ActionCollectNG actionCollectNG = new ActionCollectNG(); //actionCollectNG.ObjectState = acRcard.ObjectState; acRcard.NextAction = actionCollectNG; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$DCT_NG_Please_Input_NG_SN"); (act as IDCTClient).CachedAction = actionCollectNG; break; //采集SMTNG, added by jessie lee, 10/05/2006 case ActionType.DataCollectAction_SMTNG: ActionCollectSMTNG actionCollectSMTNG = new ActionCollectSMTNG(); //actionCollectSMTNG.ObjectState = acRcard.ObjectState; acRcard.NextAction = actionCollectSMTNG; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$DCT_NG_Please_Input_NG_SN"); (act as IDCTClient).CachedAction = actionCollectSMTNG; break; //采集OutlineGOOD, added by jessie lee, 2006/8/21 case ActionType.DataCollectAction_OutLineGood: ActionCollectOutlineGood actionCollectOutlineGood = new ActionCollectOutlineGood(); //actionCollectGood.ObjectState = ObjectState; acRcard.NextAction = actionCollectOutlineGood; (act as IDCTClient).CachedAction = actionCollectOutlineGood; break; //采集OutlineNG, added by jessie lee, 2006/8/21 case ActionType.DataCollectAction_OutLineNG: ActionCollectOutlineNG actionCollectOutlineNG = new ActionCollectOutlineNG(); //actionCollectNG.ObjectState = acRcard.ObjectState; acRcard.NextAction = actionCollectOutlineNG; (act as IDCTClient).CachedAction = actionCollectOutlineNG; break; //Keyparts上料, added by jessie lee, 10/05/2006 case ActionType.DataCollectAction_CollectKeyParts: ActionCollectKeyparts actionCollectKeyparts = new ActionCollectKeyparts(); //actionCollectKeyparts.ObjectState = acRcard.ObjectState; acRcard.NextAction = actionCollectKeyparts; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_RunningCard"); // 如果上个采集是集成上料,则做KeyPart时同时做集成上料 if ((act as IDCTClient).CachedAction is Action.ActionCollectINNO) { if (((Action.ActionCollectINNO)(act as IDCTClient).CachedAction).INNOCode != string.Empty) { actionCollectKeyparts.NeedCollectINNO = true; actionCollectKeyparts.INNOCode = ((Action.ActionCollectINNO)(act as IDCTClient).CachedAction).INNOCode; } } else if ((act as IDCTClient).CachedAction is Action.ActionCollectKeyparts) { actionCollectKeyparts.NeedCollectINNO = ((Action.ActionCollectKeyparts)(act as IDCTClient).CachedAction).NeedCollectINNO; actionCollectKeyparts.INNOCode = ((Action.ActionCollectKeyparts)(act as IDCTClient).CachedAction).INNOCode; } // Added end (act as IDCTClient).CachedAction = actionCollectKeyparts; break; case ActionType.DataCollectAction_Split: ActionCollectIDMerge actionCollectIDMerge = new ActionCollectIDMerge(); acRcard.NextAction = actionCollectIDMerge; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_SN_For_Merge"); (act as IDCTClient).CachedAction = actionCollectIDMerge; break; case ActionType.DataCollectAction_CollectINNO: ActionCollectINNO actionCollectINNO = new ActionCollectINNO(); acRcard.NextAction = actionCollectINNO; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_CMPleaseInputINNOinEdt"); (act as IDCTClient).CachedAction = actionCollectINNO; break; case BaseDCTDriver.NEXTOP: ActionNextOP actionNextOP = new ActionNextOP(); acRcard.NextAction = actionNextOP; (act as IDCTClient).CachedAction = actionNextOP; break; case ActionType.DataCollectAction_CompareAppendix: ActionCompareApp actionCartonCompare = new ActionCompareApp(); acRcard.NextAction = actionCartonCompare; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_PLEASE_INPUT_CARTONNO"); (act as IDCTClient).CachedAction = actionCartonCompare; break; case ActionType.DataCollectAction_Mix: ActionCollectMix actionCollectMix = new ActionCollectMix(); acRcard.NextAction = actionCollectMix; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_RunningCard"); break; case ActionType.DataCollectAction_KBatch: ActionBatchWithKeypaerts actionBatchWithKeypaerts = new ActionBatchWithKeypaerts(); acRcard.NextAction = actionBatchWithKeypaerts; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_RunningCard"); break; case ActionType.DataCollectAction_CompareProductCode: ActionCompareProductCode actionCompareProductCode = new ActionCompareProductCode(); acRcard.NextAction = actionCompareProductCode; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_PLEASE_INPUT_CARTONNO"); (act as IDCTClient).CachedAction = actionCompareProductCode; break; case ActionType.DataCollectAction_CompareTwo: ActionCompareAppAndProductCode actionCompareAppAndProductCode = new ActionCompareAppAndProductCode(); acRcard.NextAction = actionCompareAppAndProductCode; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_PLEASE_INPUT_CARTONNO"); (act as IDCTClient).CachedAction = actionCompareAppAndProductCode; break; case ActionType.DataCollectAction_AutoNG: ActionAutoNG actionAutoNG = new ActionAutoNG(); acRcard.NextAction = actionAutoNG; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$DCT_NG_Please_Input_NG_SN"); (act as IDCTClient).CachedAction = actionAutoNG; break; case ActionType.DataCollectAction_FGPacking: ActionFGPacking actionFGPacking = new ActionFGPacking(); acRcard.NextAction = actionFGPacking; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_RunningCard"); (act as IDCTClient).CachedAction = actionFGPacking; break; case ActionType.DataCollectAction_MACID: ActionCollectMACID actionCollectMACID = new ActionCollectMACID(); acRcard.NextAction = actionCollectMACID; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_RunningCard"); (act as IDCTClient).CachedAction = actionCollectMACID; break; case ActionType.DataCollectAction_MACALL: ActionCollectMACALL actionCollectMACALL = new ActionCollectMACALL(); acRcard.NextAction = actionCollectMACALL; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_RunningCard"); (act as IDCTClient).CachedAction = actionCollectMACALL; break; case ActionType.DataCollectAction_ONPost: ActionCollectONPost actionCollectONPost = new ActionCollectONPost(); acRcard.NextAction = actionCollectONPost; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_UserCode"); (act as IDCTClient).CachedAction = actionCollectONPost; break; case ActionType.DataCollectAction_OffPost: ActionCollectOffPost actionCollectOffPost = new ActionCollectOffPost(); acRcard.NextAction = actionCollectOffPost; acRcard.OutMesssage = new UserControl.Message(MessageType.Normal, "$CS_Please_Input_UserCode"); (act as IDCTClient).CachedAction = actionCollectOffPost; break; default: bIsAction = false; break; } } else { bIsAction = false; } if (NeedInputActionCommand == true) { if (bIsAction == false) { msg.Add(new Message(MessageType.Error, "$CS_SystemError_CheckIDNotSupportAction")); ActionRCard actRcard = new ActionRCard(); actRcard.OutMesssage = new Message(MessageType.Normal, "$DCT_PLEASE_ACTION"); actRcard.NeedInputActionCommand = true; this.NextAction = actRcard; } else { NeedInputActionCommand = false; } } #endregion msg.Add(new Message(MessageType.Data, "", new object[] { args })); } return(msg); }