// GET: ProcessSteps/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProcessStep processStep = _processStepService.Find(id); if (processStep == null) { return(HttpNotFound()); } return(View(processStep)); }
// GET: ProcessSteps/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProcessStep processStep = db.ProcessSteps.Find(id); if (processStep == null) { return(HttpNotFound()); } return(View(processStep)); }
public void TestShampoo() { ProcessStep shampoo = new ProcessStep("shampoo"); ProcessStep rinse = new ProcessStep("rinse"); ProcessSequence once = new ProcessSequence("once"); once.Add(shampoo); once.Add(rinse); ProcessSequence instructions = new ProcessSequence("instructions"); instructions.Add(once); instructions.Add(once); Assert.AreEqual(2, instructions.GetStepCount()); }
public ServiceResponse GetListAssignee(ProcessStep processStep) { ServiceResponse result = new ServiceResponse(); try { result = _processService.GetListAssignee(processStep); } catch (Exception ex) { result.OnExeption(ex); } return(result); }
public async Task <ActionResult> GetProcessStep(int?id) { if (id == null) { return(BadRequestTextResult()); } ProcessStep processStep = await FindAsyncProcessStep(id.Value); if (processStep == null) { return(NotFoundTextResult()); } return(Json(new ProcessStepDTO(processStep), JsonRequestBehavior.AllowGet)); }
/* * abc * / \ * a bc * / \ * b c */ /// <summary> /// Test zwyk³ego drzewka. /// </summary> public void TestTree() { ProcessStep a = new ProcessStep("a"); ProcessStep b = new ProcessStep("b"); ProcessStep c = new ProcessStep("c"); ProcessSequence bc = new ProcessSequence("bc"); bc.Add(b); bc.Add(c); ProcessSequence abc = new ProcessSequence("abc"); abc.Add(a); abc.Add(bc); Assertion.AssertEquals(3, abc.GetStepCount()); }
/// <summary> /// Test procesu powtarzanego raz: "umyæ, sp³ukaæ, powtórzyæ". /// </summary> public void TestShampoo() { ProcessStep shampoo = new ProcessStep("umyæ"); ProcessStep rinse = new ProcessStep("sp³ukaæ"); ProcessSequence once = new ProcessSequence("powtórzyæ"); once.Add(shampoo); once.Add(rinse); ProcessSequence instructions = new ProcessSequence("instrukcje"); instructions.Add(once); instructions.Add(once); Assertion.AssertEquals(2, instructions.GetStepCount()); }
public void Delete(ProcessStep newProcessStep) { using (ISession session = NHibernateHelper.openSession()) { using (ITransaction transaction = session.BeginTransaction()) { try { session.Delete(newProcessStep); transaction.Commit(); } catch (Exception e) { } } } }
public void EnabledAnnotated() { var step = new ProcessStep(); var a = AnnotationCollection.Annotate(step); var x = a.GetMember(nameof(step.RegularExpressionPattern)); var str = x.GetMember("Value"); var strval = str.Get <IStringValueAnnotation>(); var v1 = strval.Value.ToString(); Assert.AreEqual("(.*)", v1); step.RegularExpressionPattern.Value = "test"; a.Read(); var v2 = strval.Value; Assert.AreEqual("test", v2); }
/// <summary> /// </summary> /// <param name="entity"/> /// <returns/> public bool OnAfterLoad_ProcessStep(ProcessStep entity) { try { entity.LINE_ID = UtilityHelper.Trim(entity.LINE_ID); entity.PROCESS_ID = UtilityHelper.Trim(entity.PROCESS_ID); entity.STEP_ID = UtilityHelper.Trim(entity.STEP_ID); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(false); } return(true); }
/// <summary> /// 更新 /// </summary> /// <param name="entity">实体</param> /// <returns></returns> public AjaxResult Update(ProcessStep entity) { AjaxResult res = new AjaxResult(ResultStatus.OK); entity.Valid(); if (entity.Update() == 1) { res.Status = ResultStatus.OK; } else { res.Status = ResultStatus.NO; res.Message = "更新失败!"; } return(res); }
public void ListExternalParameters() { var runcli = new RunCliAction { ListExternal = true, TestPlanPath = planFile, NonInteractive = true }; var plan = new TestPlan(); var step = new ProcessStep() { LogHeader = null, // test that the log header is a null string. Application = "tap.exe" // test that application is a non-null string. }; plan.ChildTestSteps.Add(step); var stepType = TypeData.GetTypeData(step); stepType.GetMember(nameof(step.LogHeader)).Parameterize(plan, step, "log-header"); stepType.GetMember(nameof(step.Timeout)).Parameterize(plan, step, "timeout"); stepType.GetMember(nameof(step.WaitForEnd)).Parameterize(plan, step, "wait-for-end"); stepType.GetMember(nameof(step.VerdictOnMatch)).Parameterize(plan, step, "match-verdict"); stepType.GetMember(nameof(step.Application)).Parameterize(plan, step, "application"); plan.Save(planFile); var traceListener = new TestTraceListener(); Log.AddListener(traceListener); try { var exitCode = runcli.Execute(CancellationToken.None); Assert.AreEqual(0, exitCode); Log.Flush(); var log = traceListener.allLog.ToString(); StringAssert.Contains("Listing 5 External Test Plan Parameters", log); StringAssert.Contains("application = tap.exe", log); StringAssert.Contains("log-header = ", log); StringAssert.Contains("wait-for-end = True", log); StringAssert.Contains("match-verdict = Pass", log); } finally { Log.RemoveListener(traceListener); File.Delete(planFile); } }
public override void HandleProcess(ProcessStep step) { switch (step) { case ProcessStep.SELECTION: Console.WriteLine("-> HR selected candidate."); break; case ProcessStep.FINISHED: Console.WriteLine("----> HR finished hiring process."); break; default: _sucessor.HandleProcess(step); break; } }
public static MicronBEAssyBEStep CreateStep(ProcessStep processStep) { try { MicronBEAssyBEStep step = new MicronBEAssyBEStep(); step.StepID = processStep.STEP_ID; step.Sequence = (int)(processStep.SEQUENCE); step.StepGroup = processStep.STEP_GROUP == null ? string.Empty : processStep.STEP_GROUP; return(step); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(default(MicronBEAssyBEStep)); } }
public async Task <ActionResult> SetProcessStepDate(int?id, DateTime?realizedDate, DateTime?targetDate, DateTime?forecastDate) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProcessStep processStep = await FindAsyncProcessStep(id.Value); if (processStep == null) { return(HttpNotFound()); } if (realizedDate.HasValue) { processStep.RealizedDate = realizedDate.Value; } if (targetDate.HasValue) { processStep.TargetDate = targetDate.Value; } if (forecastDate.HasValue) { processStep.ForecastDate = forecastDate.Value; } try { await DataContext.SaveChangesAsync(this); } catch (Exception ex) { var sb = new StringBuilder(); sb.Append(MessageStrings.UnexpectedError); sb.Append(processStep.Title); sb.Append("<br/>"); AppendExceptionMsg(ex, sb); return(StatusCodeTextResult(sb, HttpStatusCode.InternalServerError)); } return(new HttpStatusCodeResult(HttpStatusCode.OK)); }
public ServiceResponse UpdateStep(ProcessStep processStep) { ServiceResponse result = new ServiceResponse(); try { var currentUserID = GetCurrentUser.GetUserID(User.Claims.ToList()); var currentUsername = User.Identity.Name; result = _processService.UpdateStep(processStep, currentUserID, currentUsername); } catch (Exception ex) { result.OnExeption(ex); } return(result); }
public BlockStatement Process(DecompilationContext context, BlockStatement body) { this.methodContext = context.MethodContext; this.processStep = ProcessStep.Search; Visit(body); RemoveNonConditionVariables(); if (variables.Count > 0) { ReplaceConditionOnlyVariables(body); } this.methodContext = null; this.currentVariable = null; variables.Clear(); return(body); }
public static FastReport.Report GetReport(ReportRequestArgs e) { DataRow drReportTemplateConfig = GetReportTemplateRow(e.ReportTemplateID); e.ReportTemplateConfig = drReportTemplateConfig; long lReportTemplateID = Convert.ToInt64(e.ReportTemplateConfig["ReportTemplateID"]); byte[] reportTempleData = (byte[])e.ReportTemplateConfig["TemplateData"]; DateTime dtTemplateFileTime = DateTime.Parse(e.ReportTemplateConfig["TemplateFileTime"].ToString()); string strReportTemplateName = e.ReportTemplateConfig["ReportTemplateName"].ToString().Trim(); string strReportTemplateNameExt = e.ReportTemplateConfig["ReportTemplateNameExt"].ToString().Trim(); //检测本地是否存在报表文件,如果不存在或者与服务器比本地文件新时更新本地文件 string strFileFullName = WriteReportWithCheck(lReportTemplateID, strReportTemplateName, dtTemplateFileTime, reportTempleData, strReportTemplateNameExt); ProcessStep.AddStep("WriteReportWithCheck_End", DateTime.Now.ToString("MMdd HH:mm:ss ") + DateTime.Now.Millisecond); // 加载模板 FastReport.Report report = null; //Form frm = null; try { //frm = new Form(); report = new FastReport.Report(); ProcessStep.AddStep("Report_New", DateTime.Now.ToString("MMdd HH:mm:ss ") + DateTime.Now.Millisecond); report.FinishReport += Report_FinishReport; report.Load(strFileFullName); ProcessStep.AddStep("Report_Load", DateTime.Now.ToString("MMdd HH:mm:ss ") + DateTime.Now.Millisecond); // 纸张设置 //SetPaperAuto(report, iReportTemplateID); BuildParmsAndData(e, report, enBuildParmsAndDataActionType.SetValue); ProcessStep.AddStep("BuildParmsAndData", DateTime.Now.ToString("MMdd HH:mm:ss ") + DateTime.Now.Millisecond); //ReportPreviewer previewer = new Report.ReportPreviewer(report); SetPrintSettings(report, lReportTemplateID); ProcessStep.AddStep("SetPrintSettings", DateTime.Now.ToString("MMdd HH:mm:ss ") + DateTime.Now.Millisecond); } catch (Exception ex) { } return(report); }
private void buttonDown_Click(object sender, EventArgs e) { ProcessStep ProcessStepFromList = (ProcessStep)this.listBoxProcessSteps.SelectedItem; if (ProcessStepFromList.Step == ProcessStepList.Count) { MessageBox.Show(ProcessStepFromList.Name + " kann nicht nach unten verschoben werden"); } else { ProcessStep NextProcessStepFromList = ProcessStepList.ElementAt(ProcessStepFromList.Step); int temp = ProcessStepFromList.Step; ProcessStepFromList.Step = NextProcessStepFromList.Step; NextProcessStepFromList.Step = temp; SelectedObjects.Process.ProcessSteps = ProcessStepList; FillListBoxProcessStep(); this.listBoxProcessSteps.SelectedIndex = ProcessStepFromList.Step - 1; } }
private void buttonUp_Click(object sender, EventArgs e) { ProcessStep ProcessStepFromList = ProcessStepList.ElementAt(((ProcessStep)this.listBoxProcessSteps.SelectedItem).Step - 1); if (ProcessStepFromList.Step == 1) { MessageBox.Show(ProcessStepFromList.Name + " kann nicht nach oben verschoben werden"); } else { ProcessStep PreviousProcessStepFromList = ProcessStepList.ElementAt(ProcessStepFromList.Step - 2); int temp = ProcessStepFromList.Step; ProcessStepFromList.Step = PreviousProcessStepFromList.Step; PreviousProcessStepFromList.Step = temp; SelectedObjects.Process.ProcessSteps = ProcessStepList; FillListBoxProcessStep(); this.listBoxProcessSteps.SelectedIndex = ProcessStepFromList.Step - 1; } }
// Constructors & Finalizers ------------------------------------------- public FolaTagData() : base(checkSumByteNo, carrierIDByteNo) { _processSteps = new ProcessStep[_maxProcStep]; _hgasInCarrier = new PartData[_carrierSize]; // initialize content for (int slot = 0; slot < _carrierSize; slot++) { _hgasInCarrier[slot] = new PartData(); //_hgasInCarrier[slot].Slot = slot; } for (int step = 0; step < _maxProcStep; step++) { _processSteps[step] = new ProcessStep(); //_processSteps[step].StepNumber = step; } Clear(); }
/// <summary> /// 插入 /// </summary> /// <param name="entity">实体</param> /// <returns></returns> public AjaxResult Insert(ProcessStep entity) { AjaxResult res = new AjaxResult(ResultStatus.OK); entity.StepID = (entity.StepID == Guid.Empty ? Guid.NewGuid() : entity.StepID); entity.Valid(); entity.CreatedOn = DateTime.Now; entity.CreatedBy = UserInfoBLL.GetCurrentUserGuid(); if (entity.Insert() == 1) { res.Status = ResultStatus.OK; } else { res.Status = ResultStatus.NO; res.Message = "新增失败!"; } return(res); }
// GET: ProcessSteps/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProcessStep processStep = _processStepService.Find(id); if (processStep == null) { return(HttpNotFound()); } var productionprocessRepository = _unitOfWork.Repository <ProductionProcess>(); ViewBag.ProductionProcessId = new SelectList(productionprocessRepository.Queryable(), "Id", "Name", processStep.ProductionProcessId); var stationRepository = _unitOfWork.Repository <Station>(); ViewBag.StationId = new SelectList(stationRepository.Queryable(), "Id", "StationNo", processStep.StationId); return(View(processStep)); }
private static dynamic GetStatByStep(ProcessStep step, List <FileItem> listVideoEncoded, List <FileItem> listSpriteCreated, List <FileItem> listIpfsAdded) { try { return(new { audioCpuEncodeLast24h = GetProcessStats(listVideoEncoded.FindAll(f => f.AudioCpuEncodeProcess != null && f.AudioCpuEncodeProcess.CurrentStep == step).Select(f => f.AudioCpuEncodeProcess).ToList()), videoGpuEncodeLast24h = GetProcessStats(listVideoEncoded.FindAll(f => f.VideoGpuEncodeProcess != null && f.VideoGpuEncodeProcess.CurrentStep == step).Select(f => f.VideoGpuEncodeProcess).ToList()), audioVideoCpuEncodeLast24h = GetProcessStats(listVideoEncoded.FindAll(f => f.AudioVideoCpuEncodeProcess != null && f.AudioVideoCpuEncodeProcess.CurrentStep == step).Select(f => f.AudioVideoCpuEncodeProcess).ToList()), spriteCreationLast24h = GetProcessStats(listSpriteCreated.FindAll(f => f.SpriteEncodeProcess != null && f.SpriteEncodeProcess.CurrentStep == step).Select(f => f.SpriteEncodeProcess).ToList()), ipfsAddLast24h = GetProcessStats(listIpfsAdded.FindAll(f => f.IpfsProcess != null && f.IpfsProcess.CurrentStep == step).Select(f => f.IpfsProcess).ToList()) }); } catch (Exception ex) { return(new { exception = ex.ToString() }); } }
public async Task <ActionResult> Edit(int?id, bool?modal) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProcessStep processStep = await FindAsyncProcessStep(id.Value); if (processStep == null) { return(HttpNotFound()); } SetSelectLists(processStep); if (modal ?? false) { ViewBag.Modal = true; return(PartialView("_Edit", processStep)); } return(View(processStep)); }
public async Task <ActionResult> Details(int?id, bool?modal) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProcessStep processStep = await FindAsyncProcessStep(id.Value); if (processStep == null) { return(HttpNotFound()); } await PutCanUserInViewBag(); if (modal ?? false) { return(PartialView("_Details", processStep)); } return(View(processStep)); }
public ServiceResponse Add(Process process, int currentUserID, string currentUsername) { ServiceResponse res = new ServiceResponse(); if (process == null || (process != null && process.ProcessName == null) || (process != null && process.ProcessGroupId == null)) { res.OnError("Data empty"); return(res); } DateTime now = DateTime.Now; process.ProcessStatus = (int)ProcessStatus.Draf; process.CreatedBy = currentUsername; process.CreatedDate = now; process.ModifiedBy = currentUsername; process.ModifiedDate = now; var firstStep = new ProcessStep(); firstStep.ProcessStepName = "Bước thức nhất"; firstStep.SortOrder = 1; firstStep.CreatedBy = currentUsername; firstStep.CreatedDate = now; firstStep.ModifiedBy = currentUsername; firstStep.ModifiedDate = now; firstStep.StepSortOrder = 1; process.ProcessSteps.Add(firstStep); var processRes = _processRepository.Add(process); this.Save(); res.OnSuccess(processRes); return(res); }
private void SetLabelStage (Label ll, Label ll1, Label ll2, ProcessStep step) { string text = "^"; Color c = Color.Accent; string progressTextBase = step.ToString (); switch (step) { case ProcessStep.Waiting: text = "^"; c = Global.ColorBoxLowText; break; case ProcessStep.Loading: text = "&"; c = Global.ColorBoxText; break; case ProcessStep.Processing: text = "#"; c = Global.ColorBoxText; break; case ProcessStep.Ready: text = "$"; c = Global.ColorBoxHighText; break; case ProcessStep.Broken: text = "*"; c = Global.ColorBoxLowText; break; } if (!isFinish) { stepNumber.Add (this.step); status.Add (progressTextBase); } Device.BeginInvokeOnMainThread (() => { ShowStatus (true); ll.Text = text; ll.TextColor = c; ll1.TextColor = c; ll2.TextColor = c; }); }
public ProcessStep GetStep(ProcessStep netPayApprovalStep, ProcessStep hmrcApprovalStep, ProcessStep fpsApprovalStep) { ProcessStep sendAllDocuments = new ProcessStep( "Send All Documents", new List <MessageType> { MessageType.SendNetPayBacs, MessageType.SendHmrcBacs, MessageType.SendFps, MessageType.SendEps, MessageType.SendLedger }, new List <MessageType>(), new ProcessStepDependencies { RequiredSteps = new List <ProcessStep> { netPayApprovalStep, hmrcApprovalStep, fpsApprovalStep } }); return(sendAllDocuments); }
private void add_step_Click(object sender, EventArgs e) { if ((ElementName != null && Type != null && Program != null && Window != null)) { string Name = this.textBoxName.Text; string Description = this.textBoxDescription.Text; int Step = ProcessStepList.Count + 1; ProcessStep ProcessStep = new ProcessStep(Name, Description, Step, ElementName, Type, Program, Window, Parent); ProcessStepList.Add(ProcessStep); FillListBoxProcessStep(); this.textBoxName.Text = ""; this.textBoxDescription.Text = ""; ElementName = null; Type = null; Program = null; Window = null; } else { MessageBox.Show("Bitte wählen Sie das GUI-Element mit \"Mouse-Hover + STRG\" aus. Sie können dann den Namen ändern!!!"); this.textBoxName.Text = ""; } }
private ProcessStep GetNextStep(int prevStepId, int processId) { ProcessStep result = new ProcessStep(); IEnumerable <ProcessStep> lstResult = new List <ProcessStep>(); ProcessStep currentStep = _stepRepository.GetSingleById(prevStepId); if (currentStep != null) { lstResult = _stepRepository.GetMulti(x => x.ProcessId == processId && x.SortOrder > currentStep.SortOrder).ToList(); } if (lstResult != null && lstResult.Count() != 0) { lstResult.OrderBy(x => x.SortOrder); result = lstResult.First(); } else { result = null; } return(result); }
public ProcessTask(string filePath) { isRunning = true; errorWhileProcessing = false; currentPath = Path.GetDirectoryName(filePath); HourValue = DateTime.Now.ToString("hh:mm:ss:ff"); NewDir = ""; //MC larch... currentStep = ProcessStep.step1; objFile = new ProcessFile(filePath); runTask(currentStep); }
public BlockStatement Process(DecompilationContext context, BlockStatement body) { this.methodContext = context.MethodContext; this.processStep = ProcessStep.Search; Visit(body); RemoveNonConditionVariables(); if (variables.Count > 0) { ReplaceConditionOnlyVariables(body); } this.methodContext = null; this.currentVariable = null; variables.Clear(); return body; }
public bool runTask(ProcessStep currentStep) { System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument(); // while (isRunning) // { try { // switch (currentStep) // { // case ProcessStep.step1: ClientSettingsSection config = (ClientSettingsSection)ConfigurationManager.GetSection("applicationSettings/ZipformSimply.ProcessSteps"); if (config != null) { LogFile.writeToLog("Processing Started...."); // Loop through processing steps... foreach (System.Configuration.SettingElement entry in config.Settings) { //TODO: throw custom error // while (!errorWhileProcessing) // { LogFile.writeToLog(String.Format("**** Processing: {0} ", entry.Name)); xmlDoc.LoadXml(String.Format("<root>{0}</root>", entry.Value.ValueXml.InnerXml)); foreach (XmlElement node in xmlDoc.ChildNodes) { foreach (XmlElement step in node.ChildNodes) { string childFilePath = step.FirstChild.InnerText.Trim(); switch (step.Name) { case "goToDirectory": gotoDirectory(childFilePath); LogFile.writeToLog(String.Format("SET current directory to:{0} ", childFilePath)); break; case "deleteFiles": LogFile.writeToLog(String.Format("DELETE files matching: {0} ", childFilePath)); deleteFiles(step); break; case "copyFiles": LogFile.writeToLog(String.Format("COPY files matching: {0} ", childFilePath)); copyFiles(step); break; case "runBatchFile": LogFile.writeToLog(String.Format("RUN Batch file with name {0} ", childFilePath)); runBatchFile(step); break; case "writeToLog": string strMessage = childFilePath; strMessage = strMessage.Replace("%time%", DateTime.Now.ToString(TIME_FORMAT)); strMessage = strMessage.Replace("%date%", DateTime.Now.ToString(DATE_FORMAT)); LogFile.writeToLog(strMessage); LogFile.writeToLog(" ----->>"); break; default: //NOT defined LogFile.writeToLog(String.Format("appConfig step: {0} is not formatted correctly, step ignored ", step.Name),LogFile.ReportingAction.warning); break; } } } // }//whileNoError }//for steps LogFile.writeToLog(String.Format("COMPLETED all steps")); } //not null return false; // break; // }//switch } catch (ProcessingException ex) { LogFile.writeToLog(" --- TERMINATING PROCESS JOB --- "); //TODO email log } // isRunning = false; return false; //TESTING // }//while //TODO: total process time return true; }
private void ReplaceConditionOnlyVariables(BlockStatement body) { this.processStep = ProcessStep.Replace; Visit(body); this.processStep = ProcessStep.Search; variables.Clear(); }