public virtual OperationResult UpdateEntity(Simulation simulation,bool isSave=true) { return simulationRepository.Update(simulation,isSave); }
public SimulationReport(Simulation simulation) { ACTIONLIST = simulation.ACTIONLIST; CARTONCODE=simulation.CARTONCODE; EATTRIBUTE1=simulation.EATTRIBUTE1; EATTRIBUTE2=simulation.EATTRIBUTE2; FROMOP=simulation.FROMOP; FROMROUTE=simulation.FROMROUTE; IDMERGERULE=simulation.IDMERGERULE; ISCOM=simulation.ISCOM; ISHOLD=simulation.ISHOLD; ITEMCODE=simulation.ITEMCODE; LACTION=simulation.LACTION; LOTNO=simulation.LOTNO; MACHINETYPE=simulation.MACHINETYPE; MDATE=simulation.MDATE; MOCODE=simulation.MOCODE; MODELCODE=simulation.MODELCODE; MOSEQ=simulation.MOSEQ; MTIME=simulation.MTIME; MUSER=simulation.MUSER; NGTIMES=simulation.NGTIMES; OPCODE=simulation.OpCode; PALLETCODE=simulation.PALLETCODE; PRODUCTSTATUS=simulation.PRODUCTSTATUS; RCARD=simulation.RCARD; RCARDSEQ=simulation.RCARDSEQ; RESCODE=simulation.RESCODE; RMABILLCODE=simulation.RMABILLCODE; ROUTECODE=simulation.ROUTECODE; SCARD=simulation.SCARD; SCARDSEQ=simulation.SCARDSEQ; SHELFNO=simulation.SHELFNO; TCARD=simulation.TCARD; TCARDSEQ=simulation.TCARDSEQ; }
public virtual OperationResult AddEntity(Simulation simulation,bool isSave=true) { return simulationRepository.Insert(simulation,isSave); }
public OperationResult CardGoMo(string moString, string lengthString, string prefixString, string card, string rescode, string usercode) { bool tbag = false; OperationResult operationResult = CardGoMoCheck(moString, lengthString, prefixString, card, rescode, usercode); if (operationResult.ResultType == OperationResultType.Error) return operationResult; Mo mo = (Mo)MoFormService.FindEntity(moString).AppendData; Simulation nowSimulation = SimulationFormService.Simulations().SingleOrDefault(s => s.RCARD == card && s.MOCODE == mo.MoCode); SimulationReport simulationReport = new SimulationReport(); Item item = ItemFormService.Items().SingleOrDefault(i => i.ITEMCODE == mo.ITEMCODE); if (nowSimulation == null) { nowSimulation = new Simulation(); tbag = true; } MoRcard moRcard = new MoRcard(); //TBLSimulation nowSimulation.ROUTECODE = mo.Route.ROUTECODE; nowSimulation.OpCode = mo.Route.Ops.First().OPCODE; nowSimulation.LACTION = "GOMO"; nowSimulation.ACTIONLIST = ";GOMO;"; nowSimulation.RCARD = card; nowSimulation.TCARD = card; nowSimulation.TCARDSEQ = 1; nowSimulation.SCARD = card; nowSimulation.SCARDSEQ = 1; nowSimulation.MOCODE = mo.MoCode; nowSimulation.ITEMCODE = mo.ITEMCODE; nowSimulation.MODELCODE = item.Model.MODELCODE; nowSimulation.IDMERGERULE = mo.IDMERGERULE; nowSimulation.ISCOM = "0"; nowSimulation.RESCODE = rescode; nowSimulation.PRODUCTSTATUS = "GOOD"; nowSimulation.FROMOP = ""; nowSimulation.FROMROUTE = ""; nowSimulation.CARTONCODE = ""; nowSimulation.LOTNO = ""; nowSimulation.PALLETCODE = ""; nowSimulation.NGTIMES = 0; nowSimulation.ISHOLD = 0; nowSimulation.MOSEQ = mo.MOSEQ; nowSimulation.MUSER = usercode; //TBLSimulationReport simulationReport.ROUTECODE = mo.Route.ROUTECODE; simulationReport.OPCODE = mo.Route.Ops.First().OPCODE; simulationReport.LACTION = "GOMO"; simulationReport.ACTIONLIST = ";GOMO;"; simulationReport.RCARD = card; simulationReport.TCARD = card; simulationReport.TCARDSEQ = 1; simulationReport.SCARD = card; simulationReport.SCARDSEQ = 1; simulationReport.MOCODE = mo.MoCode; simulationReport.ITEMCODE = mo.ITEMCODE; simulationReport.MODELCODE = item.Model.MODELCODE; simulationReport.IDMERGERULE = mo.IDMERGERULE; simulationReport.ISCOM = "0"; simulationReport.RESCODE = rescode; simulationReport.PRODUCTSTATUS = "GOOD"; simulationReport.FROMOP = ""; simulationReport.FROMROUTE = ""; simulationReport.CARTONCODE = ""; simulationReport.LOTNO = ""; simulationReport.PALLETCODE = ""; simulationReport.NGTIMES = 0; simulationReport.ISHOLD = 0; simulationReport.MOSEQ = mo.MOSEQ; simulationReport.MUSER = usercode; //TBLONWIP //TBLMo mo.MOINPUTQTY = mo.MOINPUTQTY + 1; //TBLMoRcard moRcard.MoCode = mo.MoCode; moRcard.Seq = 1; moRcard.MoCardStart = card; moRcard.MoCardEnd = card; moRcard.Muser = usercode; moRcard.MoSeq = mo.MOSEQ; MoFormService.UpdateEntity(mo, false); SimulationReportFormService.AddEntity(simulationReport, false); MoRcardFormService.AddEntity(moRcard, false); if (tbag) SimulationFormService.AddEntity(nowSimulation); else SimulationFormService.UpdateEntity(nowSimulation); operationResult.ResultType = OperationResultType.Success; operationResult.Message = card +Properties.Resources.String_FrmGoodNGService_CollectSuccess; return operationResult; }