DataEntry.iPerl loads purchase order data from Oracle (if configured to do so).
This commit is contained in:
parent
9aa41338ed
commit
f3a889eed8
@ -1,11 +1,14 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Common;
|
||||
using TBF.BenchControl.Sequences;
|
||||
using TBF.BenchControl.Output.DB.SensusOracle;
|
||||
using TBF.Resources;
|
||||
using System.Drawing;
|
||||
|
||||
@ -18,6 +21,10 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
/// <summary> Number of water meters </summary>
|
||||
public readonly int WaterMetersCount;
|
||||
public readonly bool reversedDirection;
|
||||
readonly EntryFormCfg cfg;
|
||||
|
||||
/// Loaded from database beforethe form is open
|
||||
IList<OrderDetails> listOfOrders;
|
||||
|
||||
/// To be retrieved after the form is closed
|
||||
public string PurchaseOrder;
|
||||
@ -44,11 +51,11 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleBeginningForm(int waterMetersCount, bool reversedDirection)
|
||||
public CycleBeginningForm(int waterMetersCount, EntryFormCfg cfg)
|
||||
: this()
|
||||
{
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.reversedDirection = reversedDirection;
|
||||
this.cfg = cfg;
|
||||
SNText = null;
|
||||
Disabled = null;
|
||||
}
|
||||
@ -58,21 +65,100 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
{
|
||||
Text = Strings.Data;
|
||||
orderGroupBox.Text = Strings.Purchase_order;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
PrepareOrderCombo(orderComboBox);
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
|
||||
listOfOrders = ((cfg.Orders == Orders.FromOracle || cfg.Orders == Orders.CombinedAndFromOracle) && ProcessData.OracleDB != null)
|
||||
? ProcessData.OracleDB.ReadOrderNumbers()
|
||||
: new List<OrderDetails>();
|
||||
|
||||
string insertFirst = null;
|
||||
if (Program.LocalSettings.PurchaseOrderHistoryCount > 0)
|
||||
{
|
||||
foreach (var o in listOfOrders)
|
||||
{
|
||||
if (o.AuftragsNummer == Program.LocalSettings.PurchaseOrderHistory[0])
|
||||
{
|
||||
insertFirst = o.AuftragsNummer;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (cfg.Orders)
|
||||
{
|
||||
case Orders.Arbitrary:
|
||||
PrepareOrderCombo(orderComboBox);
|
||||
break;
|
||||
|
||||
case Orders.FromOracle:
|
||||
if (insertFirst != null)
|
||||
{
|
||||
orderComboBox.Items.Add(insertFirst);
|
||||
orderComboBox.Text = insertFirst;
|
||||
}
|
||||
|
||||
foreach (var o in listOfOrders)
|
||||
if (o.AuftragsNummer != insertFirst)
|
||||
orderComboBox.Items.Add(o.AuftragsNummer);
|
||||
break;
|
||||
|
||||
case Orders.CombinedAndFromOracle:
|
||||
if (insertFirst != null)
|
||||
{
|
||||
orderComboBox.Items.Add(insertFirst);
|
||||
orderComboBox.Text = insertFirst;
|
||||
}
|
||||
orderComboBox.Items.Add("BBAAMMXX");
|
||||
orderComboBox.Items.Add("BBAAOMXX");
|
||||
orderComboBox.Items.Add("BBAAQMXX");
|
||||
orderComboBox.Items.Add("BBAATMFR");
|
||||
orderComboBox.Items.Add("BBAATMXX");
|
||||
orderComboBox.Items.Add("CCAAMMXX");
|
||||
orderComboBox.Items.Add("CCAAOMXX");
|
||||
orderComboBox.Items.Add("CCAAQMXX");
|
||||
orderComboBox.Items.Add("CCAATMFR");
|
||||
orderComboBox.Items.Add("CCAATMXX");
|
||||
orderComboBox.Items.Add("DDAAMMXX");
|
||||
orderComboBox.Items.Add("DDAAOMXX");
|
||||
orderComboBox.Items.Add("DDAAQMXX");
|
||||
orderComboBox.Items.Add("DDAATMXX");
|
||||
orderComboBox.Items.Add("DEAAMMXX");
|
||||
orderComboBox.Items.Add("DEAAOMXX");
|
||||
orderComboBox.Items.Add("DEAAQMXX");
|
||||
orderComboBox.Items.Add("DEAATMXX");
|
||||
orderComboBox.Items.Add("EEAAMMXX");
|
||||
orderComboBox.Items.Add("EEAAOMXX");
|
||||
orderComboBox.Items.Add("EEAAQMXX");
|
||||
orderComboBox.Items.Add("EEAATMFR");
|
||||
orderComboBox.Items.Add("EEAATMXX");
|
||||
orderComboBox.Items.Add("FFAAMMXX");
|
||||
orderComboBox.Items.Add("FFAAOMXX");
|
||||
orderComboBox.Items.Add("FFAAQMXX");
|
||||
orderComboBox.Items.Add("FFAATMFR");
|
||||
orderComboBox.Items.Add("FFAATMXX");
|
||||
orderComboBox.Items.Add("GFAAMMXX");
|
||||
orderComboBox.Items.Add("GFAAOMXX");
|
||||
orderComboBox.Items.Add("GFAAQMXX");
|
||||
orderComboBox.Items.Add("GFAATMXX");
|
||||
|
||||
foreach (var o in listOfOrders)
|
||||
if (o.AuftragsNummer != insertFirst)
|
||||
orderComboBox.Items.Add(o.AuftragsNummer);
|
||||
break;
|
||||
}
|
||||
|
||||
///
|
||||
/// Draw an appropriate test bench picture
|
||||
///
|
||||
Side side = (TBF.BenchControl.Sequences.ProcessData.BenchInfo is DataContainers.BenchInfo.iPerl.Component)
|
||||
? (TBF.BenchControl.Sequences.ProcessData.BenchInfo as DataContainers.BenchInfo.iPerl.Component).Side
|
||||
: Side.Left;
|
||||
if (reversedDirection && (side == Side.Left))
|
||||
Side side = (ProcessData.BenchInfo is DataContainers.BenchInfo.iPerl.Component)
|
||||
? (ProcessData.BenchInfo as DataContainers.BenchInfo.iPerl.Component).Side
|
||||
: Side.Left;
|
||||
if ((cfg.Direction == Direction.Reversed_LR) && (side == Side.Left))
|
||||
{
|
||||
/// direction L->R (reversed), left side
|
||||
pictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\reversed_dir_left.jpg", Program.ExecutableDir, true));
|
||||
}
|
||||
else if (reversedDirection && (side == Side.Right))
|
||||
else if ((cfg.Direction == Direction.Reversed_LR) && (side == Side.Right))
|
||||
{
|
||||
/// direction L->R (reversed), right side
|
||||
pictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\reversed_dir_right.jpg", Program.ExecutableDir, true));
|
||||
@ -106,24 +192,23 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (orderComboBox.Text.Length > 8)
|
||||
if (orderComboBox.Text.Length > 8 ||
|
||||
(cfg.Orders != Orders.Arbitrary && !orderComboBox.Items.Contains(orderComboBox.Text)))
|
||||
{
|
||||
MessageBox.Show(string.Format(Strings.Purchase_order_may_have_max_N_characters, 8),
|
||||
Strings.Error,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBox.Show(Strings.Invalid_order_number, Strings.Error, MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text, ref Program.LocalSettings.PurchaseOrderHistory);
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
ProcessData.OrderDetails = (listOfOrders == null) ? null : listOfOrders.FirstOrDefault<OrderDetails>(x => x.AuftragsNummer == orderComboBox.Text);
|
||||
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text, ref Program.LocalSettings.PurchaseOrderHistory);
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
///
|
||||
void OpenBeginningDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm(TBF.Data.WMsCount, myRef.entryFormCfg.ReversedDirection);
|
||||
myRef.modelessDlg = new CycleBeginningForm(TBF.Data.WMsCount, myRef.entryFormCfg);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
|
||||
@ -3,41 +3,190 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Resources;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.iPerl
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
public enum Direction
|
||||
{
|
||||
#if LANG_SK
|
||||
[Description("iPERL normálne (R-L)")] Forward_RL,
|
||||
[Description("iPERL opačne (L-R)")] Reversed_LR,
|
||||
[Description("640")] S640,
|
||||
#elif LANG_DE
|
||||
[Description("iPERL Forward (R-L)")] Forward_RL,
|
||||
[Description("iPERL Reversed (L-R)")] Reversed_LR,
|
||||
[Description("640")] S640,
|
||||
#else
|
||||
[Description("iPERL Forward (R-L)")] Forward_RL,
|
||||
[Description("iPERL Reversed (L-R)")] Reversed_LR,
|
||||
[Description("640")] S640,
|
||||
#endif
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum Orders
|
||||
{
|
||||
#if LANG_SK
|
||||
[Description("Ľubovolné")] Arbitrary,
|
||||
[Description("Aktívne z Oracle")] FromOracle,
|
||||
[Description("Združené a aktívne z Oracle")] CombinedAndFromOracle,
|
||||
#elif LANG_DE
|
||||
[Description("Arbitrary")] Arbitrary,
|
||||
[Description("Active from Oracle")] FromOracle,
|
||||
[Description("Combined and active from Oracle")] CombinedAndFromOracle,
|
||||
#else
|
||||
[Description("Arbitrary")] Arbitrary,
|
||||
[Description("Active from Oracle")] FromOracle,
|
||||
[Description("Combined and active from Oracle")] CombinedAndFromOracle,
|
||||
#endif
|
||||
Count,
|
||||
}
|
||||
|
||||
public class EntryFormCfg : ComponentCfgBase, IComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new EntryFormCfgCtrl(); }
|
||||
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities)
|
||||
{
|
||||
return new Configs.ParamsProvider.ComponentCfgCtrl(this, null);
|
||||
}
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public bool ReversedDirection;
|
||||
public Direction Direction;
|
||||
public Orders Orders;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EntryFormCfg()
|
||||
{
|
||||
Name = "DataEntry-iPerl";
|
||||
ParentName = string.Empty;
|
||||
ReversedDirection = false;
|
||||
}
|
||||
EntryFormCfg() { }
|
||||
|
||||
public EntryFormCfg(IComponentFactory factory)
|
||||
public EntryFormCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
InitializeAll();
|
||||
}
|
||||
|
||||
public string ComponentName { get { return Name; } }
|
||||
|
||||
public void InitializeAll()
|
||||
{
|
||||
Direction = Direction.Forward_RL;
|
||||
Orders = Orders.Arbitrary;
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
Strings.Direction,
|
||||
Strings.Orders,
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
|
||||
public ICollection<string> ParamValues(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
return new string[]
|
||||
{
|
||||
Direction.Forward_RL.ToDescription(),
|
||||
Direction.Reversed_LR.ToDescription(),
|
||||
Direction.S640.ToDescription(),
|
||||
};
|
||||
case 1:
|
||||
return new string[]
|
||||
{
|
||||
Orders.Arbitrary.ToDescription(),
|
||||
Orders.FromOracle.ToDescription(),
|
||||
Orders.CombinedAndFromOracle.ToDescription(),
|
||||
};
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, ReversedDir={1}", Name, ReversedDirection);
|
||||
switch (i)
|
||||
{
|
||||
case 0: return Direction.ToDescription();
|
||||
case 1: return Orders.ToDescription();
|
||||
default:
|
||||
return string.Format("Name={0}, Direction={1}, Orders={2}", Name, Direction, Orders);
|
||||
}
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateParam(int i, string str)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
for (Direction d = 0; d < Direction.Count; d++)
|
||||
if (d.ToDescription() == str)
|
||||
{
|
||||
Direction = d;
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
for (Orders o = 0; o < Orders.Count; o++)
|
||||
if (o.ToDescription() == str)
|
||||
{
|
||||
Orders = o;
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return CfgUpdateFlags.None;
|
||||
}
|
||||
|
||||
public bool ValidateParam(int i, string str, out string message)
|
||||
{
|
||||
message = string.Empty;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
if (ParamValues(i).Contains(str)) return true;
|
||||
break;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
}
|
||||
|
||||
message = ParamName(i) + " is invalid";
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(EntryFormCfg prms)
|
||||
{
|
||||
prms.Direction = this.Direction;
|
||||
prms.Orders = this.Orders;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
EntryFormCfg pars = new EntryFormCfg();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public bool UpdateEmbeddedDbEntity()
|
||||
{
|
||||
return true; /// =OK, do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,79 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.iPerl
|
||||
{
|
||||
public partial class EntryFormCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EntryFormCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as EntryFormCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public EntryFormCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
Redraw();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
reversedIperlDirectionCheckBox.Checked = config.ReversedDirection;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
reversedIperlDirectionCheckBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
config.ReversedDirection = reversedIperlDirectionCheckBox.Checked;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,100 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.BenchControl.DataEntry.iPerl
|
||||
{
|
||||
partial class EntryFormCfgCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.reversedIperlDirectionCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(131, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(32, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(128, 32);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// reversedIperlDirectionCheckBox
|
||||
//
|
||||
this.reversedIperlDirectionCheckBox.AutoSize = true;
|
||||
this.reversedIperlDirectionCheckBox.Enabled = false;
|
||||
this.reversedIperlDirectionCheckBox.Location = new System.Drawing.Point(131, 91);
|
||||
this.reversedIperlDirectionCheckBox.Name = "reversedIperlDirectionCheckBox";
|
||||
this.reversedIperlDirectionCheckBox.Size = new System.Drawing.Size(158, 17);
|
||||
this.reversedIperlDirectionCheckBox.TabIndex = 14;
|
||||
this.reversedIperlDirectionCheckBox.Text = "Reversed direction of iPerl-s";
|
||||
this.reversedIperlDirectionCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EntryFormCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.reversedIperlDirectionCheckBox);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "EntryFormCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.CheckBox reversedIperlDirectionCheckBox;
|
||||
}
|
||||
}
|
||||
@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2021 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
@ -14,7 +14,7 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg("DataEntry-iPerl", this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
|
||||
@ -1432,12 +1432,12 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
/// </summary>
|
||||
/// <param name="connection">Oracle DB connection</param>
|
||||
/// <returns>List of active purchase orders</returns>
|
||||
public IList<Auftrag> ReadOrderNumbers()
|
||||
public IList<OrderDetails> ReadOrderNumbers()
|
||||
{
|
||||
OracleConnection connection = ProductionDB;
|
||||
|
||||
/// Read a list of valid order numbers from Oracle
|
||||
IList<Auftrag> orders = new List<Auftrag>();
|
||||
IList<OrderDetails> orders = new List<OrderDetails>();
|
||||
|
||||
if (dbCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
@ -1474,7 +1474,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
catch { dueDate = DateTime.Now; }
|
||||
//string remark; try { remark = dr.GetString (9); } catch { remark = string.Empty; }
|
||||
|
||||
var ai = new Auftrag
|
||||
var ai = new OrderDetails
|
||||
{
|
||||
AuftragsNummer = order,
|
||||
SollStueck = sollStueck,
|
||||
@ -1521,7 +1521,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
catch { dueDate = DateTime.Now; }
|
||||
//string remark; try { remark = dr.GetString (9); } catch { remark = string.Empty; }
|
||||
|
||||
var ai = new Auftrag
|
||||
var ai = new OrderDetails
|
||||
{
|
||||
AuftragsNummer = order,
|
||||
SollStueck = sollStueck,
|
||||
@ -1550,10 +1550,10 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
}
|
||||
else
|
||||
{
|
||||
orders = new List<Auftrag> ()
|
||||
orders = new List<OrderDetails> ()
|
||||
{
|
||||
new Auftrag { AuftragsNummer = "1234567", EsrsteZaehlerNr = 1, SollStueck = 100, Prefix = "Pre", Suffix = "Suf", VariantenCode = "abeceda" },
|
||||
new Auftrag { AuftragsNummer = "2345678", EsrsteZaehlerNr = 1, SollStueck = 200, Prefix = "Pfx", Suffix = "Sfx", VariantenCode = "zjedla_deda" },
|
||||
new OrderDetails { AuftragsNummer = "1234567", EsrsteZaehlerNr = 1, SollStueck = 100, Prefix = "Pre", Suffix = "Suf", VariantenCode = "abeceda" },
|
||||
new OrderDetails { AuftragsNummer = "2345678", EsrsteZaehlerNr = 1, SollStueck = 200, Prefix = "Pfx", Suffix = "Sfx", VariantenCode = "zjedla_deda" },
|
||||
};
|
||||
}
|
||||
|
||||
@ -1566,7 +1566,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
/// </summary>
|
||||
/// <param name="connection">Oracle DB connection</param>
|
||||
/// <returns>List of active purchase orders</returns>
|
||||
public bool ReadOrderDetails(ref Auftrag auftrag)
|
||||
public bool ReadOrderDetails(ref OrderDetails auftrag)
|
||||
{
|
||||
if (dbCfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
|
||||
@ -5,7 +5,7 @@ using System;
|
||||
|
||||
namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
{
|
||||
public class Auftrag
|
||||
public class OrderDetails
|
||||
{
|
||||
public string AuftragsNummer; /// Production order
|
||||
public int SollStueck; /// Targer pieces count
|
||||
@ -26,7 +26,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
public string RadioAddressSuffix;
|
||||
public int CurrentRadioAddress;
|
||||
|
||||
public Auftrag()
|
||||
public OrderDetails()
|
||||
{
|
||||
Prefix = string.Empty;
|
||||
Suffix = string.Empty;
|
||||
@ -19,6 +19,7 @@ namespace TBF.BenchControl.Sequences
|
||||
public static IErrorFlags ErrorFlagsComp;
|
||||
public static IStatisticsMonitoring StatisticsMonitoringComp;
|
||||
public static Output.DB.SensusOracle.Database OracleDB;
|
||||
public static Output.DB.SensusOracle.OrderDetails OrderDetails;
|
||||
public static Output.DB.ProductionTracing.Tracing TracingDB;
|
||||
|
||||
///
|
||||
|
||||
27
TBF/Resources/Strings.Designer.cs
generated
27
TBF/Resources/Strings.Designer.cs
generated
@ -1320,6 +1320,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Direction.
|
||||
/// </summary>
|
||||
internal static string Direction {
|
||||
get {
|
||||
return ResourceManager.GetString("Direction", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Direction and pulses are OK.
|
||||
/// </summary>
|
||||
@ -2427,6 +2436,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid order number.
|
||||
/// </summary>
|
||||
internal static string Invalid_order_number {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_order_number", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid password.
|
||||
/// </summary>
|
||||
@ -3372,6 +3390,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Orders.
|
||||
/// </summary>
|
||||
internal static string Orders {
|
||||
get {
|
||||
return ResourceManager.GetString("Orders", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Other.
|
||||
/// </summary>
|
||||
|
||||
@ -1653,4 +1653,13 @@
|
||||
<data name="Writing_to_the_production_tracing_DB_failed" xml:space="preserve">
|
||||
<value>Zápis do databáze sledování výroby zlyhalo</value>
|
||||
</data>
|
||||
<data name="Direction" xml:space="preserve">
|
||||
<value>Směr</value>
|
||||
</data>
|
||||
<data name="Orders" xml:space="preserve">
|
||||
<value>Zakázky</value>
|
||||
</data>
|
||||
<data name="Invalid_order_number" xml:space="preserve">
|
||||
<value>Neplatné číslo zakázky</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -2199,4 +2199,7 @@
|
||||
<data name="Program_version_does_not_match" xml:space="preserve">
|
||||
<value>Programmversion passt nicht.</value>
|
||||
</data>
|
||||
<data name="Invalid_order_number" xml:space="preserve">
|
||||
<value>Auftragsnummer ist ungültig</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -2287,4 +2287,13 @@
|
||||
<data name="Opto_head_is_disabled_in_configuration" xml:space="preserve">
|
||||
<value>Disabled in configuration</value>
|
||||
</data>
|
||||
<data name="Direction" xml:space="preserve">
|
||||
<value>Direction</value>
|
||||
</data>
|
||||
<data name="Orders" xml:space="preserve">
|
||||
<value>Orders</value>
|
||||
</data>
|
||||
<data name="Invalid_order_number" xml:space="preserve">
|
||||
<value>Invalid order number</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -198,4 +198,10 @@
|
||||
<data name="Event_triggers" xml:space="preserve">
|
||||
<value>Spúšťače udalostí</value>
|
||||
</data>
|
||||
<data name="Direction" xml:space="preserve">
|
||||
<value>Smer</value>
|
||||
</data>
|
||||
<data name="Orders" xml:space="preserve">
|
||||
<value>Zákazky</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -332,12 +332,6 @@
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\DataEntry\iPerl\EntryForm.cs" />
|
||||
<Compile Include="BenchControl\DataEntry\iPerl\EntryFormCfg.cs" />
|
||||
<Compile Include="BenchControl\DataEntry\iPerl\EntryFormCfgCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\DataEntry\iPerl\EntryFormCfgCtrl.designer.cs">
|
||||
<DependentUpon>EntryFormCfgCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\DataEntry\iPerl\Factory.cs" />
|
||||
<Compile Include="BenchControl\DataEntry\iPerl\TestStartEndForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
@ -1032,7 +1026,7 @@
|
||||
<Compile Include="BenchControl\Output\DB\SaveFlowmeterCorrections\SaveFlowmeterCorrCfgCtrl.designer.cs">
|
||||
<DependentUpon>SaveFlowmeterCorrCfgCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\Output\DB\SensusOracle\Auftrag.cs" />
|
||||
<Compile Include="BenchControl\Output\DB\SensusOracle\OrderDetails.cs" />
|
||||
<Compile Include="BenchControl\Output\DB\SensusOracle\Database.cs" />
|
||||
<Compile Include="BenchControl\Output\DB\SensusOracle\DatabaseCfg.cs" />
|
||||
<Compile Include="BenchControl\Output\DB\SensusOracle\Factory.cs" />
|
||||
@ -2829,9 +2823,6 @@
|
||||
<EmbeddedResource Include="BenchControl\DataEntry\iPerl\CycleBeginningForm.ru.resx">
|
||||
<DependentUpon>CycleBeginningForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="BenchControl\DataEntry\iPerl\EntryFormCfgCtrl.resx">
|
||||
<DependentUpon>EntryFormCfgCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="BenchControl\DataEntry\iPerl\TestStartEndForm.resx">
|
||||
<DependentUpon>TestStartEndForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user