diff --git a/TBF/BenchControl/DataEntry/iPerl/CycleBeginningForm.cs b/TBF/BenchControl/DataEntry/iPerl/CycleBeginningForm.cs
index bdc3f24be..01e4cce7b 100644
--- a/TBF/BenchControl/DataEntry/iPerl/CycleBeginningForm.cs
+++ b/TBF/BenchControl/DataEntry/iPerl/CycleBeginningForm.cs
@@ -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
/// Number of water meters
public readonly int WaterMetersCount;
public readonly bool reversedDirection;
+ readonly EntryFormCfg cfg;
+
+ /// Loaded from database beforethe form is open
+ IList listOfOrders;
/// To be retrieved after the form is closed
public string PurchaseOrder;
@@ -44,11 +51,11 @@ namespace TBF.BenchControl.DataEntry.iPerl
/// Constructor
///
/// Number of text boxes for serial numbers
- 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();
+
+ 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(x => x.AuftragsNummer == orderComboBox.Text);
+
+ PurchaseOrder = orderComboBox.Text;
+ Program.LocalSettings.UpdateHistory(orderComboBox.Text, ref Program.LocalSettings.PurchaseOrderHistory);
+
+ completed = true;
+ Close();
}
diff --git a/TBF/BenchControl/DataEntry/iPerl/EntryForm.cs b/TBF/BenchControl/DataEntry/iPerl/EntryForm.cs
index 7afbe3b36..4bc4720fa 100644
--- a/TBF/BenchControl/DataEntry/iPerl/EntryForm.cs
+++ b/TBF/BenchControl/DataEntry/iPerl/EntryForm.cs
@@ -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();
}
///
diff --git a/TBF/BenchControl/DataEntry/iPerl/EntryFormCfg.cs b/TBF/BenchControl/DataEntry/iPerl/EntryFormCfg.cs
index 7219cd38b..79b149c11 100644
--- a/TBF/BenchControl/DataEntry/iPerl/EntryFormCfg.cs
+++ b/TBF/BenchControl/DataEntry/iPerl/EntryFormCfg.cs
@@ -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 cmpntEntities) { return new EntryFormCfgCtrl(); }
+ public IComponentCfgCtrl GetControl(IList 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 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
}
}
}
diff --git a/TBF/BenchControl/DataEntry/iPerl/EntryFormCfgCtrl.cs b/TBF/BenchControl/DataEntry/iPerl/EntryFormCfgCtrl.cs
deleted file mode 100644
index 16bdf5118..000000000
--- a/TBF/BenchControl/DataEntry/iPerl/EntryFormCfgCtrl.cs
+++ /dev/null
@@ -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;
- }
- }
-}
diff --git a/TBF/BenchControl/DataEntry/iPerl/EntryFormCfgCtrl.designer.cs b/TBF/BenchControl/DataEntry/iPerl/EntryFormCfgCtrl.designer.cs
deleted file mode 100644
index 54edd1cd1..000000000
--- a/TBF/BenchControl/DataEntry/iPerl/EntryFormCfgCtrl.designer.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-///
-/// Copyright (c) 2015 Sensus Metering Systems
-///
-namespace TBF.BenchControl.DataEntry.iPerl
-{
- partial class EntryFormCfgCtrl
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Component Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- 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;
- }
-}
diff --git a/TBF/BenchControl/DataEntry/iPerl/EntryFormCfgCtrl.resx b/TBF/BenchControl/DataEntry/iPerl/EntryFormCfgCtrl.resx
deleted file mode 100644
index 1af7de150..000000000
--- a/TBF/BenchControl/DataEntry/iPerl/EntryFormCfgCtrl.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/TBF/BenchControl/DataEntry/iPerl/Factory.cs b/TBF/BenchControl/DataEntry/iPerl/Factory.cs
index df82db8ad..ceec3fffb 100644
--- a/TBF/BenchControl/DataEntry/iPerl/Factory.cs
+++ b/TBF/BenchControl/DataEntry/iPerl/Factory.cs
@@ -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 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)
{
diff --git a/TBF/BenchControl/Output/DB/SensusOracle/Database.cs b/TBF/BenchControl/Output/DB/SensusOracle/Database.cs
index 7a2be571a..3e2a16894 100644
--- a/TBF/BenchControl/Output/DB/SensusOracle/Database.cs
+++ b/TBF/BenchControl/Output/DB/SensusOracle/Database.cs
@@ -1432,12 +1432,12 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
///
/// Oracle DB connection
/// List of active purchase orders
- public IList ReadOrderNumbers()
+ public IList ReadOrderNumbers()
{
OracleConnection connection = ProductionDB;
/// Read a list of valid order numbers from Oracle
- IList orders = new List();
+ IList orders = new List();
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 ()
+ orders = new List ()
{
- 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
///
/// Oracle DB connection
/// List of active purchase orders
- public bool ReadOrderDetails(ref Auftrag auftrag)
+ public bool ReadOrderDetails(ref OrderDetails auftrag)
{
if (dbCfg.DebugLevel == DebugMode.Normal)
{
diff --git a/TBF/BenchControl/Output/DB/SensusOracle/Auftrag.cs b/TBF/BenchControl/Output/DB/SensusOracle/OrderDetails.cs
similarity index 95%
rename from TBF/BenchControl/Output/DB/SensusOracle/Auftrag.cs
rename to TBF/BenchControl/Output/DB/SensusOracle/OrderDetails.cs
index 10a479f01..bf1993e07 100644
--- a/TBF/BenchControl/Output/DB/SensusOracle/Auftrag.cs
+++ b/TBF/BenchControl/Output/DB/SensusOracle/OrderDetails.cs
@@ -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;
diff --git a/TBF/BenchControl/Sequences/ProcessData.cs b/TBF/BenchControl/Sequences/ProcessData.cs
index 169eddcaf..16492ab9c 100644
--- a/TBF/BenchControl/Sequences/ProcessData.cs
+++ b/TBF/BenchControl/Sequences/ProcessData.cs
@@ -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;
///
diff --git a/TBF/Resources/Strings.Designer.cs b/TBF/Resources/Strings.Designer.cs
index c994125dc..ba51ebd4e 100644
--- a/TBF/Resources/Strings.Designer.cs
+++ b/TBF/Resources/Strings.Designer.cs
@@ -1320,6 +1320,15 @@ namespace TBF.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Direction.
+ ///
+ internal static string Direction {
+ get {
+ return ResourceManager.GetString("Direction", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Direction and pulses are OK.
///
@@ -2427,6 +2436,15 @@ namespace TBF.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Invalid order number.
+ ///
+ internal static string Invalid_order_number {
+ get {
+ return ResourceManager.GetString("Invalid_order_number", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Invalid password.
///
@@ -3372,6 +3390,15 @@ namespace TBF.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Orders.
+ ///
+ internal static string Orders {
+ get {
+ return ResourceManager.GetString("Orders", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Other.
///
diff --git a/TBF/Resources/Strings.cs.resx b/TBF/Resources/Strings.cs.resx
index 524dbd952..70b0541bf 100644
--- a/TBF/Resources/Strings.cs.resx
+++ b/TBF/Resources/Strings.cs.resx
@@ -1653,4 +1653,13 @@
Zápis do databáze sledování výroby zlyhalo
+
+ Směr
+
+
+ Zakázky
+
+
+ Neplatné číslo zakázky
+
\ No newline at end of file
diff --git a/TBF/Resources/Strings.de.resx b/TBF/Resources/Strings.de.resx
index 6fd1da58e..7f614398a 100644
--- a/TBF/Resources/Strings.de.resx
+++ b/TBF/Resources/Strings.de.resx
@@ -2199,4 +2199,7 @@
Programmversion passt nicht.
+
+ Auftragsnummer ist ungültig
+
\ No newline at end of file
diff --git a/TBF/Resources/Strings.resx b/TBF/Resources/Strings.resx
index 344d202ed..29d46aca0 100644
--- a/TBF/Resources/Strings.resx
+++ b/TBF/Resources/Strings.resx
@@ -2287,4 +2287,13 @@
Disabled in configuration
+
+ Direction
+
+
+ Orders
+
+
+ Invalid order number
+
\ No newline at end of file
diff --git a/TBF/Resources/Strings.sk.resx b/TBF/Resources/Strings.sk.resx
index 2faa2e634..66d827d6b 100644
--- a/TBF/Resources/Strings.sk.resx
+++ b/TBF/Resources/Strings.sk.resx
@@ -198,4 +198,10 @@
Spúšťače udalostí
+
+ Smer
+
+
+ Zákazky
+
\ No newline at end of file
diff --git a/TBF/TBF.csproj b/TBF/TBF.csproj
index 6b26d5b73..aaee35fbf 100644
--- a/TBF/TBF.csproj
+++ b/TBF/TBF.csproj
@@ -332,12 +332,6 @@
-
- UserControl
-
-
- EntryFormCfgCtrl.cs
-
Form
@@ -1032,7 +1026,7 @@
SaveFlowmeterCorrCfgCtrl.cs
-
+
@@ -2829,9 +2823,6 @@
CycleBeginningForm.cs
-
- EntryFormCfgCtrl.cs
-
TestStartEndForm.cs