private Messages SetRCardReflowByErrorCode(ActionEventArgs actionEventArgs) { Messages messages = new Messages(); string routeCode = ""; string opCode = ""; System.Collections.Generic.List <string> listErrorCode = new System.Collections.Generic.List <string>(); if (((TSActionEventArgs)actionEventArgs).ErrorCodes != null) { ErrorCodeGroup2ErrorCode[] error = new ErrorCodeGroup2ErrorCode[((TSActionEventArgs)actionEventArgs).ErrorCodes.Length]; ((TSActionEventArgs)actionEventArgs).ErrorCodes.CopyTo(error, 0); for (int i = 0; i < error.Length; i++) { if (error[i].ErrorCode != "" && listErrorCode.Contains(error[i].ErrorCode) == false) { listErrorCode.Add(error[i].ErrorCode); } } } if (listErrorCode.Count == 0) { return(messages); } // 查询不良代码和产品对应的返工途程 TSModel.TSModelFacade tsmodelFacade = new BenQGuru.eMES.TSModel.TSModelFacade(this.DataProvider); object objErrorCode2OPRework = tsmodelFacade.GetErrorCode2OPRework(actionEventArgs.ProductInfo.NowSimulation.OPCode, listErrorCode[0], GlobalVariables.CurrentOrganizations.First().OrganizationID); object tempOPRework; ErrorCode2OPRework tempErrorCode2OPRework; if (objErrorCode2OPRework == null) { for (int i = 1; i < listErrorCode.Count; i++) { tempOPRework = tsmodelFacade.GetErrorCode2OPRework(actionEventArgs.ProductInfo.NowSimulation.OPCode, listErrorCode[i], GlobalVariables.CurrentOrganizations.First().OrganizationID); if (tempOPRework != null) { messages.Add(new Message(MessageType.Error, "$Error_ErrorCodeHaveMoreThanOneRoute")); return(messages); } } return(messages); } else { ErrorCode2OPRework firstErrorCode2OPRework = objErrorCode2OPRework as ErrorCode2OPRework; for (int i = 1; i < listErrorCode.Count; i++) { tempOPRework = tsmodelFacade.GetErrorCode2OPRework(actionEventArgs.ProductInfo.NowSimulation.OPCode, listErrorCode[i], GlobalVariables.CurrentOrganizations.First().OrganizationID); if (tempOPRework == null) { messages.Add(new Message(MessageType.Error, "$Error_ErrorCodeHaveMoreThanOneRoute")); return(messages); } else { tempErrorCode2OPRework = tempOPRework as ErrorCode2OPRework; if (tempErrorCode2OPRework.RouteCode != firstErrorCode2OPRework.RouteCode || tempErrorCode2OPRework.ToOPCode != firstErrorCode2OPRework.ToOPCode) { messages.Add(new Message(MessageType.Error, "$Error_ErrorCodeHaveMoreThanOneRoute")); return(messages); } } } opCode = firstErrorCode2OPRework.ToOPCode; routeCode = firstErrorCode2OPRework.RouteCode; if (string.Compare(opCode, "TS", true) == 0) { return(messages); } } if (routeCode.Trim().Length == 0) // 如果途程等于空,则将当前序列号的途程作为返工途程 { routeCode = actionEventArgs.ProductInfo.NowSimulation.RouteCode; } // 检查产品与途程的对应 ItemFacade itemFacade = new ItemFacade(this.DataProvider); ItemRoute2OP op = (ItemRoute2OP)itemFacade.GetItemRoute2Operation(actionEventArgs.ProductInfo.NowSimulation.ItemCode, routeCode, opCode); if (op == null) { messages.Add(new Message(MessageType.Error, "$Error_ReworkRouteNotBelongToItem [" + routeCode + "]")); return(messages); } // 将TS的状态改成维修中 TSFacade tsFacade = new TSFacade(this.DataProvider); object obj = tsFacade.GetCardLastTSRecord(actionEventArgs.LotCode); if (obj != null) { Domain.TS.TS ts = (Domain.TS.TS)obj; ts.ConfirmResourceCode = actionEventArgs.ResourceCode; ts.ConfirmUser = actionEventArgs.UserCode; ts.ConfirmDate = actionEventArgs.ProductInfo.NowSimulation.BeginDate; ts.ConfirmTime = actionEventArgs.ProductInfo.NowSimulation.BeginTime; ts.TSStatus = TSStatus.TSStatus_TS; tsFacade.UpdateTS(ts); } else { return(messages); } // 开始设置回流 ActionFactory actionFactory = new ActionFactory(this.DataProvider); IAction actionTSComplete = actionFactory.CreateAction(ActionType.DataCollectAction_TSComplete); TSActionEventArgs tsactionEventArgs = new TSActionEventArgs( ActionType.DataCollectAction_TSComplete, actionEventArgs.LotCode, actionEventArgs.UserCode, actionEventArgs.ResourceCode, TSStatus.TSStatus_Reflow, actionEventArgs.ProductInfo.NowSimulation.MOCode, actionEventArgs.ProductInfo.NowSimulation.ItemCode, routeCode, op.OPCode, actionEventArgs.UserCode, null); tsactionEventArgs.RouteCode = routeCode; tsactionEventArgs.IgnoreResourceInOPTS = true; messages.AddMessages(actionTSComplete.Execute(tsactionEventArgs)); return(messages); }
/// <summary> /// 维修完成 /// </summary> /// <param name="actionEventArgs"></param> /// <returns></returns> public Messages Execute(ActionEventArgs actionEventArgs) { Messages messages = new Messages(); DataCollectDebug dataCollectDebug = new DataCollectDebug(this.GetType().ToString() + "Collect"); dataCollectDebug.WhenFunctionIn(messages); try { ActionOnLineHelper dataCollect = new ActionOnLineHelper(this.DataProvider); //检查res在不在OPTS中 // Modified By Hi1/Venus.Feng on 20080711 for Hisense Version : 对于自动作Reflow的动作来讲,不再Check Resource是否在回流的工序中 if (((TSActionEventArgs)actionEventArgs).IgnoreResourceInOPTS != true) { messages.AddMessages(dataCollect.CheckResourceInOperationTS(actionEventArgs)); } // End Modified if (messages.IsSuccess()) { TSFacade tsFacade = new TSFacade(this.DataProvider); // if( !tsFacade.IsCardInTS(actionEventArgs.RunningCard)) // { // messages.Add(new Message(MessageType.Error,"$CSError_Card_Not_In_TS")); // } // if(messages.IsSuccess()) // { //Laws Lu,2005/09/16,修改 逻辑调整P4.8 object obj = tsFacade.GetCardLastTSRecord(actionEventArgs.RunningCard); if (obj == null) { messages.Add(new Message(MessageType.Error, "$CSError_Card_Not_In_TS")); //messages.Add(new Message(MessageType.Error,"$CSError_Card_TSStatus_IsNot_TS")); } else { Domain.TS.TS ts = (Domain.TS.TS)obj; if (ts.TSStatus == TSStatus.TSStatus_Scrap || ts.TSStatus == TSStatus.TSStatus_Split || ts.TSStatus == TSStatus.TSStatus_Reflow || ts.TSStatus == TSStatus.TSStatus_Confirm) { messages.Add(new Message(MessageType.Error, "$CSError_Card_TSStatus_IsNot_TS $Current_Status $" + ts.TSStatus)); } if (messages.IsSuccess()) { //2006/11/17,Laws Lu add get DateTime from db Server DBDateTime dbDateTime = FormatHelper.GetNowDBDateTime(DataProvider); DateTime dtNow = FormatHelper.ToDateTime(dbDateTime.DBDate, dbDateTime.DBTime); //修改 Karron Qiu,2005-9-26 if (ts.FromInputType == TS.TSFacade.TSSource_OnWIP)//线上.必须是回流或者报废 { if (((TSActionEventArgs)actionEventArgs).TSStatus == TSStatus.TSStatus_Complete) { messages.Add(new Message(MessageType.Error, "$CSError_Please_Select_Reflow_OR_Scrap"));//请选择回流或者报废 } } else if (ts.FromInputType == TS.TSFacade.TSSource_TS)//离线. 不能回流 { if (((TSActionEventArgs)actionEventArgs).TSStatus == TSStatus.TSStatus_Reflow) { messages.Add(new Message(MessageType.Error, "$CSError_Offline_Cannot_Reflow"));//离线不能回流 } } else if (ts.FromInputType == TS.TSFacade.TSSource_RMA)//RMA. 不能回流 { if (((TSActionEventArgs)actionEventArgs).TSStatus == TSStatus.TSStatus_Reflow) { messages.Add(new Message(MessageType.Error, "$CSError_RMATS_Cannot_Reflow"));//RMA不能回流 } } //Laws Lu,2005/11/09,新增 记录ShiftDay BaseSetting.BaseModelFacade dataModel = new BaseSetting.BaseModelFacade(this.DataProvider); Domain.BaseSetting.Resource res = (Domain.BaseSetting.Resource)dataModel.GetResource(actionEventArgs.ResourceCode); //onwip.SegmentCode = productInfo.NowSimulationReport.SegmentCode; BaseSetting.ShiftModelFacade shiftModel = new BaseSetting.ShiftModelFacade(this.DataProvider); Domain.BaseSetting.TimePeriod period = (Domain.BaseSetting.TimePeriod)shiftModel.GetTimePeriod(res.ShiftTypeCode, Web.Helper.FormatHelper.TOTimeInt(dtNow)); int shiftDay = 0; if (period == null) { throw new Exception("$OutOfPerid"); } if (period.IsOverDate == Web.Helper.FormatHelper.TRUE_STRING) { if (period.TimePeriodBeginTime < period.TimePeriodEndTime) { shiftDay = FormatHelper.TODateInt(dtNow.AddDays(-1)); } else if (Web.Helper.FormatHelper.TOTimeInt(dtNow) < period.TimePeriodBeginTime) { shiftDay = FormatHelper.TODateInt(dtNow.AddDays(-1)); } else { shiftDay = FormatHelper.TODateInt(dtNow); } } else { shiftDay = FormatHelper.TODateInt(dtNow); } #region 报废 if (((TSActionEventArgs)actionEventArgs).TSStatus == TSStatus.TSStatus_Scrap) { if (ts.TSStatus == TSStatus.TSStatus_TS || ts.TSStatus == TSStatus.TSStatus_Confirm) { ts.TSStatus = TSStatus.TSStatus_Scrap; ts.TSResourceCode = actionEventArgs.ResourceCode; ts.TSUser = actionEventArgs.UserCode; ts.TSDate = shiftDay; ts.TSTime = FormatHelper.TOTimeInt(dtNow); //added by jessie lee, 2005/11/24, //新增报废原因 ts.ScrapCause = (actionEventArgs as TSActionEventArgs).ScrapCause; ts.MaintainUser = (actionEventArgs as TSActionEventArgs).MaintainUser; ts.MaintainDate = ts.TSDate; ts.MaintainTime = ts.TSTime; //TODO:Laws Lu,2005/11/09,需要优化 tsFacade.UpdateTS(ts); //added by alex,2010/11/09 BenQGuru.eMES.OQC.OQCFacade oqcFacade = new BenQGuru.eMES.OQC.OQCFacade(this.DataProvider); OQCLot2Card oqcLot2Card = oqcFacade.GetLastOQCLot2CardByRCard(actionEventArgs.RunningCard) as OQCLot2Card; if (oqcLot2Card != null) { oqcLot2Card.Status = "SCRAP"; oqcFacade.UpdateOQCLot2Card(oqcLot2Card); } MOFacade moFAC = new MOFacade(this._domainDataProvider); if (ts.FromInputType == TSFacade.TSSource_OnWIP) { //Laws Lu,2005/08/19,新增 //Laws Lu,2005/08/25,修改 处理报废时,更新工单的报废数量 doAction(actionEventArgs); } } else { messages.Add(new Message(MessageType.Error, "$CSError_Card_TSStatus_IsNot_TS_OR_Confirm")); } } #endregion #region 完成 if (((TSActionEventArgs)actionEventArgs).TSStatus == TSStatus.TSStatus_Complete) { if (ts.TSStatus == TSStatus.TSStatus_TS) { ts.TSStatus = TSStatus.TSStatus_Complete; ts.TSTimes = 1; //added by jessie lee, 2005/11/24, ts.MaintainUser = (actionEventArgs as TSActionEventArgs).MaintainUser; ts.TSUser = actionEventArgs.UserCode; ts.MaintainDate = FormatHelper.TODateInt(dtNow); ts.MaintainTime = FormatHelper.TOTimeInt(dtNow); //Laws Lu,2006/04/28 add 添加维修shiftday和维修resourcecode ts.TSDate = shiftDay; ts.TSTime = FormatHelper.TOTimeInt(dtNow); ts.TSResourceCode = actionEventArgs.ResourceCode; tsFacade.UpdateTS(ts); // Added by Icyer 2006/11/07, KeyPart维修完成 if (ts.CardType == CardType.CardType_Part && ts.FromInputType == TSFacade.TSSource_TS) { DataCollectFacade dataCollectFacade = new DataCollectFacade(this.DataProvider); SimulationReport simRpt = dataCollectFacade.GetLastSimulationReport(ts.RunningCard); if (simRpt != null && simRpt.Status == ProductStatus.NG) { simRpt.Status = ProductStatus.GOOD; dataCollectFacade.UpdateSimulationReport(simRpt); } } // Added end } else { messages.Add(new Message(MessageType.Error, "$CSError_Card_TSStatus_IsNot_TS $Current_Status $" + ts.TSStatus)); } } #endregion #region 回流 if (((TSActionEventArgs)actionEventArgs).TSStatus == TSStatus.TSStatus_Reflow) { if (ts.TSStatus == TSStatus.TSStatus_TS) { ts.TSStatus = TSStatus.TSStatus_Reflow; ts.ReflowMOCode = ((TSActionEventArgs)actionEventArgs).MOCode; //ts.ReflowResourceCode = ((TSActionEventArgs)actionEventArgs).ItemCode ; ts.ReflowRouteCode = ((TSActionEventArgs)actionEventArgs).RouteCode; ts.ReflowOPCode = ((TSActionEventArgs)actionEventArgs).OPCode; //added by jessie lee, 2005/11/24, //added by jessie lee, 2005/11/24, ts.MaintainUser = (actionEventArgs as TSActionEventArgs).MaintainUser; ts.TSUser = actionEventArgs.UserCode; ts.MaintainDate = FormatHelper.TODateInt(dtNow); ts.MaintainTime = FormatHelper.TOTimeInt(dtNow); //Laws Lu,2006/04/28 add 添加维修shiftday和维修resourcecode ts.TSDate = shiftDay; ts.TSTime = FormatHelper.TOTimeInt(dtNow); ts.TSResourceCode = actionEventArgs.ResourceCode; tsFacade.UpdateTSReflowStatus(ts); } else { messages.Add(new Message(MessageType.Error, "$CSError_Card_TSStatus_IsNot_TS $Current_Status $" + ts.TSStatus)); } } #endregion } } } } catch (Exception e) { messages.Add(new Message(e)); } dataCollectDebug.WhenFunctionOut(messages); return(messages); }
private void ucButton2_Click(object sender, EventArgs e) { Messages messages = new Messages(); if (rCardEditor.Text.Trim() == String.Empty) { messages.Add(new UserControl.Message(MessageType.Error, "$CSError_RCard_CanNot_Empty")); ApplicationRun.GetInfoForm().Add(messages); return; } DataCollectFacade dataCollectFacade = new DataCollectFacade(this.DataProvider); string sourceRCard = dataCollectFacade.GetSourceCard(rCardEditor.Text.Trim().ToUpper(), string.Empty); string tsStatus; //Laws Lu,2005/11/22,新增 添加代理录入人员 //modified by jessie lee, 2005/11/24 string userCode = ApplicationService.Current().UserCode; if (txtAgentUser.Checked == true && txtAgentUser.Value.Trim().Length == 0) { messages.Add(new UserControl.Message(MessageType.Error, "$CS_Error_Vicegerent_CanNot_Empty")); ApplicationRun.GetInfoForm().Add(messages); return; } else if (txtAgentUser.Checked == true && txtAgentUser.Value != String.Empty) { if ((new BenQGuru.eMES.Security.SecurityFacade(this.DataProvider)).CheckResourceRight(txtAgentUser.Value.Trim().ToUpper() , ApplicationService.Current().ResourceCode)) { userCode = txtAgentUser.Value; } else { messages.Add(new UserControl.Message(MessageType.Error, "$CS_Error_Vicegerent_Is_Wrong")); ApplicationRun.GetInfoForm().Add(messages); return; } } if (ultraCheckEditor1.Checked == true) { tsStatus = TSStatus.TSStatus_Reflow; //勾选回流,然后不工位栏位未选资料也可允许通过。在业务上回流是一定有确定的工位的。 //系统要检查此时保存,工位是否为空。 if (ucLabComboxOPCode.SelectedItemText == string.Empty) { messages.Add(new UserControl.Message(MessageType.Error, "$CS_Error_ReflowOPCode_CanNot_Empty")); ApplicationRun.GetInfoForm().Add(messages); ucLabComboxOPCode.Focus(); return; } } else if (ultraCheckEditorScrap.Checked == true) { tsStatus = TSStatus.TSStatus_Scrap; } else { tsStatus = TSStatus.TSStatus_Complete; // //修改,Karron Qiu 2005-9-23 // //线上采集的不良品,修复后则“回流”;修不好则“报废”。而不选“回流”或“报废”代表该产品要入了良品库, // //线上的不良品修好后是直接回产线回流,不需要入良品库的 // messages.Add(new UserControl.Message(MessageType.Error,"$CSError_Please_Select_Reflow_OR_Scrap"));//请选择回流或者报废 // ApplicationRun.GetInfoForm().Add(messages); // return; } ActionFactory actionFactory = new ActionFactory(this.DataProvider); IAction actionTSComplete = actionFactory.CreateAction(ActionType.DataCollectAction_TSComplete); TSActionEventArgs actionEventArgs = new TSActionEventArgs( ActionType.DataCollectAction_TSComplete, FormatHelper.PKCapitalFormat(FormatHelper.CleanString(sourceRCard)), userCode, ApplicationService.Current().ResourceCode, tsStatus, this.ucLabEditMOCode.Value, this.ucLabEditItemCode.Value, this.ucLabEditRoute.Value, this.ucLabComboxOPCode.SelectedItemText, ApplicationService.Current().UserCode, FormatHelper.CleanString(this.txtScrapCause.Text, 100)); //修改 Karron Qiu 2005-9-26 //在做维修完成处理时,依然按照之前的检查逻辑 //(不良品是否“已选不良零件”或“已选不良位置”有信息),如果没有,则弹出提示信息, //比如:“该不良品无“不良零件”或“不良位置”信息,是否要维修完成”, //点击“确认”即维修完成,点击“取消”则维修完成失败 TSFacade tsFacade = new TSFacade(this.DataProvider); object obj = tsFacade.GetCardLastTSRecord(actionEventArgs.RunningCard); if (obj == null) { messages.Add(new UserControl.Message(MessageType.Error, "$CSError_Card_Not_In_TS")); ApplicationRun.GetInfoForm().Add(messages); return; } else { Domain.TS.TS ts = (Domain.TS.TS)obj; if (tsFacade.CheckErrorCodeCountAndErrorSolutionForTSComplete(actionEventArgs.RunningCard)) { if (!tsFacade.CheckErrorPartAndErrorLocationForTSComplete(actionEventArgs.RunningCard)) { if (System.Windows.Forms.MessageBox.Show(null, MutiLanguages.ParserString("$CS_No_ErrorPartAndLoc_Is_Com"), "", System.Windows.Forms.MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.Cancel) { return; } } } else { messages.Add(new UserControl.Message(MessageType.Error, "$CSError_Card_TSStatus_IsNot_TS $Current_Status $" + ts.TSStatus)); ApplicationRun.GetInfoForm().Add(messages); return; } } //karron qiu ,2005/9/16 ,增加try catch,在catch中添加rollback操作 DataProvider.BeginTransaction(); try { messages.AddMessages(actionTSComplete.Execute(actionEventArgs)); if (!messages.IsSuccess()) { this.DataProvider.RollbackTransaction(); ApplicationRun.GetInfoForm().Add(messages); } else { this.DataProvider.CommitTransaction(); ApplicationRun.GetInfoForm().Add(new UserControl.Message(MessageType.Success, "$CS_TSScrap_SUCCESS")); } } catch { this.DataProvider.RollbackTransaction(); throw; } finally { (DataProvider as SQLDomainDataProvider).PersistBroker.CloseConnection(); } }
private void rCardEditor_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\r') { Messages messages = new Messages(); if (rCardEditor.Text.Trim() == String.Empty) { messages.Add(new UserControl.Message(MessageType.Error, "$CSError_RCard_CanNot_Empty")); ApplicationRun.GetInfoForm().Add(messages); return; } DataCollectFacade dataCollectFacade = new DataCollectFacade(this.DataProvider); string sourceRCard = dataCollectFacade.GetSourceCard(rCardEditor.Text.Trim().ToUpper(), string.Empty); //Laws Lu,2005/08/25,新增 检查当前资源是否为TS站 ActionOnLineHelper dataCollect = new ActionOnLineHelper(this._domainDataProvider); ActionEventArgs actionEventArgs = new ActionEventArgs( ActionType.DataCollectAction_TSConfirm, FormatHelper.PKCapitalFormat(FormatHelper.CleanString(sourceRCard)), ApplicationService.Current().UserCode, ApplicationService.Current().ResourceCode); messages.AddMessages(dataCollect.CheckResourceInOperationTS(actionEventArgs)); //End Laws LU if (!messages.IsSuccess()) { ApplicationRun.GetInfoForm().Add(messages); return; } // TSFacade tsFacade = new TSFacade(this.DataProvider); // if(!tsFacade.IsCardInTS(rCardEditor.Text.ToUpper().Trim())) // { // messages.Add(new UserControl.Message (MessageType.Error,"$CSError_Card_Not_In_TS")); // ApplicationRun.GetInfoForm().Add(messages); // return; // } // // object obj = tsFacade.GetCardLastTSRecordInTSStatus(rCardEditor.Text.ToUpper().Trim()); // if(obj == null) // { // messages.Add(new UserControl. Message(MessageType.Error,"$CSError_Card_TSStatus_IsNot_TS $Current_Status $"+ts.TSStatus)); // ApplicationRun.GetInfoForm().Add(messages); // return; // } // BenQGuru.eMES.Domain.TS.TS ts = (BenQGuru.eMES.Domain.TS.TS)obj; TSFacade tsFacade = new TSFacade(this.DataProvider); //Laws Lu,2005/09/16,修改 逻辑调整P4.8 object obj = tsFacade.GetCardLastTSRecord(actionEventArgs.RunningCard); Domain.TS.TS ts = null; if (obj == null) { messages.Add(new UserControl.Message(MessageType.Error, "$CSError_Card_Not_In_TS")); ApplicationRun.GetInfoForm().Add(messages); return; } else { ts = (Domain.TS.TS)obj; if (ts.TSStatus == TSStatus.TSStatus_Scrap || ts.TSStatus == TSStatus.TSStatus_Split || ts.TSStatus == TSStatus.TSStatus_Reflow || ts.TSStatus == TSStatus.TSStatus_Confirm) { messages.Add(new UserControl.Message(MessageType.Error, "$CSError_Card_TSStatus_IsNot_TS $Current_Status $" + ts.TSStatus)); ApplicationRun.GetInfoForm().Add(messages); return; } if (ts.TSStatus != TSStatus.TSStatus_TS) { messages.Add(new UserControl.Message(MessageType.Error, "$CSError_Card_TSStatus_IsNot_TS $Current_Status $" + ts.TSStatus)); ApplicationRun.GetInfoForm().Add(messages); return; } } if (ts.FromInputType == TSFacade.TSSource_TS) { ultraCheckEditor1.Enabled = false; } else { ultraCheckEditor1.Enabled = true; } } }
private void ultraCheckEditor1_CheckedValueChanged(object sender, EventArgs e) { if (ultraCheckEditor1.Checked == true) { if (ultraCheckEditorScrap.Checked == true) { ultraCheckEditorScrap.Checked = false; } Messages messages = new Messages(); if (rCardEditor.Text.Trim() == String.Empty) { messages.Add(new UserControl.Message(MessageType.Error, "$CSError_RCard_CanNot_Empty")); this.ultraCheckEditor1.Checked = false; ApplicationRun.GetInfoForm().Add(messages); return; } //Laws Lu,2005/09/16,修改 逻辑调整P4.8 TSFacade tsFacade = new TSFacade(this.DataProvider); object obj = tsFacade.GetCardLastTSRecord(rCardEditor.Value.ToString().Trim().ToUpper()); if (obj == null) { messages.Add(new UserControl.Message(MessageType.Error, "$CSError_Card_Not_In_TS")); ApplicationRun.GetInfoForm().Add(messages); return; } else { Domain.TS.TS ts = (Domain.TS.TS)obj; if (ts.TSStatus == TSStatus.TSStatus_Scrap || ts.TSStatus == TSStatus.TSStatus_Split || ts.TSStatus == TSStatus.TSStatus_Reflow || ts.TSStatus == TSStatus.TSStatus_Confirm) { messages.Add(new UserControl.Message(MessageType.Error, "$CSError_Card_TSStatus_IsNot_TS $Current_Status $" + ts.TSStatus)); ApplicationRun.GetInfoForm().Add(messages); return; } if (ts.TSStatus != TSStatus.TSStatus_TS) { messages.Add(new UserControl.Message(MessageType.Error, "$CSError_Card_TSStatus_IsNot_TS $Current_Status $" + ts.TSStatus)); this.ultraCheckEditor1.Checked = false; ApplicationRun.GetInfoForm().Add(messages); return; } else { SetRaflowPanel(obj); } } // object obj = tsFacade.GetCardLastTSRecordInTSStatus(rCardEditor.Text.ToUpper().Trim()); // if(obj == null) // { // messages.Add(new UserControl. Message(MessageType.Error,"$CSError_Card_TSStatus_IsNot_TS")); // this.ultraCheckEditor1.Checked = false ; // ApplicationRun.GetInfoForm().Add(messages); // return; // } // else // { // SetRaflowPanel(obj); // } } else { ClearReflowPanel(); } }