UI.Procedures.ProceduresCtrl can display procedure properties of Sensus-Oracle-DB component.

This commit is contained in:
Milan Hanajik 2021-04-08 11:55:45 +02:00
parent ae18e15fba
commit d8fc4a4c36

View File

@ -983,6 +983,9 @@ namespace TBF.UI.Procedures
Tests,
Writers,
Printers,
#if ORACLE_DB
Oracle,
#endif
Count
}
MoreContent moreContent;
@ -1009,6 +1012,11 @@ namespace TBF.UI.Procedures
case MoreContent.Printers:
listViewEx.Columns[(int)Column.More].Text = "Printers";
break;
#if ORACLE_DB
case MoreContent.Oracle:
listViewEx.Columns[(int)Column.More].Text = "Oracle";
break;
#endif
default:
listViewEx.Columns[(int)Column.More].Text = string.Empty;
break;
@ -1070,6 +1078,33 @@ namespace TBF.UI.Procedures
foreach (var p in printers) { sb.Append(p); sb.Append(" "); }
}
break;
#if ORACLE_DB
case MoreContent.Oracle:
if (!string.IsNullOrEmpty(procedure.ResultsWriter) && procedure.ResultsWriter.Contains("Sensus-Oracle-DB"))
{
var procParamsEntity = session.QueryOver<ComponentProcedure>()
.Where(x => x.Procedure == procedure)
.And(x => x.CmpntName == "Sensus-Oracle-DB")
.List();
if (procParamsEntity.Count == 1)
{
var pp = new TBF.BenchControl.Output.DB.SensusOracle.ProcedureParams();
pp.UpdateFromDbEntity(procParamsEntity[0]);
sb.AppendFormat("{0} ", pp.WMKind);
sb.AppendFormat("Id = {0} ", pp.WMTypeId);
sb.AppendFormat("Yr = {0} ", pp.YearOfManufacture);
sb.AppendFormat("Save results = {0} ", pp.SaveResults);
sb.AppendFormat("Read start info = {0} ", pp.ReadStartInfo);
sb.AppendFormat("Start info is required = {0} ", pp.StartInfoIsRequired);
sb.AppendFormat("Designation mode = {0}", pp.DesigMode);
if (pp.DesigMode == TBF.BenchControl.Output.DB.SensusOracle.DesigMode.As_specified)
{
sb.AppendFormat(" Designation type = {0}", pp.DesigType);
}
}
}
break;
#endif
}
return sb.ToString();
}