61 lines
2.4 KiB
C#
61 lines
2.4 KiB
C#
using System;
|
|
using System.Windows.Forms;
|
|
using NHibernate;
|
|
using SharedDatabase;
|
|
using SharedDatabase.Entities;
|
|
|
|
namespace WorkflowConfigurator.Forms
|
|
{
|
|
public partial class WorkflowAnalysisDlg : Form
|
|
{
|
|
readonly ISession session;
|
|
readonly Process process;
|
|
|
|
public WorkflowAnalysisDlg()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public WorkflowAnalysisDlg(ISession session, Process process)
|
|
: this()
|
|
{
|
|
this.session = session;
|
|
this.process = process;
|
|
}
|
|
|
|
private void ProcessAnalysisDlg_Load(object sender, EventArgs e)
|
|
{
|
|
if (session == null || process == null) return;
|
|
|
|
for (int i = 1; i < process.Worksteps.Count; i++)
|
|
{
|
|
Workstep ws = process.Worksteps[i];
|
|
ScanVerificationInfo svi = TracingDB.AnalyzeProcess(session, process, ws);
|
|
if (svi != null)
|
|
{
|
|
if (svi.VerifyReferencePart)
|
|
{
|
|
textBox1.Text += string.Format("{0} ---> {1} / {2} ({3}){4}", ws.Name,
|
|
svi.Workstep.Name,
|
|
svi.Workstep.ReferencePart.Name,
|
|
svi.Workstep.ReferencePart.Description,
|
|
Environment.NewLine);
|
|
}
|
|
else
|
|
{
|
|
textBox1.Text += string.Format("{0} ---> {1} / {2} ({3}){4}", ws.Name,
|
|
svi.Workstep.Name,
|
|
svi.Part.Name,
|
|
svi.Part.Description,
|
|
Environment.NewLine);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
textBox1.Text += string.Format("{0} ---> no checked part !!!{1}", ws.Name, Environment.NewLine);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|