Compare commits
57
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71e18660a1 | ||
|
|
24fed049e2 | ||
|
|
1a8a6defd9 | ||
|
|
9a5f2c1a60 | ||
|
|
ee89158ae3 | ||
|
|
15e9c25dcf | ||
|
|
c826b40e80 | ||
|
|
804cf2aaea | ||
|
|
47511ef873 | ||
|
|
43caffd73d | ||
|
|
0d0355c65a | ||
|
|
dfddc8a980 | ||
|
|
68c3ccbef6 | ||
|
|
ff28d507cf | ||
|
|
2c00ed6dc4 | ||
|
|
cd84c82475 | ||
|
|
e324de985f | ||
|
|
0e45ef6689 | ||
|
|
edc48d8723 | ||
|
|
3630af4a59 | ||
|
|
d1e0d1466d | ||
|
|
bbffc3b406 | ||
|
|
9bc9db1792 | ||
|
|
19c9e3a2da | ||
|
|
9a79ff1344 | ||
|
|
021f17c774 | ||
|
|
513c808f2b | ||
|
|
09a0968b76 | ||
|
|
351157dbba | ||
|
|
0494054171 | ||
|
|
587f6dffd0 | ||
|
|
a35716733d | ||
|
|
44761ff411 | ||
|
|
5f7a80b826 | ||
|
|
99337ba7d9 | ||
|
|
772080ae3b | ||
|
|
9b5ee442a6 | ||
|
|
51b3e994c3 | ||
|
|
335fce3e39 | ||
|
|
44fc7b92fd | ||
|
|
0f5c4b083d | ||
|
|
5996fda348 | ||
|
|
339d79595d | ||
|
|
a2a3d5940e | ||
|
|
62913cf68f | ||
|
|
3b70baeff0 | ||
|
|
bfa69ef611 | ||
|
|
8c7bd51ca8 | ||
|
|
87fa7fb669 | ||
|
|
7205682d75 | ||
|
|
235da5e9e1 | ||
|
|
13b30b2caf | ||
|
|
b5e2a7bdc9 | ||
|
|
078bd8aaf4 | ||
|
|
cef5dc3c10 | ||
|
|
1355777fe0 | ||
|
|
f82da6e4c8 |
+2
-2
@@ -26,8 +26,8 @@ GraphLib/bin
|
||||
GraphLib/obj
|
||||
MergeResultsDBs/bin
|
||||
MergeResultsDBs/obj
|
||||
TracingDB/bin
|
||||
TracingDB/obj
|
||||
OrderManagement/bin
|
||||
OrderManagement/obj
|
||||
ResetBatchNr/bin
|
||||
ResetBatchNr/obj
|
||||
RestClient/bin
|
||||
|
||||
@@ -65,10 +65,14 @@
|
||||
<Compile Include="Formulas.cs" />
|
||||
<Compile Include="GlobalData.cs" />
|
||||
<Compile Include="IMeasurementCorrection.cs" />
|
||||
<Compile Include="IOrderInfo.cs" />
|
||||
<Compile Include="IParamsProvider.cs" />
|
||||
<Compile Include="Iperl\OptoTelegramRaw.cs" />
|
||||
<Compile Include="IUncertainty.cs" />
|
||||
<Compile Include="IUser.cs" />
|
||||
<Compile Include="Printers\PrintersCommon.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProcedureInfo.cs" />
|
||||
<Compile Include="SerializableDictionary.cs" />
|
||||
<Compile Include="Telegram.cs" />
|
||||
|
||||
+4
-6
@@ -70,8 +70,8 @@ namespace Common
|
||||
[Description("None")] None,
|
||||
[Description("Local procedures")] FromLocalDB,
|
||||
[Description("Shared procedures")] FromSharedDB,
|
||||
[Description("Orders from Oracle DB")] OrderNrFromOracleDB,
|
||||
[Description("Orders from Tracing DB")] OrderNrFromTracingDB,
|
||||
[Description("Orders from Oracle DB")] OrderFromOracleDB,
|
||||
[Description("Orders from Tracing DB")] OrderFromTracingDB,
|
||||
#endif
|
||||
Count
|
||||
}
|
||||
@@ -759,10 +759,8 @@ namespace Common
|
||||
[Description("Levá")] Left,
|
||||
[Description("Pravá")] Right,
|
||||
#else
|
||||
[Description("Left")]
|
||||
Left,
|
||||
[Description("Right")]
|
||||
Right,
|
||||
[Description("Left")] Left,
|
||||
[Description("Right")] Right,
|
||||
#endif
|
||||
Count
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Common.Forms
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 msg, IntPtr wParam, ref HDITEM lParam);
|
||||
|
||||
public static void SetSortIcon(this ListViewEx listViewControl, int columnIndex, SortOrder order)
|
||||
public static void SetSortIcon(this ListViewEx listViewControl, int columnIndex, MySortOrder order)
|
||||
{
|
||||
IntPtr columnHeader = SendMessage(listViewControl.Handle, LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero);
|
||||
for (int columnNumber = 0; columnNumber <= listViewControl.Columns.Count - 1; columnNumber++)
|
||||
@@ -71,16 +71,18 @@ namespace Common.Forms
|
||||
throw new Win32Exception();
|
||||
}
|
||||
|
||||
if (order != SortOrder.None && columnNumber == columnIndex)
|
||||
if (order != MySortOrder.None && columnNumber == columnIndex)
|
||||
{
|
||||
switch (order)
|
||||
{
|
||||
case SortOrder.Ascending:
|
||||
case MySortOrder.Ascending:
|
||||
case MySortOrder.Ascending2:
|
||||
item.fmt &= ~HDITEM.Format.SortDown;
|
||||
item.fmt |= HDITEM.Format.SortUp;
|
||||
break;
|
||||
|
||||
case SortOrder.Descending:
|
||||
case MySortOrder.Descending:
|
||||
case MySortOrder.Descending2:
|
||||
item.fmt &= ~HDITEM.Format.SortUp;
|
||||
item.fmt |= HDITEM.Format.SortDown;
|
||||
break;
|
||||
|
||||
@@ -5,7 +5,7 @@ using Common;
|
||||
|
||||
namespace Common.Forms
|
||||
{
|
||||
class LviIntColumnComparer : IComparer
|
||||
public class LviIntColumnComparer : IComparer
|
||||
{
|
||||
int column;
|
||||
MySortOrder order;
|
||||
|
||||
@@ -5,7 +5,7 @@ using Common;
|
||||
|
||||
namespace Common.Forms
|
||||
{
|
||||
class LviTextColumnComparer : IComparer
|
||||
public class LviTextColumnComparer : IComparer
|
||||
{
|
||||
private int column;
|
||||
MySortOrder order;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace Common
|
||||
{
|
||||
public interface IOrderInfo
|
||||
{
|
||||
string POName { get; }
|
||||
string VariantCode { get; }
|
||||
string ModuleParam { get; }
|
||||
int PiecesCount { get; }
|
||||
string SNPrefix { get; }
|
||||
int SNFirst { get; }
|
||||
int SNDigitsCount { get; }
|
||||
string SNSuffix { get; }
|
||||
string RAPrefix { get; }
|
||||
int RAFirst { get; }
|
||||
string RASuffix { get; }
|
||||
string Remark { get; }
|
||||
int CurrentPcsCount { get; set; }
|
||||
int CurrentSN { get; set; }
|
||||
int CurrentRA { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
|
||||
namespace Results.Output.Printers
|
||||
namespace Common.Printers
|
||||
{
|
||||
public class PrintersCommon : PrintDocument
|
||||
{
|
||||
+36
-9
@@ -13,43 +13,70 @@ namespace Common
|
||||
public class ProcedureInfo
|
||||
{
|
||||
public readonly ProcedureSelection Source;
|
||||
public readonly string Signature;
|
||||
public readonly int ItemNr;
|
||||
public int ItemNr;
|
||||
public readonly string Name;
|
||||
public readonly string Signature;
|
||||
public string Variant;
|
||||
public IOrderInfo OrderInfo;
|
||||
public string Workflow;
|
||||
public string LaserMarking;
|
||||
public bool IsNative;
|
||||
public ProcedureSelection ResolvedSource; /// ProcedureSelection.FromLocalDB or ProcedureSelection.FromSharedDB when Resolved==true
|
||||
public string ResolvedName;
|
||||
public string Variant;
|
||||
|
||||
public ProcedureInfo(ProcedureSelection source, int itemNr, string name, string signature = null, string variant = null)
|
||||
public ProcedureInfo(ProcedureSelection source, int itemNr, string name, string signature = null,
|
||||
string variant = null, IOrderInfo orderInfo = null, string workflow = null, string laserMarking = null)
|
||||
{
|
||||
Source = source;
|
||||
Signature = (signature == null) ? string.Empty : signature;
|
||||
ItemNr = itemNr;
|
||||
Name = name;
|
||||
Signature = (signature == null) ? string.Empty : signature;
|
||||
Variant = (variant == null) ? string.Empty : variant;
|
||||
OrderInfo = orderInfo;
|
||||
Workflow = workflow;
|
||||
LaserMarking = laserMarking;
|
||||
|
||||
if (source == ProcedureSelection.FromLocalDB || source == ProcedureSelection.FromSharedDB)
|
||||
{
|
||||
IsNative = true;
|
||||
ResolvedSource = source;
|
||||
ResolvedName = name;
|
||||
}
|
||||
else
|
||||
{
|
||||
IsNative = false;
|
||||
ResolvedSource = ProcedureSelection.None;
|
||||
ResolvedName = string.Empty;
|
||||
}
|
||||
Variant = (variant == null) ? string.Empty : variant;
|
||||
}
|
||||
|
||||
public static string GetSignature(ProcedureSelection source, ICollection<ProcedureSelection> allSources)
|
||||
{
|
||||
return (source == ProcedureSelection.OrderNrFromOracleDB) ? "O"
|
||||
: (source == ProcedureSelection.OrderNrFromTracingDB) ? "T"
|
||||
return (source == ProcedureSelection.OrderFromOracleDB) ? ""
|
||||
: (source == ProcedureSelection.OrderFromTracingDB) ? ""
|
||||
: (source == ProcedureSelection.FromSharedDB) ? "R"
|
||||
: (allSources != null && allSources.Contains(ProcedureSelection.FromSharedDB)) ? "L" : "";
|
||||
}
|
||||
|
||||
public bool IsValid
|
||||
{
|
||||
get {
|
||||
return (ResolvedSource != ProcedureSelection.None) && !string.IsNullOrEmpty(ResolvedName);
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}{1} {2}", Signature, ItemNr, Name);
|
||||
switch (Source)
|
||||
{
|
||||
case ProcedureSelection.OrderFromOracleDB:
|
||||
case ProcedureSelection.OrderFromTracingDB:
|
||||
return Name;
|
||||
case ProcedureSelection.FromSharedDB:
|
||||
case ProcedureSelection.FromLocalDB:
|
||||
default:
|
||||
return string.Format("{0}{1} {2}", Signature, ItemNr, Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Common.UIControls
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 msg, IntPtr wParam, ref HDITEM lParam);
|
||||
|
||||
public static void SetSortIcon(this ListViewEx listViewControl, int columnIndex, SortOrder order)
|
||||
public static void SetSortIcon(this ListViewEx listViewControl, int columnIndex, MySortOrder order)
|
||||
{
|
||||
IntPtr columnHeader = SendMessage(listViewControl.Handle, LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero);
|
||||
for (int columnNumber = 0; columnNumber <= listViewControl.Columns.Count - 1; columnNumber++)
|
||||
@@ -74,16 +74,18 @@ namespace Common.UIControls
|
||||
throw new Win32Exception();
|
||||
}
|
||||
|
||||
if (order != SortOrder.None && columnNumber == columnIndex)
|
||||
if (order != MySortOrder.None && columnNumber == columnIndex)
|
||||
{
|
||||
switch (order)
|
||||
{
|
||||
case SortOrder.Ascending:
|
||||
case MySortOrder.Ascending:
|
||||
case MySortOrder.Ascending2:
|
||||
item.fmt &= ~HDITEM.Format.SortDown;
|
||||
item.fmt |= HDITEM.Format.SortUp;
|
||||
break;
|
||||
|
||||
case SortOrder.Descending:
|
||||
case MySortOrder.Descending:
|
||||
case MySortOrder.Descending2:
|
||||
item.fmt &= ~HDITEM.Format.SortUp;
|
||||
item.fmt |= HDITEM.Format.SortDown;
|
||||
break;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections;
|
||||
@@ -10,15 +10,15 @@ namespace Common.UIControls
|
||||
public class LviDateTimeColumnComparer : IComparer
|
||||
{
|
||||
int column;
|
||||
SortOrder order;
|
||||
MySortOrder order;
|
||||
|
||||
public LviDateTimeColumnComparer()
|
||||
{
|
||||
column = 0;
|
||||
order = SortOrder.Ascending;
|
||||
order = MySortOrder.Ascending;
|
||||
}
|
||||
|
||||
public LviDateTimeColumnComparer(int column, SortOrder order)
|
||||
public LviDateTimeColumnComparer(int column, MySortOrder order)
|
||||
{
|
||||
this.column = column;
|
||||
this.order = order;
|
||||
@@ -33,13 +33,13 @@ namespace Common.UIControls
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (order == SortOrder.Ascending)
|
||||
else if ((order == MySortOrder.Descending || order == MySortOrder.Descending2))
|
||||
{
|
||||
return (valX > valY) ? 1 : -1;
|
||||
return (valY > valX) ? 1 : -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (valY > valX) ? 1 : -1;
|
||||
return (valX > valY) ? 1 : -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections;
|
||||
@@ -10,15 +10,15 @@ namespace Common.UIControls
|
||||
public class LviIntColumnComparer : IComparer
|
||||
{
|
||||
int column;
|
||||
SortOrder order;
|
||||
MySortOrder order;
|
||||
|
||||
public LviIntColumnComparer()
|
||||
{
|
||||
column = 0;
|
||||
order = SortOrder.Ascending;
|
||||
order = MySortOrder.Ascending;
|
||||
}
|
||||
|
||||
public LviIntColumnComparer(int column, SortOrder order)
|
||||
public LviIntColumnComparer(int column, MySortOrder order)
|
||||
{
|
||||
this.column = column;
|
||||
this.order = order;
|
||||
@@ -28,7 +28,7 @@ namespace Common.UIControls
|
||||
{
|
||||
int valX = int.Parse(((ListViewItem)x).SubItems[column].Text);
|
||||
int valY = int.Parse(((ListViewItem)y).SubItems[column].Text);
|
||||
return (order == SortOrder.Descending) ? (valY - valX) : (valX - valY);
|
||||
return (order == MySortOrder.Descending || order == MySortOrder.Descending2) ? (valY - valX) : (valX - valY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections;
|
||||
@@ -10,15 +10,15 @@ namespace Common.UIControls
|
||||
public class LviTextColumnComparer : IComparer
|
||||
{
|
||||
private int column;
|
||||
SortOrder order;
|
||||
MySortOrder order;
|
||||
|
||||
public LviTextColumnComparer()
|
||||
{
|
||||
column = 0;
|
||||
order = SortOrder.Ascending;
|
||||
order = MySortOrder.Ascending;
|
||||
}
|
||||
|
||||
public LviTextColumnComparer(int column, SortOrder order)
|
||||
public LviTextColumnComparer(int column, MySortOrder order)
|
||||
{
|
||||
this.column = column;
|
||||
this.order = order;
|
||||
@@ -28,7 +28,7 @@ namespace Common.UIControls
|
||||
{
|
||||
string txtX = ((ListViewItem)x).SubItems[column].Text;
|
||||
string txtY = ((ListViewItem)y).SubItems[column].Text;
|
||||
return (order == SortOrder.Descending) ? String.Compare(txtY, txtX) : String.Compare(txtX, txtY);
|
||||
return (order == MySortOrder.Descending || order == MySortOrder.Descending2) ? String.Compare(txtY, txtX) : String.Compare(txtX, txtY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+35
-8
@@ -246,14 +246,14 @@ namespace Common
|
||||
unit == Unit.J || unit == Unit.uSpcm || unit == Unit.ppl || unit == Unit.ppkWh;
|
||||
}
|
||||
|
||||
public static bool IsQuantity(Unit units, Quantity quantity)
|
||||
public static bool IsQuantity(Unit unit, Quantity quantity)
|
||||
{
|
||||
return (quantity == GetQuantity(units));
|
||||
return (quantity == GetQuantity(unit));
|
||||
}
|
||||
|
||||
public static Quantity GetQuantity(Unit units)
|
||||
public static Quantity GetQuantity(Unit unit)
|
||||
{
|
||||
switch (units)
|
||||
switch (unit)
|
||||
{
|
||||
case Unit.pulse:
|
||||
case Unit.degree:
|
||||
@@ -375,9 +375,15 @@ namespace Common
|
||||
public static bool IsConductivity(Unit units) { return IsQuantity(units, Quantity.Conductivity); }
|
||||
|
||||
|
||||
public static double ConvertTo(Unit units, double v)
|
||||
|
||||
public static float ConvertTo(Unit unit, float v)
|
||||
{
|
||||
switch (units)
|
||||
return (float)ConvertTo(unit, (double)v);
|
||||
}
|
||||
|
||||
public static double ConvertTo(Unit unit, double v)
|
||||
{
|
||||
switch (unit)
|
||||
{
|
||||
/// Volume: internal representation in l
|
||||
case Unit.ml: return 1000 * v; /// 1 ml = 0.001 l
|
||||
@@ -455,9 +461,15 @@ namespace Common
|
||||
}
|
||||
}
|
||||
|
||||
public static double ConvertFrom(Unit units, double v)
|
||||
|
||||
public static float ConvertFrom(Unit unit, float v)
|
||||
{
|
||||
switch (units)
|
||||
return (float)ConvertFrom(unit, (double)v);
|
||||
}
|
||||
|
||||
public static double ConvertFrom(Unit unit, double v)
|
||||
{
|
||||
switch (unit)
|
||||
{
|
||||
/// Volume: internal representation in l
|
||||
case Unit.ml: return 0.001 * v; /// 0.001 l
|
||||
@@ -534,5 +546,20 @@ namespace Common
|
||||
default: return v; /// Do not convert
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a string to a unit
|
||||
/// </summary>
|
||||
/// <param name="description">Unit description string</param>
|
||||
/// <returns>Converted unit or Unit.None if not recognized</returns>
|
||||
public static Unit FromDescription(string description)
|
||||
{
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
{
|
||||
if (unit.ToDescription() == description) return unit;
|
||||
}
|
||||
|
||||
return Unit.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
|
||||
+32
-3
@@ -57,8 +57,21 @@ namespace Config.Entities
|
||||
public virtual string TransBetween { get; set; }
|
||||
public virtual string TransAfter { get; set; }
|
||||
|
||||
public virtual bool IsOuterLoopStart { get; set; } /// Not mapped to database
|
||||
public virtual bool IsOuterLoopEnd { get; set; } /// Not mapped to database
|
||||
public virtual bool IsOuterLoopStart { get; set; } /// Not mapped to database
|
||||
public virtual bool IsOuterLoopEnd { get; set; } /// Not mapped to database
|
||||
|
||||
public virtual bool QtgTextChngd { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual bool QfromTextChngd { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual bool QtoTextChngd { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual bool VolumeTextChngd { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual bool TempLimLoTextChngd { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual bool TempLimHiTextChngd { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual Unit VolumeUnit { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual Unit FlowUnit { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual Unit MassUnit { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual Unit TempUnit { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual Unit PressUnit { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
public virtual Unit LengthUnit { get; set; } /// Not mapped to database, used in ProcedureDlg / Metrology1Tab
|
||||
|
||||
public virtual IList<ComponentTest> MoreParams { get; set; }
|
||||
|
||||
@@ -124,6 +137,16 @@ namespace Config.Entities
|
||||
return autoTests.Contains(action);
|
||||
}
|
||||
|
||||
public virtual void ResetChngdFlags()
|
||||
{
|
||||
QtgTextChngd = false;
|
||||
QfromTextChngd = false;
|
||||
QtoTextChngd = false;
|
||||
VolumeTextChngd = false;
|
||||
TempLimLoTextChngd = false;
|
||||
TempLimHiTextChngd = false;
|
||||
}
|
||||
|
||||
// Makes a new copy of this object (not just a reference)
|
||||
public virtual Test Clone()
|
||||
{
|
||||
@@ -167,7 +190,13 @@ namespace Config.Entities
|
||||
result.TransBefore = TransBefore;
|
||||
result.TransBetween = TransBetween;
|
||||
result.TransAfter = TransAfter;
|
||||
foreach (var prms in MoreParams) { result.MoreParams.Add(prms.Clone()); }
|
||||
result.VolumeUnit = VolumeUnit;
|
||||
result.FlowUnit = FlowUnit;
|
||||
result.MassUnit = MassUnit;
|
||||
result.TempUnit = TempUnit;
|
||||
result.PressUnit = PressUnit;
|
||||
result.LengthUnit = LengthUnit;
|
||||
foreach (var prms in MoreParams) { result.MoreParams.Add(prms.Clone()); }
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
@@ -27,7 +27,7 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace EventViewer
|
||||
ISession session;
|
||||
IList<Subscriber> subscribers;
|
||||
IList<Event> events;
|
||||
SortOrder sortOrder = SortOrder.Ascending;
|
||||
MySortOrder sortOrder = MySortOrder.Ascending;
|
||||
int sortColumn = -1; /// 0-based index of column to be used for sorting
|
||||
|
||||
EViewerOption eViewerOption;
|
||||
@@ -222,13 +222,13 @@ namespace EventViewer
|
||||
{
|
||||
if (e.Column == sortColumn)
|
||||
{
|
||||
sortOrder = (sortOrder == SortOrder.Ascending) ? SortOrder.Descending : SortOrder.Ascending;
|
||||
sortOrder = (sortOrder == MySortOrder.Ascending) ? MySortOrder.Descending : MySortOrder.Ascending;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Clicked on another column header => set sortOrder to SortOrder.Ascending
|
||||
sortColumn = e.Column;
|
||||
sortOrder = SortOrder.Ascending;
|
||||
sortOrder = MySortOrder.Ascending;
|
||||
}
|
||||
|
||||
switch ((Column)sortColumn)
|
||||
|
||||
+58
-50
@@ -199,7 +199,8 @@ namespace GemCard
|
||||
{
|
||||
Disconnect(DISCONNECT.Unpower);
|
||||
|
||||
ReleaseContext();
|
||||
try { ReleaseContext(); }
|
||||
catch { }
|
||||
}
|
||||
|
||||
#region ICard Members
|
||||
@@ -215,66 +216,73 @@ namespace GemCard
|
||||
/// <returns>A string array of the readers</returns>
|
||||
public override string[] ListReaders()
|
||||
{
|
||||
EstablishContext(SCOPE.User);
|
||||
try
|
||||
{
|
||||
EstablishContext(SCOPE.User);
|
||||
|
||||
string[] sListReaders = null;
|
||||
UInt32 pchReaders = 0;
|
||||
IntPtr szListReaders = IntPtr.Zero;
|
||||
string[] sListReaders = null;
|
||||
UInt32 pchReaders = 0;
|
||||
IntPtr szListReaders = IntPtr.Zero;
|
||||
|
||||
m_nLastError = SCardListReaders(m_hContext, null, szListReaders, out pchReaders);
|
||||
if (m_nLastError == 0)
|
||||
{
|
||||
szListReaders = Marshal.AllocHGlobal((int) pchReaders);
|
||||
m_nLastError = SCardListReaders(m_hContext, null, szListReaders, out pchReaders);
|
||||
if (m_nLastError == 0)
|
||||
{
|
||||
char[] caReadersData = new char[pchReaders];
|
||||
int nbReaders = 0;
|
||||
for (int nI = 0; nI < pchReaders; nI++)
|
||||
{
|
||||
caReadersData[nI] = (char) Marshal.ReadByte(szListReaders, nI);
|
||||
m_nLastError = SCardListReaders(m_hContext, null, szListReaders, out pchReaders);
|
||||
if (m_nLastError == 0)
|
||||
{
|
||||
szListReaders = Marshal.AllocHGlobal((int)pchReaders);
|
||||
m_nLastError = SCardListReaders(m_hContext, null, szListReaders, out pchReaders);
|
||||
if (m_nLastError == 0)
|
||||
{
|
||||
char[] caReadersData = new char[pchReaders];
|
||||
int nbReaders = 0;
|
||||
for (int nI = 0; nI < pchReaders; nI++)
|
||||
{
|
||||
caReadersData[nI] = (char)Marshal.ReadByte(szListReaders, nI);
|
||||
|
||||
if (caReadersData[nI] == 0)
|
||||
nbReaders++;
|
||||
}
|
||||
if (caReadersData[nI] == 0)
|
||||
nbReaders++;
|
||||
}
|
||||
|
||||
// Remove last 0
|
||||
--nbReaders;
|
||||
// Remove last 0
|
||||
--nbReaders;
|
||||
|
||||
if (nbReaders != 0)
|
||||
{
|
||||
sListReaders = new string[nbReaders];
|
||||
char[] caReader = new char[pchReaders];
|
||||
int nIdx = 0;
|
||||
int nIdy = 0;
|
||||
int nIdz = 0;
|
||||
// Get the nJ string from the multi-string
|
||||
if (nbReaders != 0)
|
||||
{
|
||||
sListReaders = new string[nbReaders];
|
||||
char[] caReader = new char[pchReaders];
|
||||
int nIdx = 0;
|
||||
int nIdy = 0;
|
||||
int nIdz = 0;
|
||||
// Get the nJ string from the multi-string
|
||||
|
||||
while(nIdx < pchReaders - 1)
|
||||
{
|
||||
caReader[nIdy] = caReadersData[nIdx];
|
||||
if (caReader[nIdy] == 0)
|
||||
{
|
||||
sListReaders[nIdz] = new string(caReader, 0, nIdy);
|
||||
++nIdz;
|
||||
nIdy = 0;
|
||||
caReader = new char[pchReaders];
|
||||
}
|
||||
else
|
||||
++nIdy;
|
||||
while (nIdx < pchReaders - 1)
|
||||
{
|
||||
caReader[nIdy] = caReadersData[nIdx];
|
||||
if (caReader[nIdy] == 0)
|
||||
{
|
||||
sListReaders[nIdz] = new string(caReader, 0, nIdy);
|
||||
++nIdz;
|
||||
nIdy = 0;
|
||||
caReader = new char[pchReaders];
|
||||
}
|
||||
else
|
||||
++nIdy;
|
||||
|
||||
++nIdx;
|
||||
}
|
||||
}
|
||||
++nIdx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Marshal.FreeHGlobal(szListReaders);
|
||||
}
|
||||
Marshal.FreeHGlobal(szListReaders);
|
||||
}
|
||||
|
||||
ReleaseContext();
|
||||
ReleaseContext();
|
||||
|
||||
return sListReaders;
|
||||
return sListReaders;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new string[0];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
||||
@@ -110,7 +110,7 @@
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
Generated
+99
@@ -0,0 +1,99 @@
|
||||
namespace OrderManagement
|
||||
{
|
||||
partial class EditOrderDlg
|
||||
{
|
||||
/// <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 Windows Form 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.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.cancelButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.okButton);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(685, 352);
|
||||
this.splitContainer1.SplitterDistance = 555;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.cancelButton.Location = new System.Drawing.Point(21, 70);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(85, 40);
|
||||
this.cancelButton.TabIndex = 6;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.okButton.Location = new System.Drawing.Point(21, 20);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(85, 40);
|
||||
this.okButton.TabIndex = 5;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// EditOrderDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(685, 352);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "EditOrderDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Production order properties";
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using SharedDatabase.Entities;
|
||||
using OrderManagement.Resources;
|
||||
using NHibernate;
|
||||
|
||||
namespace OrderManagement
|
||||
{
|
||||
public partial class EditOrderDlg : Form
|
||||
{
|
||||
ISession session;
|
||||
OrderInfo oriOrder;
|
||||
IList<OrderInfo> listOfOrders;
|
||||
bool isEnablePredefinedOrders;
|
||||
bool editMode;
|
||||
|
||||
EditParametersCtrl editParametersCtrl;
|
||||
|
||||
public EditOrderDlg(ISession session, OrderInfo order, IList<OrderInfo> listOfOrders, bool isEnablePredefinedOrders = false, bool editMode = false)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.session = session;
|
||||
this.oriOrder = order;
|
||||
this.listOfOrders = listOfOrders;
|
||||
this.isEnablePredefinedOrders = isEnablePredefinedOrders;
|
||||
this.editMode = editMode;
|
||||
|
||||
editParametersCtrl = new EditParametersCtrl(oriOrder.Clone());
|
||||
editParametersCtrl.Dock = DockStyle.Fill;
|
||||
editParametersCtrl.Unlock();
|
||||
splitContainer1.Panel1.Controls.Add(editParametersCtrl);
|
||||
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Producton_order_properties;
|
||||
okButton.Text = Strings.OK;
|
||||
cancelButton.Text = Strings.Cancel;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
OrderInfo modifiedOrder = editParametersCtrl.ParamsProvider as OrderInfo;
|
||||
|
||||
int modifiedOrderNr;
|
||||
if (!isEnablePredefinedOrders &&
|
||||
(!int.TryParse(modifiedOrder.POName, out modifiedOrderNr) || modifiedOrderNr <= OrderManagementDlg.MaxPredefinedOrderNr))
|
||||
{
|
||||
MessageBox.Show(string.Format(Strings.Order_number_must_be_larger_then_0, OrderManagementDlg.MaxPredefinedOrderNr));
|
||||
return;
|
||||
}
|
||||
|
||||
OrderInfo orderWithTheSameName = listOfOrders.FirstOrDefault(x => (x.POName == modifiedOrder.POName));
|
||||
|
||||
if (orderWithTheSameName != null && (!editMode || modifiedOrder.POName != oriOrder.POName))
|
||||
{
|
||||
MessageBox.Show(Strings.Order_with_the_same_ID_already_exists);
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsConflict(modifiedOrder, listOfOrders, editMode ? oriOrder : null))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
modifiedOrder.CopyContentTo(oriOrder);
|
||||
|
||||
if (Save(oriOrder))
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Saving the modified order to the database failed");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saves the new or modified order to the database
|
||||
/// </summary>
|
||||
/// <returns>true when successful</returns>
|
||||
bool Save(OrderInfo order)
|
||||
{
|
||||
ITransaction transaction = session.BeginTransaction();
|
||||
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
|
||||
session.SaveOrUpdate(order);
|
||||
transaction.Commit();
|
||||
session.Flush();
|
||||
Cursor.Current = Cursors.Default;
|
||||
return true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
transaction.Rollback();
|
||||
MessageBox.Show(string.Format("{0}{1}{2}", Strings.Saving_order_failed, Environment.NewLine, exc.Message),
|
||||
Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
Cursor.Current = Cursors.Default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check for conflicts of serial numbers or radio addresses
|
||||
/// </summary>
|
||||
/// <param name="order">New or modified order to be checked</param>
|
||||
/// <param name="listOfOrders">List of all orders</param>
|
||||
/// <param name="orderToIgnore">Order to be ignered when doing check (original order in the edit mode)</param>
|
||||
/// <returns>false = OK, true = conflict (MessageBox appears before returning true)</returns>
|
||||
bool IsConflict(OrderInfo order, IList<OrderInfo> listOfOrders, OrderInfo orderToIgnore)
|
||||
{
|
||||
if (order.POName[0] == '3')
|
||||
{
|
||||
if (MessageBox.Show(string.Format("{0}\r\n{1}", Strings.It_is_not_recommended_that_orders_start_with_3,
|
||||
Strings.Abort_creating_an_order_QM),
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Exclamation) == DialogResult.Yes)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
int snLength = CodeLength(order);
|
||||
Int64 snOffset;
|
||||
string snStdPrefix = StandardPrefix(order, out snOffset);
|
||||
string snStdSuffix = StandardSuffix(order);
|
||||
Int64 snFrst = First(order, snOffset);
|
||||
Int64 snLast = Last(order, snOffset);
|
||||
|
||||
int raLength = CodeLength(order, true);
|
||||
Int64 raOffset;
|
||||
string raStdPrefix = StandardPrefix(order, out raOffset, true);
|
||||
string raStdSuffix = StandardSuffix(order, true);
|
||||
Int64 raFrst = First(order, raOffset, true);
|
||||
Int64 raLast = Last(order, raOffset, true);
|
||||
|
||||
foreach (var another in listOfOrders)
|
||||
{
|
||||
if (orderToIgnore != null && orderToIgnore == another) continue;
|
||||
|
||||
Int64 offset;
|
||||
string anotherSnStdPrefix = StandardPrefix(another, out offset);
|
||||
Int64 first2 = First(another, offset);
|
||||
Int64 last2 = Last(another, offset);
|
||||
if (snLength == CodeLength(another) &&
|
||||
snStdPrefix == anotherSnStdPrefix &&
|
||||
snStdSuffix == StandardSuffix(another) &&
|
||||
((first2 <= snFrst && snFrst <= last2 ) ||
|
||||
(first2 <= snLast && snLast <= last2 ) ||
|
||||
(snFrst <= first2 && first2 <= snLast) ||
|
||||
(snFrst <= last2 && last2 <= snLast)))
|
||||
{
|
||||
if (MessageBox.Show(string.Format("{0}\r\n{1}: s/n {2} .. {3}\r\n{4}: s/n {5} .. {6}\r\n{7}",
|
||||
Strings.There_is_a_conflict,
|
||||
order.POName,
|
||||
order.SNPrefix + order.SNFirst.ToString(string.Format("D{0}", order.SNDigitsCount)) + snStdSuffix,
|
||||
order.SNPrefix + (order.SNFirst + order.PiecesCount - 1).ToString(string.Format("D{0}", order.SNDigitsCount)) + snStdSuffix,
|
||||
another.POName,
|
||||
another.SNPrefix + another.SNFirst.ToString(string.Format("D{0}", another.SNDigitsCount)) + StandardSuffix(another),
|
||||
another.SNPrefix + (another.SNFirst + another.PiecesCount - 1).ToString(string.Format("D{0}", another.SNDigitsCount)) + StandardSuffix(another),
|
||||
Strings.Abort_creating_an_order_QM),
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Exclamation) == DialogResult.Yes)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
string anotherRaStdPrefix = StandardPrefix(another, out offset, true);
|
||||
first2 = First(another, offset, true);
|
||||
last2 = Last(another, offset, true);
|
||||
if (!string.IsNullOrEmpty(order.RAPrefix) &&
|
||||
!string.IsNullOrEmpty(another.RAPrefix) &&
|
||||
raLength == CodeLength(another, true) &&
|
||||
raStdPrefix == anotherRaStdPrefix &&
|
||||
raStdSuffix == StandardSuffix(another, true) &&
|
||||
((first2 <= raFrst && raFrst <= last2 ) ||
|
||||
(first2 <= raLast && raLast <= last2 ) ||
|
||||
(raFrst <= first2 && first2 <= raLast) ||
|
||||
(raFrst <= last2 && last2 <= raLast)))
|
||||
{
|
||||
if (MessageBox.Show(string.Format("{0}\r\n{1}: radio {2} .. {3}\r\n{4}: radio {5} .. {6}\r\n{7}",
|
||||
Strings.There_is_a_conflict,
|
||||
order.POName,
|
||||
order.RAPrefix + order.RAFirst.ToString("D9") + snStdSuffix,
|
||||
order.RAPrefix + (order.RAFirst + order.PiecesCount).ToString("D9") + snStdSuffix,
|
||||
another.POName,
|
||||
another.RAPrefix + another.RAFirst.ToString("D9") + StandardSuffix(another, true),
|
||||
another.RAPrefix + (another.RAFirst + another.PiecesCount).ToString("D9") + StandardSuffix(another, true),
|
||||
Strings.Abort_creating_an_order_QM),
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Exclamation) == DialogResult.Yes)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Prefix lenght + digits count + Suffix length
|
||||
/// </summary>
|
||||
/// <param name="order">Order</param>
|
||||
/// <param name="isRadio">true = Radio address</param>
|
||||
/// <returns>Complete S/N or RA length</returns>
|
||||
int CodeLength(OrderInfo order, bool isRadio = false)
|
||||
{
|
||||
string prefix = isRadio ? order.RAPrefix : order.SNPrefix;
|
||||
string suffix = isRadio ? order.RASuffix : order.SNSuffix;
|
||||
int digitsCount = isRadio ? 9 : order.SNDigitsCount;
|
||||
|
||||
return (string.IsNullOrEmpty(prefix) ? 0 : prefix.Length) + digitsCount +
|
||||
(string.IsNullOrEmpty(suffix) ? 0 : suffix.Length);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Standar prefix does not have digits at the end
|
||||
/// </summary>
|
||||
/// <param name="order">Order</param>
|
||||
/// <param name="offset">Offset represented by digits at the end of prefix</param>
|
||||
/// <param name="isRadio">true = Radio address</param>
|
||||
/// <returns></returns>
|
||||
string StandardPrefix(OrderInfo order, out Int64 offset, bool isRadio = false)
|
||||
{
|
||||
string prefix = isRadio ? order.RAPrefix : order.SNPrefix;
|
||||
int digitsCount = isRadio ? 9 : order.SNDigitsCount;
|
||||
|
||||
if (string.IsNullOrEmpty(prefix))
|
||||
{
|
||||
offset = 0;
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
for (int i = prefix.Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (!Char.IsDigit(prefix[i]))
|
||||
{
|
||||
offset = (i == prefix.Length - 1) ? 0 : Int64.Parse(prefix.Substring(i + 1)) * Convert.ToInt64(Math.Pow(10, digitsCount));
|
||||
return prefix.Substring(0, i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
offset = Int64.Parse(prefix) * Convert.ToInt64(Math.Pow(10, digitsCount));
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Standar suffix is never null, null suffix is converted to string.Empty
|
||||
/// </summary>
|
||||
/// <param name="order">Order</param>
|
||||
/// <param name="isRadio">true = Radio address</param>
|
||||
/// <returns></returns>
|
||||
string StandardSuffix(OrderInfo order, bool isRadio = false)
|
||||
{
|
||||
string suffix = isRadio ? order.RASuffix : order.SNSuffix;
|
||||
return string.IsNullOrEmpty(suffix) ? string.Empty : suffix;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// First S/N or RA of an order extended with digits at the end of prefix
|
||||
/// </summary>
|
||||
/// <param name="order">Order</param>
|
||||
/// <param name="offset">Offset represented by digits at the end of prefix</param>
|
||||
/// <param name="isRadio">true = Radio address</param>
|
||||
/// <returns>First extended S/N or RA in this order</returns>
|
||||
Int64 First(OrderInfo order, Int64 offset, bool isRadio = false)
|
||||
{
|
||||
return offset + (isRadio ? order.RAFirst : order.SNFirst);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Last S/N or RA of an order extended with digits at the end of prefix
|
||||
/// </summary>
|
||||
/// <param name="order">Order</param>
|
||||
/// <param name="offset">Offset represented by digits at the end of prefix</param>
|
||||
/// <param name="isRadio">true = Radio address</param>
|
||||
/// <returns>Last extended S/N or RA in this order</returns>
|
||||
Int64 Last(OrderInfo order, Int64 offset, bool isRadio = false)
|
||||
{
|
||||
return First(order, offset, isRadio) + order.PiecesCount - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Common;
|
||||
using OrderManagement.Resources;
|
||||
|
||||
namespace OrderManagement
|
||||
{
|
||||
public partial class EditParametersCtrl : UserControl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(EditParametersCtrl));
|
||||
|
||||
public IParamsProvider ParamsProvider;
|
||||
Control[] editors;
|
||||
CfgUpdateFlags flags;
|
||||
|
||||
public EditParametersCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="paramsProvider">Parameters provider implementing IComponentCfg and IParamsProvider</param>
|
||||
/// <param name="parents">A list of parents or null, null hides parentComboBox</param>
|
||||
public EditParametersCtrl(object paramsProvider)
|
||||
: this()
|
||||
{
|
||||
this.ParamsProvider = paramsProvider as IParamsProvider;
|
||||
if (this.ParamsProvider == null) throw(new ArgumentException("paramsProvider"));
|
||||
|
||||
editors = new Control[this.ParamsProvider.ParamsCount()];
|
||||
for (int i = 0; i < this.ParamsProvider.ParamsCount(); i++)
|
||||
{
|
||||
ICollection<string> values = this.ParamsProvider.ParamValues(i);
|
||||
if (values == null)
|
||||
{
|
||||
editors[i] = new TextBox();
|
||||
}
|
||||
else
|
||||
{
|
||||
ComboBox cb = new ComboBox();
|
||||
foreach (var v in values) cb.Items.Add(v);
|
||||
editors[i] = cb;
|
||||
}
|
||||
editors[i].Visible = false;
|
||||
this.Controls.Add(editors[i]);
|
||||
}
|
||||
|
||||
flags = CfgUpdateFlags.None;
|
||||
|
||||
paramsListViewEx.SubItemClicked += new Common.Forms.SubItemEventHandler(paramsListViewEx_SubItemClicked);
|
||||
paramsListViewEx.SubItemEndEditing += new Common.Forms.SubItemEndEditingEventHandler(paramsListViewEx_SubItemEndEditing);
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
paramsListViewEx.Columns.Add(Strings.Parameter, 150);
|
||||
paramsListViewEx.Columns.Add(Strings.Value, 400);
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
/// Close CmdResponse handlers here
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (ParamsProvider == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
paramsListViewEx.Items.Clear();
|
||||
for (int i = 0; i < ParamsProvider.ParamsCount(); i++)
|
||||
{
|
||||
ListViewItem lvi = new ListViewItem(ParamsProvider.ParamName(i));
|
||||
lvi.SubItems.Add(ParamsProvider.ToString(i));
|
||||
lvi.Tag = i;
|
||||
paramsListViewEx.Items.Add(lvi);
|
||||
}
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
paramsListViewEx.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
return CfgUpdateFlags.Error;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
if (ParamsProvider == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
CfgUpdateFlags f = this.flags;
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
private void paramsListViewEx_SubItemClicked(object sender, Common.Forms.SubItemEventArgs e)
|
||||
{
|
||||
if (e.SubItem != 1) return;
|
||||
int itemNr = (int)e.Item.Tag;
|
||||
paramsListViewEx.StartEditing(editors[itemNr], e.Item, e.SubItem);
|
||||
}
|
||||
|
||||
private void paramsListViewEx_SubItemEndEditing(object sender, Common.Forms.SubItemEndEditingEventArgs e)
|
||||
{
|
||||
if (e.SubItem != 1) return;
|
||||
int itemNr = (int)e.Item.Tag;
|
||||
|
||||
string message;
|
||||
if (ParamsProvider.ValidateParam(itemNr, e.DisplayText, out message))
|
||||
{
|
||||
flags |= ParamsProvider.UpdateParam(itemNr, e.DisplayText);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(message);
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace OrderManagement
|
||||
{
|
||||
partial class EditParametersCtrl
|
||||
{
|
||||
/// <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.paramsListViewEx = new Common.Forms.ListViewEx();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// paramsListViewEx
|
||||
//
|
||||
this.paramsListViewEx.AllowColumnReorder = true;
|
||||
this.paramsListViewEx.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.paramsListViewEx.DoubleClickActivation = false;
|
||||
this.paramsListViewEx.Enabled = false;
|
||||
this.paramsListViewEx.FullRowSelect = true;
|
||||
this.paramsListViewEx.GridLines = true;
|
||||
this.paramsListViewEx.LabelWrap = false;
|
||||
this.paramsListViewEx.Location = new System.Drawing.Point(0, 0);
|
||||
this.paramsListViewEx.Name = "paramsListViewEx";
|
||||
this.paramsListViewEx.Size = new System.Drawing.Size(491, 356);
|
||||
this.paramsListViewEx.TabIndex = 0;
|
||||
this.paramsListViewEx.UseCompatibleStateImageBehavior = false;
|
||||
this.paramsListViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.paramsListViewEx.SubItemClicked += new Common.Forms.SubItemEventHandler(this.paramsListViewEx_SubItemClicked);
|
||||
this.paramsListViewEx.SubItemEndEditing += new Common.Forms.SubItemEndEditingEventHandler(this.paramsListViewEx_SubItemEndEditing);
|
||||
//
|
||||
// EditParametersCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.paramsListViewEx);
|
||||
this.Name = "EditParametersCtrl";
|
||||
this.Size = new System.Drawing.Size(491, 356);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Common.Forms.ListViewEx paramsListViewEx;
|
||||
}
|
||||
}
|
||||
+1
-10
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
@@ -117,13 +117,4 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Text" xml:space="preserve">
|
||||
<value>Kolejność</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Dane partii</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,247 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace OrderManagement
|
||||
{
|
||||
/// <summary>
|
||||
/// Class to be serialized to an XML file...
|
||||
/// </summary>
|
||||
[XmlRootAttribute("SNPrinting")]
|
||||
public class LocalSettings
|
||||
{
|
||||
static XmlSerializer serializer = XmlSerializer.FromTypes(new[] { typeof(LocalSettings) })[0];
|
||||
|
||||
/// Configuration file ecryption/decryption key and initialization vector
|
||||
static byte[] key = new byte[] { 83, 254, 105, 64, 184, 201, 195, 127, 52, 99, 77, 45, 252, 132, 163, 156 };
|
||||
static byte[] IV = new byte[] { 189, 23, 137, 56, 204, 241, 242, 118, 28, 89, 9, 198, 224, 111, 186, 125 };
|
||||
|
||||
public Mode Mode;
|
||||
public string Language; /// User interface language used as CultureInfo(..) constructor argument
|
||||
public bool IsUserLoginRequired; /// true = require user login on program start-up
|
||||
public bool IsShowPredefinedOrders; /// true = show predefined orders with nr. <= 1000
|
||||
public string TracingDBConnString; /// Connection string to MySQL database with production tracing records
|
||||
public string UsersDBConnString; /// Connection string to MySQL database with authorized users
|
||||
public string[] SapNumberHistory; /// SAP number history
|
||||
public string[] SeparatorHistory; /// Separator history
|
||||
public int CurrentSNTrail; /// Serial number trail to be printed now
|
||||
public int RemainingSNsCount; /// Remaining count of serial numbers to be printed in this session
|
||||
|
||||
|
||||
/// Parameterless constructor required by serialization
|
||||
public LocalSettings() { }
|
||||
|
||||
public LocalSettings(bool createNew)
|
||||
{
|
||||
if (createNew)
|
||||
{
|
||||
Mode = Mode.Standalone;
|
||||
Language = "EN";
|
||||
IsUserLoginRequired = false;
|
||||
IsShowPredefinedOrders = false;
|
||||
#if DEBUG
|
||||
TracingDBConnString = "SERVER=localhost; DATABASE=nanjingshared; UID=root; PASSWORD=kraken; CHARSET=utf8;";
|
||||
#else
|
||||
TracingDBConnString = "SERVER=10.116.192.200; DATABASE=nanjingshared; UID=nanjingshared; PASSWORD=C1ern4V0d4; CHARSET=utf8;";
|
||||
#endif
|
||||
UsersDBConnString = TracingDBConnString;
|
||||
SapNumberHistory = new string[] { };
|
||||
SeparatorHistory = new string[] { "7VQ" };
|
||||
CurrentSNTrail = 1;
|
||||
RemainingSNsCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load public fields of this class from the XML file.
|
||||
/// </summary>
|
||||
/// <returns>LocalSettings object or null when Load() fails</returns>
|
||||
public static LocalSettings Load(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool isEncrypted = true;
|
||||
using (StreamReader reader = new StreamReader(fileName))
|
||||
{
|
||||
isEncrypted = !reader.ReadLine().StartsWith("<?xml version=");
|
||||
reader.Close();
|
||||
}
|
||||
|
||||
if (isEncrypted)
|
||||
{
|
||||
/// Write settings to a string
|
||||
StringBuilder plain = new StringBuilder();
|
||||
|
||||
using (RijndaelManaged aes = new RijndaelManaged { Padding = PaddingMode.Zeros })
|
||||
{
|
||||
using (FileStream fsCrypt = new FileStream(fileName, FileMode.Open))
|
||||
{
|
||||
using (ICryptoTransform decryptor = aes.CreateDecryptor(key, IV))
|
||||
{
|
||||
using (CryptoStream cs = new CryptoStream(fsCrypt, decryptor, CryptoStreamMode.Read))
|
||||
{
|
||||
using (MemoryStream mStream = new MemoryStream())
|
||||
{
|
||||
using (var writer = new BinaryWriter(mStream))
|
||||
{
|
||||
int data;
|
||||
while ((data = cs.ReadByte()) != -1)
|
||||
{
|
||||
if (data != 0) writer.Write((byte)data);
|
||||
}
|
||||
writer.Flush();
|
||||
mStream.Position = 0;
|
||||
|
||||
using (var reader = new StreamReader(mStream))
|
||||
{
|
||||
return serializer.Deserialize(reader) as LocalSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (StreamReader reader = new StreamReader(fileName))
|
||||
{
|
||||
return serializer.Deserialize(reader) as LocalSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save public fields of this class to the XML file.
|
||||
/// </summary>
|
||||
public void Save()
|
||||
{
|
||||
try
|
||||
{
|
||||
/// Encrypt and write to file 'Program.LocalSettingsFileName'
|
||||
using (RijndaelManaged aes = new RijndaelManaged { Padding = PaddingMode.Zeros })
|
||||
{
|
||||
using (FileStream fsCrypt = new FileStream(Program.LocalSettingsFileName, FileMode.Create))
|
||||
{
|
||||
using (ICryptoTransform encryptor = aes.CreateEncryptor(key, IV))
|
||||
{
|
||||
using (CryptoStream cs = new CryptoStream(fsCrypt, encryptor, CryptoStreamMode.Write))
|
||||
{
|
||||
using (MemoryStream mStream = new MemoryStream())
|
||||
{
|
||||
using (var writer = new StreamWriter(mStream))
|
||||
{
|
||||
/// Serialize and write settings to a memory stream
|
||||
serializer.Serialize(writer, this);
|
||||
writer.Flush();
|
||||
mStream.Position = 0;
|
||||
|
||||
using (var reader = new StreamReader(mStream))
|
||||
{
|
||||
/// Encrypt and write to file 'Program.LocalSettingsFileName'
|
||||
int data;
|
||||
while ((data = mStream.ReadByte()) != -1) cs.WriteByte((byte)data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates history stored in a string array by a new latest string.
|
||||
/// </summary>
|
||||
/// <param name="lastStrValue">Last entered string</param>
|
||||
/// <returns>true = history updated</returns>
|
||||
public static bool UpdateHistory(string lastStrValue, ref string[] history)
|
||||
{
|
||||
const int MaxHistoryLen = 10;
|
||||
|
||||
if (string.IsNullOrEmpty(lastStrValue)) return false;
|
||||
|
||||
int currentHistoryLength = (history != null) ? history.Length : 0;
|
||||
|
||||
int match = -1;
|
||||
for (int i = 0; i < currentHistoryLength; i++)
|
||||
{
|
||||
if (history[i] == lastStrValue)
|
||||
{
|
||||
match = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (match >= 0 || currentHistoryLength >= MaxHistoryLen)
|
||||
{
|
||||
/// History does not have to be extended (because of a match) or should not be extended (because of the lenght)
|
||||
if (match < 0) match = currentHistoryLength - 1;
|
||||
|
||||
for (int j = match; j > 0; j--)
|
||||
{
|
||||
history[j] = history[j - 1];
|
||||
}
|
||||
history[0] = lastStrValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// History wiil be extended, new item inserted at the beginning
|
||||
string[] newHistory = new string[currentHistoryLength + 1];
|
||||
newHistory[0] = lastStrValue;
|
||||
for (int j = 1; j <= currentHistoryLength; j++)
|
||||
{
|
||||
newHistory[j] = history[j - 1];
|
||||
}
|
||||
history = newHistory;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
|
||||
/// </summary>
|
||||
/// <param name="comboBox">Puchase order ComboBox</param>
|
||||
public static void PrepareCombo(string[] history, System.Windows.Forms.ComboBox comboBox)
|
||||
{
|
||||
if (history != null)
|
||||
{
|
||||
for (int i = 0; i < history.Length; i++)
|
||||
{
|
||||
comboBox.Items.Add(history[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (comboBox.Items.Count > 0)
|
||||
{
|
||||
comboBox.Text = comboBox.Items[0].ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public enum Mode
|
||||
{
|
||||
Standalone,
|
||||
WithDatabase,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{7DF40C07-9A1D-403B-91D3-D45660E6D3B1}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OrderManagement</RootNamespace>
|
||||
<AssemblyName>OrderManagement</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>OrderManagement.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentNHibernate">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Gma.QrCodeNet.Encoding">
|
||||
<HintPath>..\packages\QrCode.Net.0.4.0.0\net40\Gma.QrCodeNet.Encoding.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections">
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate">
|
||||
<HintPath>..\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="EditParametersCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="EditParametersCtrl.designer.cs">
|
||||
<DependentUpon>EditParametersCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EditOrderDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="EditOrderDlg.Designer.cs">
|
||||
<DependentUpon>EditOrderDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OrderPrintDocument.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LocalSettings.cs" />
|
||||
<Compile Include="OrderManagementDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OrderManagementDlg.Designer.cs">
|
||||
<DependentUpon>OrderManagementDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OrderStateDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OrderStateDlg.Designer.cs">
|
||||
<DependentUpon>OrderStateDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\Strings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Strings.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SettingsDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SettingsDlg.designer.cs">
|
||||
<DependentUpon>SettingsDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="EditParametersCtrl.resx">
|
||||
<DependentUpon>EditParametersCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="EditOrderDlg.resx">
|
||||
<DependentUpon>EditOrderDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="OrderManagementDlg.resx">
|
||||
<DependentUpon>OrderManagementDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="OrderStateDlg.resx">
|
||||
<DependentUpon>OrderStateDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.sk.resx" />
|
||||
<EmbeddedResource Include="SettingsDlg.resx">
|
||||
<DependentUpon>SettingsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Common\Common.csproj">
|
||||
<Project>{c8939821-ba5c-4988-a3d0-bf53b74865c7}</Project>
|
||||
<Name>Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\GenCode128\GenCode128.csproj">
|
||||
<Project>{32817bf9-e380-4467-9c7f-936f4b122bc7}</Project>
|
||||
<Name>GenCode128</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SharedDatabase\SharedDatabase.csproj">
|
||||
<Project>{211b5e3f-9996-48a7-abde-c878dd2d71c2}</Project>
|
||||
<Name>SharedDatabase</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="SampleConfig\log4netConfig.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
+208
@@ -0,0 +1,208 @@
|
||||
namespace OrderManagement
|
||||
{
|
||||
partial class OrderManagementDlg
|
||||
{
|
||||
/// <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 Windows Form 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.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.listViewEx1 = new Common.Forms.ListViewEx();
|
||||
this.printButton = new System.Windows.Forms.Button();
|
||||
this.addButton = new System.Windows.Forms.Button();
|
||||
this.editButton = new System.Windows.Forms.Button();
|
||||
this.closeButton = new System.Windows.Forms.Button();
|
||||
this.deleteButton = new System.Windows.Forms.Button();
|
||||
this.copyButton = new System.Windows.Forms.Button();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.settingsToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(1349, 24);
|
||||
this.menuStrip1.TabIndex = 0;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// settingsToolStripMenuItem
|
||||
//
|
||||
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
|
||||
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
|
||||
this.settingsToolStripMenuItem.Text = "Settings";
|
||||
this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click);
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 24);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.listViewEx1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.copyButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.printButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.addButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.editButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.closeButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.deleteButton);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1349, 481);
|
||||
this.splitContainer1.SplitterDistance = 1214;
|
||||
this.splitContainer1.TabIndex = 1;
|
||||
//
|
||||
// listViewEx1
|
||||
//
|
||||
this.listViewEx1.AllowColumnReorder = true;
|
||||
this.listViewEx1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listViewEx1.DoubleClickActivation = false;
|
||||
this.listViewEx1.FullRowSelect = true;
|
||||
this.listViewEx1.GridLines = true;
|
||||
this.listViewEx1.Location = new System.Drawing.Point(0, 0);
|
||||
this.listViewEx1.Name = "listViewEx1";
|
||||
this.listViewEx1.Size = new System.Drawing.Size(1214, 481);
|
||||
this.listViewEx1.TabIndex = 0;
|
||||
this.listViewEx1.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewEx1.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx1.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listViewEx1_ColumnClick);
|
||||
this.listViewEx1.DoubleClick += new System.EventHandler(this.listViewEx1_DoubleClick);
|
||||
//
|
||||
// printButton
|
||||
//
|
||||
this.printButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.printButton.Location = new System.Drawing.Point(23, 290);
|
||||
this.printButton.Name = "printButton";
|
||||
this.printButton.Size = new System.Drawing.Size(85, 40);
|
||||
this.printButton.TabIndex = 6;
|
||||
this.printButton.Text = "Print";
|
||||
this.printButton.UseVisualStyleBackColor = true;
|
||||
this.printButton.Click += new System.EventHandler(this.printButton_Click);
|
||||
//
|
||||
// addButton
|
||||
//
|
||||
this.addButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.addButton.Location = new System.Drawing.Point(23, 88);
|
||||
this.addButton.Name = "addButton";
|
||||
this.addButton.Size = new System.Drawing.Size(85, 40);
|
||||
this.addButton.TabIndex = 2;
|
||||
this.addButton.Text = "Add";
|
||||
this.addButton.UseVisualStyleBackColor = true;
|
||||
this.addButton.Click += new System.EventHandler(this.addButton_Click);
|
||||
//
|
||||
// editButton
|
||||
//
|
||||
this.editButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.editButton.Location = new System.Drawing.Point(23, 133);
|
||||
this.editButton.Name = "editButton";
|
||||
this.editButton.Size = new System.Drawing.Size(85, 40);
|
||||
this.editButton.TabIndex = 3;
|
||||
this.editButton.Text = "Edit";
|
||||
this.editButton.UseVisualStyleBackColor = true;
|
||||
this.editButton.Click += new System.EventHandler(this.editButton_Click);
|
||||
//
|
||||
// closeButton
|
||||
//
|
||||
this.closeButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.closeButton.Location = new System.Drawing.Point(23, 21);
|
||||
this.closeButton.Name = "closeButton";
|
||||
this.closeButton.Size = new System.Drawing.Size(85, 40);
|
||||
this.closeButton.TabIndex = 4;
|
||||
this.closeButton.Text = "Close";
|
||||
this.closeButton.UseVisualStyleBackColor = true;
|
||||
this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
|
||||
//
|
||||
// deleteButton
|
||||
//
|
||||
this.deleteButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.deleteButton.Location = new System.Drawing.Point(23, 223);
|
||||
this.deleteButton.Name = "deleteButton";
|
||||
this.deleteButton.Size = new System.Drawing.Size(85, 40);
|
||||
this.deleteButton.TabIndex = 5;
|
||||
this.deleteButton.Text = "Delete";
|
||||
this.deleteButton.UseVisualStyleBackColor = true;
|
||||
this.deleteButton.Click += new System.EventHandler(this.deleteButton_Click);
|
||||
//
|
||||
// copyButton
|
||||
//
|
||||
this.copyButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.copyButton.Location = new System.Drawing.Point(23, 178);
|
||||
this.copyButton.Name = "copyButton";
|
||||
this.copyButton.Size = new System.Drawing.Size(85, 40);
|
||||
this.copyButton.TabIndex = 7;
|
||||
this.copyButton.Text = "Copy";
|
||||
this.copyButton.UseVisualStyleBackColor = true;
|
||||
this.copyButton.Click += new System.EventHandler(this.copyButton_Click);
|
||||
//
|
||||
// OrderManagementDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoScroll = true;
|
||||
this.ClientSize = new System.Drawing.Size(1349, 505);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "OrderManagementDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Order Management";
|
||||
this.Load += new System.EventHandler(this.OrderManagementDlg_Load);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.Button addButton;
|
||||
private System.Windows.Forms.Button editButton;
|
||||
private System.Windows.Forms.Button closeButton;
|
||||
private System.Windows.Forms.Button deleteButton;
|
||||
private Common.Forms.ListViewEx listViewEx1;
|
||||
private System.Windows.Forms.Button printButton;
|
||||
private System.Windows.Forms.Button copyButton;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,389 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Common;
|
||||
using SharedDatabase.Entities;
|
||||
using OrderManagement.Resources;
|
||||
using Common.Forms;
|
||||
|
||||
namespace OrderManagement
|
||||
{
|
||||
public partial class OrderManagementDlg : Form
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(OrderManagementDlg));
|
||||
|
||||
public const int MaxPredefinedOrderNr = 1000;
|
||||
|
||||
ISession session;
|
||||
IList<OrderInfo> listOfOrders;
|
||||
IList<Process> listOfWorkflows;
|
||||
|
||||
MySortOrder sortOrder = MySortOrder.Ascending;
|
||||
int sortColumn = -1; /// 0-based index of column to be used for sorting
|
||||
|
||||
public OrderManagementDlg()
|
||||
{
|
||||
try
|
||||
{
|
||||
string culture = Program.LocalSettings.Language.Replace('_', '-');
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(culture);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Selected language is not supported.\nUsing English.",
|
||||
"Warning", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture =
|
||||
new System.Globalization.CultureInfo("en");
|
||||
}
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
Text = string.Format("{0} v.{1}", Program.ProgramName, Program.Version); ;
|
||||
}
|
||||
|
||||
public OrderManagementDlg(ISession session, IList<OrderInfo> listOfOrders, IList<Process> listOfWorkflows)
|
||||
: this()
|
||||
{
|
||||
this.session = session;
|
||||
this.listOfOrders = listOfOrders;
|
||||
this.listOfWorkflows = listOfWorkflows;
|
||||
}
|
||||
|
||||
private void OrderManagementDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
InitializeColumns(listViewEx1);
|
||||
if (Program.LocalSettings.IsShowPredefinedOrders)
|
||||
{
|
||||
foreach (var oi in listOfOrders) AddRow(listViewEx1, oi);
|
||||
}
|
||||
else
|
||||
{
|
||||
int orderNr;
|
||||
foreach (var oi in listOfOrders)
|
||||
{
|
||||
if (int.TryParse(oi.POName, out orderNr) && orderNr > MaxPredefinedOrderNr)
|
||||
{
|
||||
AddRow(listViewEx1, oi);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
settingsToolStripMenuItem.Text = Strings.Settings;
|
||||
}
|
||||
|
||||
enum Clmn
|
||||
{
|
||||
Order,
|
||||
State,
|
||||
Workflow,
|
||||
Procedure,
|
||||
Variant,
|
||||
VacoDescr,
|
||||
MadeInText,
|
||||
ModuleParam,
|
||||
LaserMarking,
|
||||
Packing,
|
||||
Pieces,
|
||||
SNPrefix,
|
||||
SNFirst,
|
||||
SNDigitsCount,
|
||||
SNSuffix,
|
||||
RAPrefix,
|
||||
RAFirst,
|
||||
RASuffix,
|
||||
Remark,
|
||||
Count
|
||||
}
|
||||
|
||||
void InitializeColumns(ListView lv)
|
||||
{
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Order, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.State, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Workflow, Width = 150 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Test_procedure, Width = 150 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Variant_code, Width = 150 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Variant_description, Width = 150 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Made_in_text, Width = 150 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Module_parameter, Width = 150 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Laser_marking, Width = 150 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Packing, Width = 150 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Pieces_count, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.SN + " " + Strings.prefix, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.SN + " " + Strings.first, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.SN + " " + Strings.digits_count, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.SN + " " + Strings.suffix, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.RA + " " + Strings.prefix, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.RA + " " + Strings.first, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.RA + " " + Strings.suffix, Width = 80 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Remark, Width = 200 });
|
||||
}
|
||||
|
||||
void AddRow(ListView lv, OrderInfo o)
|
||||
{
|
||||
ListViewItem lvi = new ListViewItem(o.POName);
|
||||
lvi.SubItems.Add(((OrderState)o.POState).ToString());
|
||||
lvi.SubItems.Add(o.Workflow);
|
||||
lvi.SubItems.Add(o.TestProcedure);
|
||||
lvi.SubItems.Add(o.VariantCode);
|
||||
lvi.SubItems.Add(o.VacoDescription);
|
||||
lvi.SubItems.Add(o.MadeInText);
|
||||
lvi.SubItems.Add(o.ModuleParam);
|
||||
lvi.SubItems.Add(o.LaserMarking);
|
||||
lvi.SubItems.Add(o.Packing);
|
||||
lvi.SubItems.Add(o.PiecesCount.ToString());
|
||||
lvi.SubItems.Add(o.SNPrefix);
|
||||
lvi.SubItems.Add(o.SNFirst.ToString(string.Format("D{0}", o.SNDigitsCount)));
|
||||
lvi.SubItems.Add(o.SNDigitsCount.ToString());
|
||||
lvi.SubItems.Add(o.SNSuffix);
|
||||
lvi.SubItems.Add(o.RAPrefix);
|
||||
lvi.SubItems.Add(o.RAFirst.ToString("D9"));
|
||||
lvi.SubItems.Add(o.RASuffix);
|
||||
lvi.SubItems.Add(o.Remark);
|
||||
lvi.Tag = o;
|
||||
lv.Items.Add(lvi);
|
||||
}
|
||||
|
||||
void UpdateRow(ListViewItem lvi, OrderInfo o)
|
||||
{
|
||||
int i = 0;
|
||||
lvi.SubItems[i++].Text = o.POName;
|
||||
lvi.SubItems[i++].Text = ((OrderState)o.POState).ToString();
|
||||
lvi.SubItems[i++].Text = o.Workflow;
|
||||
lvi.SubItems[i++].Text = o.TestProcedure;
|
||||
lvi.SubItems[i++].Text = o.VariantCode;
|
||||
lvi.SubItems[i++].Text = o.VacoDescription;
|
||||
lvi.SubItems[i++].Text = o.MadeInText;
|
||||
lvi.SubItems[i++].Text = o.ModuleParam;
|
||||
lvi.SubItems[i++].Text = o.LaserMarking;
|
||||
lvi.SubItems[i++].Text = o.Packing;
|
||||
lvi.SubItems[i++].Text = o.PiecesCount.ToString();
|
||||
lvi.SubItems[i++].Text = o.SNPrefix;
|
||||
lvi.SubItems[i++].Text = o.SNFirst.ToString(string.Format("D{0}", o.SNDigitsCount));
|
||||
lvi.SubItems[i++].Text = o.SNDigitsCount.ToString();
|
||||
lvi.SubItems[i++].Text = o.SNSuffix;
|
||||
lvi.SubItems[i++].Text = o.RAPrefix;
|
||||
lvi.SubItems[i++].Text = o.RAFirst.ToString("D9");
|
||||
lvi.SubItems[i++].Text = o.RASuffix;
|
||||
lvi.SubItems[i++].Text = o.Remark;
|
||||
}
|
||||
|
||||
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Common.GlobalData.RemoteUsersDB = new Common.DBSettings(Common.DBType.MySql, Program.LocalSettings.UsersDBConnString);
|
||||
|
||||
DialogResult dr = new SharedDatabase.Forms.LoginDlg().ShowDialog();
|
||||
if (dr != DialogResult.OK) return;
|
||||
|
||||
dr = new SettingsDlg(Program.LocalSettings).ShowDialog();
|
||||
if (dr == DialogResult.OK)
|
||||
{
|
||||
Program.LocalSettings.Save();
|
||||
MessageBox.Show(Strings.Program_restart_is_required);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Failed to connect to the database of users: {0}", exc.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void closeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void addButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
///
|
||||
/// Determine the next production order name
|
||||
///
|
||||
string candidatePOName = string.Empty;
|
||||
int candidatePONr;
|
||||
foreach (var o in listOfOrders)
|
||||
{
|
||||
if (string.Compare(candidatePOName, o.POName, StringComparison.InvariantCulture) < 0) candidatePOName = o.POName;
|
||||
}
|
||||
if (int.TryParse(candidatePOName, out candidatePONr))
|
||||
{
|
||||
candidatePONr++;
|
||||
candidatePOName = candidatePONr.ToString(string.Format("D{0}", candidatePOName.Length));
|
||||
}
|
||||
|
||||
///
|
||||
/// Create and edit the order
|
||||
///
|
||||
var order = new OrderInfo(candidatePOName);
|
||||
|
||||
if (new EditOrderDlg(session, order, listOfOrders, Program.LocalSettings.IsShowPredefinedOrders).ShowDialog()
|
||||
== DialogResult.OK)
|
||||
{
|
||||
listOfOrders.Add(order);
|
||||
AddRow(listViewEx1, order);
|
||||
}
|
||||
}
|
||||
|
||||
private void listViewEx1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewEx1.SelectedItems.Count != 1 || !(listViewEx1.SelectedItems[0].Tag is OrderInfo)) return;
|
||||
|
||||
OrderInfo order = listViewEx1.SelectedItems[0].Tag as OrderInfo;
|
||||
if (order.POState == (sbyte)OrderState.New)
|
||||
{
|
||||
editButton_Click(sender, e);
|
||||
}
|
||||
else
|
||||
{
|
||||
new OrderStateDlg(session, order).ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void editButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewEx1.SelectedItems.Count != 1 || !(listViewEx1.SelectedItems[0].Tag is OrderInfo)) return;
|
||||
|
||||
OrderInfo order = listViewEx1.SelectedItems[0].Tag as OrderInfo;
|
||||
if (order.POState == (sbyte)OrderState.New)
|
||||
{
|
||||
if (new EditOrderDlg(session, order, listOfOrders, Program.LocalSettings.IsShowPredefinedOrders, true).ShowDialog()
|
||||
== DialogResult.OK)
|
||||
{
|
||||
UpdateRow(listViewEx1.SelectedItems[0], order);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(Strings.You_can_only_edit_New_porduction_orders);
|
||||
}
|
||||
}
|
||||
|
||||
private void copyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewEx1.SelectedItems.Count != 1 || !(listViewEx1.SelectedItems[0].Tag is OrderInfo)) return;
|
||||
OrderInfo oriOrder = listViewEx1.SelectedItems[0].Tag as OrderInfo;
|
||||
|
||||
///
|
||||
/// Determine the next production order name
|
||||
///
|
||||
string candidatePOName = string.Empty;
|
||||
int candidatePONr;
|
||||
foreach (var o in listOfOrders)
|
||||
{
|
||||
if (string.Compare(candidatePOName, o.POName, StringComparison.InvariantCulture) < 0) candidatePOName = o.POName;
|
||||
}
|
||||
if (int.TryParse(candidatePOName, out candidatePONr))
|
||||
{
|
||||
candidatePONr++;
|
||||
candidatePOName = candidatePONr.ToString(string.Format("D{0}", candidatePOName.Length));
|
||||
}
|
||||
|
||||
///
|
||||
/// Create and edit the order
|
||||
///
|
||||
OrderInfo newOrder = oriOrder.Clone() as OrderInfo;
|
||||
newOrder.POName = candidatePOName;
|
||||
newOrder.POState = (sbyte)OrderState.New;
|
||||
newOrder.SNFirst = oriOrder.SNFirst + oriOrder.PiecesCount; /// TODO
|
||||
newOrder.RAFirst = oriOrder.RAFirst + oriOrder.PiecesCount; /// TODO
|
||||
newOrder.BaseNr1 = 0;
|
||||
newOrder.BaseNr2 = 0;
|
||||
newOrder.BaseNr3 = 0;
|
||||
newOrder.BaseNr4 = 0;
|
||||
newOrder.BaseNr5 = 0;
|
||||
newOrder.CurrentPcsCount = 0;
|
||||
newOrder.CurrentSN = 0;
|
||||
newOrder.CurrentRA = 0;
|
||||
newOrder.CurrentNr1 = 0;
|
||||
newOrder.CurrentNr2 = 0;
|
||||
newOrder.CurrentNr3 = 0;
|
||||
newOrder.CurrentNr4 = 0;
|
||||
newOrder.CurrentNr5 = 0;
|
||||
newOrder.Remark = string.Format("Copy of order {0}", oriOrder.POName);
|
||||
|
||||
if (new EditOrderDlg(session, newOrder, listOfOrders, Program.LocalSettings.IsShowPredefinedOrders).ShowDialog()
|
||||
== DialogResult.OK)
|
||||
{
|
||||
listOfOrders.Add(newOrder);
|
||||
AddRow(listViewEx1, newOrder);
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewEx1.SelectedItems.Count != 1 || !(listViewEx1.SelectedItems[0].Tag is OrderInfo)) return;
|
||||
|
||||
OrderInfo order = listViewEx1.SelectedItems[0].Tag as OrderInfo;
|
||||
if (order.POState == (sbyte)OrderState.New)
|
||||
{
|
||||
if (MessageBox.Show(Strings.Are_you_sure, Strings.Warning, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
|
||||
{
|
||||
try
|
||||
{
|
||||
session.Delete(order);
|
||||
session.Flush();
|
||||
listOfOrders.Remove(order);
|
||||
listViewEx1.Items.Remove(listViewEx1.SelectedItems[0]);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(string.Format("Deleting an order failed\r\n{0}", exc.Message));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(Strings.You_can_only_delete_New_porduction_orders);
|
||||
}
|
||||
}
|
||||
|
||||
private void listViewEx1_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||
{
|
||||
if (e.Column == sortColumn)
|
||||
{
|
||||
/// Clicked on the same column header => increment to the next applicable MySortOrder
|
||||
sortOrder = (sortOrder == MySortOrder.Ascending) ? MySortOrder.Descending : MySortOrder.Ascending;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Clicked on another column header => set sortOrder to MySortOrder.Ascending
|
||||
sortColumn = e.Column;
|
||||
sortOrder = MySortOrder.Ascending;
|
||||
}
|
||||
|
||||
if (sortColumn == (int)Clmn.Pieces || sortColumn == (int)Clmn.SNFirst ||
|
||||
sortColumn == (int)Clmn.SNDigitsCount || sortColumn == (int)Clmn.RAFirst)
|
||||
{
|
||||
listViewEx1.ListViewItemSorter = new LviIntColumnComparer(sortColumn, sortOrder);
|
||||
}
|
||||
else
|
||||
{
|
||||
listViewEx1.ListViewItemSorter = new LviTextColumnComparer(sortColumn, sortOrder);
|
||||
}
|
||||
|
||||
listViewEx1.SetSortIcon(sortColumn, sortOrder);
|
||||
listViewEx1.Sort();
|
||||
}
|
||||
|
||||
private void printButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewEx1.SelectedItems.Count != 1 || !(listViewEx1.SelectedItems[0].Tag is OrderInfo)) return;
|
||||
|
||||
OrderInfo order = listViewEx1.SelectedItems[0].Tag as OrderInfo;
|
||||
|
||||
new OrderPrintDocument(order).Print();
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-10
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
@@ -117,13 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Text" xml:space="preserve">
|
||||
<value>Порядок</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Пакетные данные</value>
|
||||
</data>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,165 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
using Common;
|
||||
using GenCode128;
|
||||
using Gma.QrCodeNet.Encoding;
|
||||
using SharedDatabase.Entities;
|
||||
using OrderManagement.Resources;
|
||||
|
||||
namespace OrderManagement
|
||||
{
|
||||
public class OrderPrintDocument : Common.Printers.PrintersCommon
|
||||
{
|
||||
static QrEncoder encoder = new QrEncoder();
|
||||
|
||||
// Paper size
|
||||
const bool IsLandscape = false;
|
||||
const int PaperHeight = 1400;
|
||||
const int PaperWidth = 900;
|
||||
|
||||
/// Texts
|
||||
readonly Font font = new Font("Arial", 12, FontStyle.Bold);
|
||||
const int Top = 100;
|
||||
const int Column1left = 100;
|
||||
const int Column2left = 300;
|
||||
const int Spacing = 35;
|
||||
|
||||
/// Barcode
|
||||
const bool IsQRCode = false;
|
||||
const int BarcodeLeft = 550;
|
||||
const int BarcodeTop = 100;
|
||||
const int BarcodeWidth = 200;
|
||||
const int BarcodeHeight = 75;
|
||||
|
||||
/// Data to print
|
||||
OrderInfo order;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="textToPrint">Text to be printed</param>
|
||||
public OrderPrintDocument(OrderInfo order)
|
||||
{
|
||||
DocumentName = order.POName;
|
||||
|
||||
this.order = order;
|
||||
|
||||
/// Set print area size and margins (in dots using 100 dpi)
|
||||
DefaultPageSettings.Landscape = IsLandscape;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default onbeginPrint method of the PrintDocument Object
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks></remarks>
|
||||
protected override void OnBeginPrint(System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
base.OnBeginPrint(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default OnPrintPage method of the PrintDocument.
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks>This provides the print logic for our document</remarks>
|
||||
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
{
|
||||
/// Run base code
|
||||
base.OnPrintPage(e);
|
||||
|
||||
string[] texts = new string[]
|
||||
{
|
||||
Strings.Order + " :",
|
||||
order.POName,
|
||||
Strings.Pieces_count + " :",
|
||||
order.PiecesCount.ToString(),
|
||||
Strings.First_serial_number + " :",
|
||||
string.Format("{0}{1}{2}", (order.SNPrefix != null) ? order.SNPrefix : string.Empty,
|
||||
order.SNDigitsCount != 0 ? order.SNFirst.ToString(string.Format("D{0}", order.SNDigitsCount)) : string.Empty,
|
||||
(order.SNSuffix != null) ? order.SNSuffix : string.Empty),
|
||||
Strings.Last_serial_number + " :",
|
||||
string.Format("{0}{1}{2}", (order.SNPrefix != null) ? order.SNPrefix : string.Empty,
|
||||
order.SNDigitsCount != 0 ? (order.SNFirst + order.PiecesCount - 1).ToString(string.Format("D{0}", order.SNDigitsCount)) : string.Empty,
|
||||
(order.SNSuffix != null) ? order.SNSuffix : string.Empty),
|
||||
Strings.First_radio_address + " :",
|
||||
string.Format("{0}{1}{2}", (order.RAPrefix != null) ? order.RAPrefix : string.Empty,
|
||||
order.RAFirst.ToString("D9"),
|
||||
(order.RASuffix != null) ? order.RASuffix : string.Empty),
|
||||
Strings.Last_radio_address + " :",
|
||||
string.Format("{0}{1}{2}", (order.RAPrefix != null) ? order.RAPrefix : string.Empty,
|
||||
(order.RAFirst + order.PiecesCount - 1).ToString("D9"),
|
||||
(order.RASuffix != null) ? order.RASuffix : string.Empty),
|
||||
Strings.Workflow + " :",
|
||||
(order.Workflow != null) ? order.Workflow : string.Empty,
|
||||
Strings.Test_procedure + " :",
|
||||
(order.TestProcedure != null) ? order.TestProcedure : string.Empty,
|
||||
Strings.Variant_code + " :",
|
||||
(order.VariantCode != null) ? order.VariantCode : string.Empty,
|
||||
Strings.Laser_marking + " :",
|
||||
(order.LaserMarking != null) ? order.LaserMarking : string.Empty,
|
||||
Strings.Remark + " :",
|
||||
(order.Remark != null) ? order.Remark : string.Empty,
|
||||
};
|
||||
|
||||
int lineTop = Top;
|
||||
for (int i = 0; i < texts.Length; i += 2)
|
||||
{
|
||||
e.Graphics.DrawString(texts[i], font, Brushes.Black, new RectangleF(Column1left, lineTop, PaperWidth, PaperHeight));
|
||||
e.Graphics.DrawString(texts[i + 1], font, Brushes.Black, new RectangleF(Column2left, lineTop, PaperWidth, PaperHeight));
|
||||
lineTop += Spacing;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (IsQRCode)
|
||||
{
|
||||
QrCode qrCode = encoder.Encode(order.POName);
|
||||
DrawQR(e.Graphics, qrCode, BarcodeLeft, BarcodeTop, BarcodeWidth, BarcodeHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
Image img = Code128Rendering.MakeBarcodeImage(order.POName, 1, true);
|
||||
#if VERTICAL_BARCODE
|
||||
img.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
#endif
|
||||
e.Graphics.DrawImage(img, BarcodeLeft, BarcodeTop, BarcodeWidth, BarcodeHeight);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static void DrawQR(Graphics g, QrCode qrCode, float left, float top, float width, float height)
|
||||
{
|
||||
/// Assuming 100 dpi (printer)
|
||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
|
||||
float qrPixWidth = width / qrCode.Matrix.Width;
|
||||
float qrPixHeight = height / qrCode.Matrix.Height;
|
||||
for (int i = 0; i < qrCode.Matrix.Height; i++)
|
||||
{
|
||||
for (int j = 0; j < qrCode.Matrix.Width; j++)
|
||||
{
|
||||
if (qrCode.Matrix[j, i])
|
||||
{
|
||||
g.FillRectangle(Brushes.Black, new RectangleF(left + j * qrPixWidth,
|
||||
top + i * qrPixHeight,
|
||||
qrPixWidth,
|
||||
qrPixHeight));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
namespace OrderManagement
|
||||
{
|
||||
partial class OrderStateDlg
|
||||
{
|
||||
/// <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 Windows Form 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.orderLabel = new System.Windows.Forms.Label();
|
||||
this.orderTextBox = new System.Windows.Forms.TextBox();
|
||||
this.stateLabel = new System.Windows.Forms.Label();
|
||||
this.stateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.targetPcsCountLabel = new System.Windows.Forms.Label();
|
||||
this.producedPcsCountLabel = new System.Windows.Forms.Label();
|
||||
this.targetPcsCountTextBox = new System.Windows.Forms.TextBox();
|
||||
this.producedPcsCountTextBox = new System.Windows.Forms.TextBox();
|
||||
this.currentSnTextBox = new System.Windows.Forms.TextBox();
|
||||
this.currentSnLabel = new System.Windows.Forms.Label();
|
||||
this.currentRATextBox = new System.Windows.Forms.TextBox();
|
||||
this.currentRALabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// orderLabel
|
||||
//
|
||||
this.orderLabel.AutoSize = true;
|
||||
this.orderLabel.Location = new System.Drawing.Point(28, 26);
|
||||
this.orderLabel.Name = "orderLabel";
|
||||
this.orderLabel.Size = new System.Drawing.Size(33, 13);
|
||||
this.orderLabel.TabIndex = 0;
|
||||
this.orderLabel.Text = "Order";
|
||||
//
|
||||
// orderTextBox
|
||||
//
|
||||
this.orderTextBox.Enabled = false;
|
||||
this.orderTextBox.Location = new System.Drawing.Point(191, 23);
|
||||
this.orderTextBox.Name = "orderTextBox";
|
||||
this.orderTextBox.Size = new System.Drawing.Size(131, 20);
|
||||
this.orderTextBox.TabIndex = 1;
|
||||
//
|
||||
// stateLabel
|
||||
//
|
||||
this.stateLabel.AutoSize = true;
|
||||
this.stateLabel.Location = new System.Drawing.Point(28, 56);
|
||||
this.stateLabel.Name = "stateLabel";
|
||||
this.stateLabel.Size = new System.Drawing.Size(32, 13);
|
||||
this.stateLabel.TabIndex = 2;
|
||||
this.stateLabel.Text = "State";
|
||||
//
|
||||
// stateTextBox
|
||||
//
|
||||
this.stateTextBox.Enabled = false;
|
||||
this.stateTextBox.Location = new System.Drawing.Point(191, 53);
|
||||
this.stateTextBox.Name = "stateTextBox";
|
||||
this.stateTextBox.Size = new System.Drawing.Size(131, 20);
|
||||
this.stateTextBox.TabIndex = 3;
|
||||
//
|
||||
// targetPcsCountLabel
|
||||
//
|
||||
this.targetPcsCountLabel.AutoSize = true;
|
||||
this.targetPcsCountLabel.Location = new System.Drawing.Point(28, 86);
|
||||
this.targetPcsCountLabel.Name = "targetPcsCountLabel";
|
||||
this.targetPcsCountLabel.Size = new System.Drawing.Size(78, 13);
|
||||
this.targetPcsCountLabel.TabIndex = 4;
|
||||
this.targetPcsCountLabel.Text = "Target quantity";
|
||||
//
|
||||
// producedPcsCountLabel
|
||||
//
|
||||
this.producedPcsCountLabel.AutoSize = true;
|
||||
this.producedPcsCountLabel.Location = new System.Drawing.Point(28, 116);
|
||||
this.producedPcsCountLabel.Name = "producedPcsCountLabel";
|
||||
this.producedPcsCountLabel.Size = new System.Drawing.Size(93, 13);
|
||||
this.producedPcsCountLabel.TabIndex = 5;
|
||||
this.producedPcsCountLabel.Text = "Produced quantity";
|
||||
//
|
||||
// targetPcsCountTextBox
|
||||
//
|
||||
this.targetPcsCountTextBox.Enabled = false;
|
||||
this.targetPcsCountTextBox.Location = new System.Drawing.Point(191, 83);
|
||||
this.targetPcsCountTextBox.Name = "targetPcsCountTextBox";
|
||||
this.targetPcsCountTextBox.Size = new System.Drawing.Size(131, 20);
|
||||
this.targetPcsCountTextBox.TabIndex = 6;
|
||||
//
|
||||
// producedPcsCountTextBox
|
||||
//
|
||||
this.producedPcsCountTextBox.Enabled = false;
|
||||
this.producedPcsCountTextBox.Location = new System.Drawing.Point(191, 113);
|
||||
this.producedPcsCountTextBox.Name = "producedPcsCountTextBox";
|
||||
this.producedPcsCountTextBox.Size = new System.Drawing.Size(131, 20);
|
||||
this.producedPcsCountTextBox.TabIndex = 7;
|
||||
//
|
||||
// currentSnTextBox
|
||||
//
|
||||
this.currentSnTextBox.Enabled = false;
|
||||
this.currentSnTextBox.Location = new System.Drawing.Point(191, 143);
|
||||
this.currentSnTextBox.Name = "currentSnTextBox";
|
||||
this.currentSnTextBox.Size = new System.Drawing.Size(131, 20);
|
||||
this.currentSnTextBox.TabIndex = 9;
|
||||
//
|
||||
// currentSnLabel
|
||||
//
|
||||
this.currentSnLabel.AutoSize = true;
|
||||
this.currentSnLabel.Location = new System.Drawing.Point(28, 146);
|
||||
this.currentSnLabel.Name = "currentSnLabel";
|
||||
this.currentSnLabel.Size = new System.Drawing.Size(95, 13);
|
||||
this.currentSnLabel.TabIndex = 8;
|
||||
this.currentSnLabel.Text = "Last assigned S/N";
|
||||
//
|
||||
// currentRATextBox
|
||||
//
|
||||
this.currentRATextBox.Enabled = false;
|
||||
this.currentRATextBox.Location = new System.Drawing.Point(191, 173);
|
||||
this.currentRATextBox.Name = "currentRATextBox";
|
||||
this.currentRATextBox.Size = new System.Drawing.Size(131, 20);
|
||||
this.currentRATextBox.TabIndex = 11;
|
||||
//
|
||||
// currentRALabel
|
||||
//
|
||||
this.currentRALabel.AutoSize = true;
|
||||
this.currentRALabel.Location = new System.Drawing.Point(28, 176);
|
||||
this.currentRALabel.Name = "currentRALabel";
|
||||
this.currentRALabel.Size = new System.Drawing.Size(138, 13);
|
||||
this.currentRALabel.TabIndex = 10;
|
||||
this.currentRALabel.Text = "Last assigned radio address";
|
||||
//
|
||||
// OrderStateDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(479, 219);
|
||||
this.Controls.Add(this.currentRATextBox);
|
||||
this.Controls.Add(this.currentRALabel);
|
||||
this.Controls.Add(this.currentSnTextBox);
|
||||
this.Controls.Add(this.currentSnLabel);
|
||||
this.Controls.Add(this.producedPcsCountTextBox);
|
||||
this.Controls.Add(this.targetPcsCountTextBox);
|
||||
this.Controls.Add(this.producedPcsCountLabel);
|
||||
this.Controls.Add(this.targetPcsCountLabel);
|
||||
this.Controls.Add(this.stateTextBox);
|
||||
this.Controls.Add(this.stateLabel);
|
||||
this.Controls.Add(this.orderTextBox);
|
||||
this.Controls.Add(this.orderLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "OrderStateDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Order state";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label orderLabel;
|
||||
private System.Windows.Forms.TextBox orderTextBox;
|
||||
private System.Windows.Forms.Label stateLabel;
|
||||
private System.Windows.Forms.TextBox stateTextBox;
|
||||
private System.Windows.Forms.Label targetPcsCountLabel;
|
||||
private System.Windows.Forms.Label producedPcsCountLabel;
|
||||
private System.Windows.Forms.TextBox targetPcsCountTextBox;
|
||||
private System.Windows.Forms.TextBox producedPcsCountTextBox;
|
||||
private System.Windows.Forms.TextBox currentSnTextBox;
|
||||
private System.Windows.Forms.Label currentSnLabel;
|
||||
private System.Windows.Forms.TextBox currentRATextBox;
|
||||
private System.Windows.Forms.Label currentRALabel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using NHibernate;
|
||||
using SharedDatabase.Entities;
|
||||
using OrderManagement.Resources;
|
||||
|
||||
namespace OrderManagement
|
||||
{
|
||||
public partial class OrderStateDlg : Form
|
||||
{
|
||||
ISession session;
|
||||
OrderInfo order;
|
||||
|
||||
public OrderStateDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public OrderStateDlg(ISession session,OrderInfo order)
|
||||
: this()
|
||||
{
|
||||
this.session = session;
|
||||
this.order = order;
|
||||
Localize();
|
||||
|
||||
orderTextBox.Text = order.POName;
|
||||
stateTextBox.Text = ((OrderState)order.POState).ToString();
|
||||
targetPcsCountTextBox.Text = order.PiecesCount.ToString();
|
||||
producedPcsCountTextBox.Text = order.CurrentPcsCount.ToString();
|
||||
currentSnTextBox.Text = (order.SNPrefix != null ? order.SNPrefix : string.Empty) + order.CurrentSN.ToString(string.Format("D{0}", order.SNDigitsCount))
|
||||
+ (order.SNSuffix != null ? order.SNSuffix : string.Empty);
|
||||
currentRATextBox.Text = (order.RAPrefix != null ? order.RAPrefix : string.Empty) + order.CurrentRA.ToString("D9")
|
||||
+ (order.RASuffix != null ? order.RASuffix : string.Empty);
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
orderLabel.Text = Strings.Order;
|
||||
stateLabel.Text = Strings.State;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,256 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Common;
|
||||
using SharedDatabase;
|
||||
using SharedDatabase.Entities;
|
||||
using OrderManagement.Resources;
|
||||
|
||||
namespace OrderManagement
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// Constants
|
||||
public static GID[] SettingsAccessLevel = new GID[] { GID.TraceabilityManagement }; /// Group membership to access settings
|
||||
public const string ProgramName = "Order Management";
|
||||
public const string ConfigFName = "config.xml";
|
||||
public const string BackupConfigFName = "config.backup.xml";
|
||||
public const string Log4NetConfigFName = "log4netConfig.xml";
|
||||
|
||||
/// Program information
|
||||
public static readonly string Version; /// version string
|
||||
public static readonly DateTime BuildDateTime; /// date and time of program build
|
||||
public static readonly string ExeDirectory;
|
||||
public static readonly string ConfigDirectory;
|
||||
public static readonly string LogDirectory;
|
||||
public static readonly string LocalSettingsFileName;
|
||||
public static readonly string LocalSettingsBackupName;
|
||||
|
||||
/// Local settings
|
||||
public static LocalSettings LocalSettings;
|
||||
|
||||
/// log4net
|
||||
static ILog log;
|
||||
|
||||
|
||||
static Program()
|
||||
{
|
||||
/// Program version string
|
||||
Assembly thisAssembly = Assembly.GetExecutingAssembly();
|
||||
Version ver = thisAssembly.GetName().Version;
|
||||
Version = string.Format("{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);
|
||||
BuildDateTime = new FileInfo(thisAssembly.Location).LastWriteTime;
|
||||
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
ExeDirectory = Path.GetDirectoryName(thisAssembly.Location);
|
||||
ConfigDirectory = Path.Combine(ExeDirectory, "..\\Cfg");
|
||||
LogDirectory = Path.Combine(ExeDirectory, "..", "Logs");
|
||||
LocalSettingsFileName = Path.Combine(ConfigDirectory, ConfigFName);
|
||||
LocalSettingsBackupName = Path.Combine(ConfigDirectory, BackupConfigFName);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
///
|
||||
/// Check if another instance is running
|
||||
///
|
||||
Assembly thisAssembly = Assembly.GetExecutingAssembly();
|
||||
string processName = Path.GetFileNameWithoutExtension(thisAssembly.Location);
|
||||
if (System.Diagnostics.Process.GetProcessesByName(processName).Length > 1)
|
||||
{
|
||||
MessageBox.Show(string.Format("{0}{1}{2}", string.Format(Strings.Program_0_is_running_already, ProgramName),
|
||||
Environment.NewLine,
|
||||
Strings.Close_it_please),
|
||||
Strings.Error,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Asterisk);
|
||||
return;
|
||||
}
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);
|
||||
|
||||
bool configDirectoryCreated = false;
|
||||
if (!Directory.Exists(ConfigDirectory) || new DirectoryInfo(ConfigDirectory).GetFileSystemInfos().Length == 0)
|
||||
{
|
||||
MessageBox.Show(string.Format("{0}{1}{2}", Strings.Program_is_running_for_the_1st_time_on_this_PC,
|
||||
Environment.NewLine,
|
||||
Strings.Default_settings_are_used),
|
||||
Strings.Warning,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
///
|
||||
/// Create a new config subdirectory
|
||||
///
|
||||
Directory.CreateDirectory(ConfigDirectory);
|
||||
configDirectoryCreated = true;
|
||||
|
||||
Program.LocalSettings = new LocalSettings(true);
|
||||
Program.LocalSettings.Save();
|
||||
|
||||
if (File.Exists(Path.Combine(ExeDirectory, "SampleConfig", Log4NetConfigFName)))
|
||||
{
|
||||
File.Copy(Path.Combine(ExeDirectory, "SampleConfig", Log4NetConfigFName),
|
||||
Path.Combine(ConfigDirectory, Log4NetConfigFName));
|
||||
}
|
||||
|
||||
File.SetAttributes(Path.Combine(ConfigDirectory, Log4NetConfigFName), FileAttributes.Normal);
|
||||
}
|
||||
|
||||
///
|
||||
/// Configue and start logging
|
||||
///
|
||||
log4net.Config.XmlConfigurator.Configure(new FileInfo(Path.Combine(ConfigDirectory, Log4NetConfigFName)));
|
||||
log = LogManager.GetLogger(typeof(Program));
|
||||
log.Fatal("--------------------------------------------------------------------------------");
|
||||
log.FatalFormat("{0} ver.{1}", ProgramName, Version);
|
||||
log.FatalFormat("Executable directory is {0}", ExeDirectory);
|
||||
if (configDirectoryCreated)
|
||||
{
|
||||
log.Fatal("A new config directory and configuration files created !");
|
||||
}
|
||||
|
||||
///
|
||||
/// Load the local settings
|
||||
///
|
||||
LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
if (LocalSettings == null)
|
||||
{
|
||||
/// Loading local seetings from regular config file failed. Use the backup
|
||||
LocalSettings = LocalSettings.Load(Program.LocalSettingsBackupName);
|
||||
if (LocalSettings == null)
|
||||
{
|
||||
log.FatalFormat("Local settings: Could not load file {0}, nor {1}.", ConfigFName, BackupConfigFName);
|
||||
log.Fatal("Application terminated.");
|
||||
MessageBox.Show(string.Format("Could not load file {0}, nor {1}.", ConfigFName, BackupConfigFName), "Fatal error");
|
||||
return; /// Fatal error
|
||||
}
|
||||
else
|
||||
{
|
||||
LocalSettings.Save(); /// Save the settings to overwrite the wrong file
|
||||
log.FatalFormat("Local settings: Could not load file {0}, successfully loaded {1}", ConfigFName, BackupConfigFName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Loading local seetings from the regular config file was successful. Update the backup
|
||||
File.Copy(Program.LocalSettingsFileName, Program.LocalSettingsBackupName, true);
|
||||
}
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
///
|
||||
/// User login
|
||||
///
|
||||
if (LocalSettings.IsUserLoginRequired && !string.IsNullOrEmpty(LocalSettings.UsersDBConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
Common.GlobalData.RemoteUsersDB = new DBSettings(Common.DBType.MySql, LocalSettings.UsersDBConnString);
|
||||
|
||||
DialogResult dr = new SharedDatabase.Forms.LoginDlg().ShowDialog();
|
||||
if (dr != DialogResult.OK) return;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.ErrorFormat("Failed to connect to the database of users: {0}", exc.Message);
|
||||
}
|
||||
}
|
||||
|
||||
ISession session;
|
||||
IList<OrderInfo> listOfOrders = null;
|
||||
IList<Process> listOfWorkflows = null;
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
session = SharedDatabase.TracingDB.CreateSession(LocalSettings.TracingDBConnString);
|
||||
listOfOrders = session.QueryOver<OrderInfo>()
|
||||
.List();
|
||||
listOfWorkflows = session.QueryOver<Process>()
|
||||
.Where(x => x.ReleaseStatus != ReleaseStatus.Deactivated)
|
||||
.List();
|
||||
break;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
log.FatalFormat("Failed to connect to production tracing database: {0}", exc.Message);
|
||||
if (exc.InnerException != null)
|
||||
{
|
||||
log.FatalFormat("InnerException: {0}", exc.InnerException.Message);
|
||||
}
|
||||
|
||||
MessageBox.Show(string.Format("Failed to connect to production tracing database:{0}{1}", Environment.NewLine, exc.Message));
|
||||
|
||||
if (new SettingsDlg(Program.LocalSettings).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
LocalSettings.Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
OrderManagementDlg dlg = new OrderManagementDlg(session, listOfOrders, listOfWorkflows);
|
||||
Application.Run(dlg);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LogException(log, "Exception in Application.Run(MainWnd)", e);
|
||||
|
||||
MessageBox.Show("Program crashed:" +
|
||||
Environment.NewLine + Environment.NewLine + e.Message +
|
||||
((e.InnerException == null) ? string.Empty : (Environment.NewLine + e.InnerException.Message)) +
|
||||
Environment.NewLine + e.StackTrace,
|
||||
"Fatal error",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void MyHandler(object sender, UnhandledExceptionEventArgs args)
|
||||
{
|
||||
Exception e = args.ExceptionObject as Exception;
|
||||
if (e == null) return;
|
||||
|
||||
LogException(log, "Unhandled exception", e);
|
||||
|
||||
MessageBox.Show("Program crashed:" +
|
||||
Environment.NewLine + Environment.NewLine + e.Message +
|
||||
((e.InnerException == null) ? string.Empty : (Environment.NewLine + e.InnerException.Message)) +
|
||||
Environment.NewLine + e.StackTrace,
|
||||
"Fatal error",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
}
|
||||
|
||||
static void LogException(ILog log, string description, Exception e)
|
||||
{
|
||||
log.FatalFormat("---------------( {0} )---------------", description);
|
||||
log.FatalFormat("Message : {0}", e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
log.FatalFormat("InnerMessage : {0}", e.InnerException.Message);
|
||||
}
|
||||
log.FatalFormat("StackTrace : {0}{1}", Environment.NewLine, e.StackTrace);
|
||||
log.Fatal("--------------------------------------");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OrderManagement")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("OrderManagement")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("f6b32e4f-1445-4970-bafa-dcd39d36f9b3")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.9.0")]
|
||||
[assembly: AssemblyFileVersion("3.0.9.0")]
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OrderManagement.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OrderManagement.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OrderManagement.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
+531
@@ -0,0 +1,531 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OrderManagement.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Strings {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Strings() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OrderManagement.Resources.Strings", typeof(Strings).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Abort creating an order?.
|
||||
/// </summary>
|
||||
internal static string Abort_creating_an_order_QM {
|
||||
get {
|
||||
return ResourceManager.GetString("Abort_creating_an_order_QM", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Are you sure ?.
|
||||
/// </summary>
|
||||
internal static string Are_you_sure {
|
||||
get {
|
||||
return ResourceManager.GetString("Are_you_sure", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cancel.
|
||||
/// </summary>
|
||||
internal static string Cancel {
|
||||
get {
|
||||
return ResourceManager.GetString("Cancel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Close it please using 'Task manager'.
|
||||
/// </summary>
|
||||
internal static string Close_it_please {
|
||||
get {
|
||||
return ResourceManager.GetString("Close_it_please", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Connection string for production tracing database.
|
||||
/// </summary>
|
||||
internal static string Connection_string_tracing_DB {
|
||||
get {
|
||||
return ResourceManager.GetString("Connection_string_tracing_DB", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Connection string for database of users.
|
||||
/// </summary>
|
||||
internal static string Connection_string_users_DB {
|
||||
get {
|
||||
return ResourceManager.GetString("Connection_string_users_DB", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Database.
|
||||
/// </summary>
|
||||
internal static string Database {
|
||||
get {
|
||||
return ResourceManager.GetString("Database", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Default settings are used..
|
||||
/// </summary>
|
||||
internal static string Default_settings_are_used {
|
||||
get {
|
||||
return ResourceManager.GetString("Default_settings_are_used", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to digits count.
|
||||
/// </summary>
|
||||
internal static string digits_count {
|
||||
get {
|
||||
return ResourceManager.GetString("digits_count", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error.
|
||||
/// </summary>
|
||||
internal static string Error {
|
||||
get {
|
||||
return ResourceManager.GetString("Error", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to first.
|
||||
/// </summary>
|
||||
internal static string first {
|
||||
get {
|
||||
return ResourceManager.GetString("first", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to First radio address.
|
||||
/// </summary>
|
||||
internal static string First_radio_address {
|
||||
get {
|
||||
return ResourceManager.GetString("First_radio_address", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to First serial number.
|
||||
/// </summary>
|
||||
internal static string First_serial_number {
|
||||
get {
|
||||
return ResourceManager.GetString("First_serial_number", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid '{0}'.
|
||||
/// </summary>
|
||||
internal static string Invalid_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to It is not recommended that orders start with '3'..
|
||||
/// </summary>
|
||||
internal static string It_is_not_recommended_that_orders_start_with_3 {
|
||||
get {
|
||||
return ResourceManager.GetString("It_is_not_recommended_that_orders_start_with_3", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Language, 语言, Sprache, jazyk.
|
||||
/// </summary>
|
||||
internal static string Language_etc {
|
||||
get {
|
||||
return ResourceManager.GetString("Language_etc", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Laser marking.
|
||||
/// </summary>
|
||||
internal static string Laser_marking {
|
||||
get {
|
||||
return ResourceManager.GetString("Laser_marking", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Last radio address.
|
||||
/// </summary>
|
||||
internal static string Last_radio_address {
|
||||
get {
|
||||
return ResourceManager.GetString("Last_radio_address", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Last serial number.
|
||||
/// </summary>
|
||||
internal static string Last_serial_number {
|
||||
get {
|
||||
return ResourceManager.GetString("Last_serial_number", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Made in text.
|
||||
/// </summary>
|
||||
internal static string Made_in_text {
|
||||
get {
|
||||
return ResourceManager.GetString("Made_in_text", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Module parameter.
|
||||
/// </summary>
|
||||
internal static string Module_parameter {
|
||||
get {
|
||||
return ResourceManager.GetString("Module_parameter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to OK.
|
||||
/// </summary>
|
||||
internal static string OK {
|
||||
get {
|
||||
return ResourceManager.GetString("OK", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Order.
|
||||
/// </summary>
|
||||
internal static string Order {
|
||||
get {
|
||||
return ResourceManager.GetString("Order", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Order number must be larger then {0}.
|
||||
/// </summary>
|
||||
internal static string Order_number_must_be_larger_then_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Order_number_must_be_larger_then_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Order with the same ID already exists.
|
||||
/// </summary>
|
||||
internal static string Order_with_the_same_ID_already_exists {
|
||||
get {
|
||||
return ResourceManager.GetString("Order_with_the_same_ID_already_exists", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Packing.
|
||||
/// </summary>
|
||||
internal static string Packing {
|
||||
get {
|
||||
return ResourceManager.GetString("Packing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Parameter.
|
||||
/// </summary>
|
||||
internal static string Parameter {
|
||||
get {
|
||||
return ResourceManager.GetString("Parameter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pieces count.
|
||||
/// </summary>
|
||||
internal static string Pieces_count {
|
||||
get {
|
||||
return ResourceManager.GetString("Pieces_count", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to prefix.
|
||||
/// </summary>
|
||||
internal static string prefix {
|
||||
get {
|
||||
return ResourceManager.GetString("prefix", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Producton order properties.
|
||||
/// </summary>
|
||||
internal static string Producton_order_properties {
|
||||
get {
|
||||
return ResourceManager.GetString("Producton_order_properties", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Program '{0}' is running already..
|
||||
/// </summary>
|
||||
internal static string Program_0_is_running_already {
|
||||
get {
|
||||
return ResourceManager.GetString("Program_0_is_running_already", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Program is running for the 1st time on this PC..
|
||||
/// </summary>
|
||||
internal static string Program_is_running_for_the_1st_time_on_this_PC {
|
||||
get {
|
||||
return ResourceManager.GetString("Program_is_running_for_the_1st_time_on_this_PC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Program restart is required.
|
||||
/// </summary>
|
||||
internal static string Program_restart_is_required {
|
||||
get {
|
||||
return ResourceManager.GetString("Program_restart_is_required", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to R.A..
|
||||
/// </summary>
|
||||
internal static string RA {
|
||||
get {
|
||||
return ResourceManager.GetString("RA", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Remark.
|
||||
/// </summary>
|
||||
internal static string Remark {
|
||||
get {
|
||||
return ResourceManager.GetString("Remark", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Save.
|
||||
/// </summary>
|
||||
internal static string Save {
|
||||
get {
|
||||
return ResourceManager.GetString("Save", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Saving an order failed.
|
||||
/// </summary>
|
||||
internal static string Saving_order_failed {
|
||||
get {
|
||||
return ResourceManager.GetString("Saving_order_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Settings.
|
||||
/// </summary>
|
||||
internal static string Settings {
|
||||
get {
|
||||
return ResourceManager.GetString("Settings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show predefined orders.
|
||||
/// </summary>
|
||||
internal static string Show_predefined_orders {
|
||||
get {
|
||||
return ResourceManager.GetString("Show_predefined_orders", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to S/N.
|
||||
/// </summary>
|
||||
internal static string SN {
|
||||
get {
|
||||
return ResourceManager.GetString("SN", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to State.
|
||||
/// </summary>
|
||||
internal static string State {
|
||||
get {
|
||||
return ResourceManager.GetString("State", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to suffix.
|
||||
/// </summary>
|
||||
internal static string suffix {
|
||||
get {
|
||||
return ResourceManager.GetString("suffix", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test procedure.
|
||||
/// </summary>
|
||||
internal static string Test_procedure {
|
||||
get {
|
||||
return ResourceManager.GetString("Test_procedure", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to There is a conflict..
|
||||
/// </summary>
|
||||
internal static string There_is_a_conflict {
|
||||
get {
|
||||
return ResourceManager.GetString("There_is_a_conflict", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User login is required.
|
||||
/// </summary>
|
||||
internal static string User_login_is_required {
|
||||
get {
|
||||
return ResourceManager.GetString("User_login_is_required", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Value.
|
||||
/// </summary>
|
||||
internal static string Value {
|
||||
get {
|
||||
return ResourceManager.GetString("Value", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Variant code.
|
||||
/// </summary>
|
||||
internal static string Variant_code {
|
||||
get {
|
||||
return ResourceManager.GetString("Variant_code", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Variant description.
|
||||
/// </summary>
|
||||
internal static string Variant_description {
|
||||
get {
|
||||
return ResourceManager.GetString("Variant_description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warning.
|
||||
/// </summary>
|
||||
internal static string Warning {
|
||||
get {
|
||||
return ResourceManager.GetString("Warning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Workflow.
|
||||
/// </summary>
|
||||
internal static string Workflow {
|
||||
get {
|
||||
return ResourceManager.GetString("Workflow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You can only delete 'New' porduction orders.
|
||||
/// </summary>
|
||||
internal static string You_can_only_delete_New_porduction_orders {
|
||||
get {
|
||||
return ResourceManager.GetString("You_can_only_delete_New_porduction_orders", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You can only edit 'New' porduction orders.
|
||||
/// </summary>
|
||||
internal static string You_can_only_edit_New_porduction_orders {
|
||||
get {
|
||||
return ResourceManager.GetString("You_can_only_edit_New_porduction_orders", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
<?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>
|
||||
<data name="Are_you_sure" xml:space="preserve">
|
||||
<value>Are you sure ?</value>
|
||||
</data>
|
||||
<data name="Cancel" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="Close_it_please" xml:space="preserve">
|
||||
<value>Close it please using 'Task manager'</value>
|
||||
</data>
|
||||
<data name="Connection_string_tracing_DB" xml:space="preserve">
|
||||
<value>Connection string for production tracing database</value>
|
||||
</data>
|
||||
<data name="Connection_string_users_DB" xml:space="preserve">
|
||||
<value>Connection string for database of users</value>
|
||||
</data>
|
||||
<data name="Database" xml:space="preserve">
|
||||
<value>Database</value>
|
||||
</data>
|
||||
<data name="Default_settings_are_used" xml:space="preserve">
|
||||
<value>Default settings are used.</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Error</value>
|
||||
</data>
|
||||
<data name="first" xml:space="preserve">
|
||||
<value>first</value>
|
||||
</data>
|
||||
<data name="Invalid_0" xml:space="preserve">
|
||||
<value>Invalid '{0}'</value>
|
||||
</data>
|
||||
<data name="Language_etc" xml:space="preserve">
|
||||
<value>Language, 语言, Sprache, jazyk</value>
|
||||
</data>
|
||||
<data name="Order" xml:space="preserve">
|
||||
<value>Order</value>
|
||||
</data>
|
||||
<data name="State" xml:space="preserve">
|
||||
<value>State</value>
|
||||
</data>
|
||||
<data name="Pieces_count" xml:space="preserve">
|
||||
<value>Pieces count</value>
|
||||
</data>
|
||||
<data name="prefix" xml:space="preserve">
|
||||
<value>prefix</value>
|
||||
</data>
|
||||
<data name="Program_0_is_running_already" xml:space="preserve">
|
||||
<value>Program '{0}' is running already.</value>
|
||||
</data>
|
||||
<data name="Program_is_running_for_the_1st_time_on_this_PC" xml:space="preserve">
|
||||
<value>Program is running for the 1st time on this PC.</value>
|
||||
</data>
|
||||
<data name="Program_restart_is_required" xml:space="preserve">
|
||||
<value>Program restart is required</value>
|
||||
</data>
|
||||
<data name="Remark" xml:space="preserve">
|
||||
<value>Remark</value>
|
||||
</data>
|
||||
<data name="Save" xml:space="preserve">
|
||||
<value>Save</value>
|
||||
</data>
|
||||
<data name="Settings" xml:space="preserve">
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
<data name="digits_count" xml:space="preserve">
|
||||
<value>digits count</value>
|
||||
</data>
|
||||
<data name="suffix" xml:space="preserve">
|
||||
<value>suffix</value>
|
||||
</data>
|
||||
<data name="Test_procedure" xml:space="preserve">
|
||||
<value>Test procedure</value>
|
||||
</data>
|
||||
<data name="User_login_is_required" xml:space="preserve">
|
||||
<value>User login is required</value>
|
||||
</data>
|
||||
<data name="Variant_code" xml:space="preserve">
|
||||
<value>Variant code</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Warning</value>
|
||||
</data>
|
||||
<data name="Workflow" xml:space="preserve">
|
||||
<value>Workflow</value>
|
||||
</data>
|
||||
<data name="OK" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Parameter" xml:space="preserve">
|
||||
<value>Parameter</value>
|
||||
</data>
|
||||
<data name="Value" xml:space="preserve">
|
||||
<value>Value</value>
|
||||
</data>
|
||||
<data name="Saving_order_failed" xml:space="preserve">
|
||||
<value>Saving an order failed</value>
|
||||
</data>
|
||||
<data name="Order_with_the_same_ID_already_exists" xml:space="preserve">
|
||||
<value>Order with the same ID already exists</value>
|
||||
</data>
|
||||
<data name="RA" xml:space="preserve">
|
||||
<value>R.A.</value>
|
||||
</data>
|
||||
<data name="SN" xml:space="preserve">
|
||||
<value>S/N</value>
|
||||
</data>
|
||||
<data name="You_can_only_edit_New_porduction_orders" xml:space="preserve">
|
||||
<value>You can only edit 'New' porduction orders</value>
|
||||
</data>
|
||||
<data name="You_can_only_delete_New_porduction_orders" xml:space="preserve">
|
||||
<value>You can only delete 'New' porduction orders</value>
|
||||
</data>
|
||||
<data name="Laser_marking" xml:space="preserve">
|
||||
<value>Laser marking</value>
|
||||
</data>
|
||||
<data name="First_radio_address" xml:space="preserve">
|
||||
<value>First radio address</value>
|
||||
</data>
|
||||
<data name="First_serial_number" xml:space="preserve">
|
||||
<value>First serial number</value>
|
||||
</data>
|
||||
<data name="Last_radio_address" xml:space="preserve">
|
||||
<value>Last radio address</value>
|
||||
</data>
|
||||
<data name="Last_serial_number" xml:space="preserve">
|
||||
<value>Last serial number</value>
|
||||
</data>
|
||||
<data name="Producton_order_properties" xml:space="preserve">
|
||||
<value>Producton order properties</value>
|
||||
</data>
|
||||
<data name="Order_number_must_be_larger_then_0" xml:space="preserve">
|
||||
<value>Order number must be larger then {0}</value>
|
||||
</data>
|
||||
<data name="Show_predefined_orders" xml:space="preserve">
|
||||
<value>Show predefined orders</value>
|
||||
</data>
|
||||
<data name="Module_parameter" xml:space="preserve">
|
||||
<value>Module parameter</value>
|
||||
</data>
|
||||
<data name="Made_in_text" xml:space="preserve">
|
||||
<value>Made in text</value>
|
||||
</data>
|
||||
<data name="Packing" xml:space="preserve">
|
||||
<value>Packing</value>
|
||||
</data>
|
||||
<data name="Variant_description" xml:space="preserve">
|
||||
<value>Variant description</value>
|
||||
</data>
|
||||
<data name="Abort_creating_an_order_QM" xml:space="preserve">
|
||||
<value>Abort creating an order?</value>
|
||||
</data>
|
||||
<data name="It_is_not_recommended_that_orders_start_with_3" xml:space="preserve">
|
||||
<value>It is not recommended that orders start with '3'.</value>
|
||||
</data>
|
||||
<data name="There_is_a_conflict" xml:space="preserve">
|
||||
<value>There is a conflict.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,225 @@
|
||||
<?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>
|
||||
<data name="Are_you_sure" xml:space="preserve">
|
||||
<value>Ste si istí ?</value>
|
||||
</data>
|
||||
<data name="Cancel" xml:space="preserve">
|
||||
<value>Zrušiť</value>
|
||||
</data>
|
||||
<data name="Close_it_please" xml:space="preserve">
|
||||
<value>Zavrite ho prosím 'Správcom úloh' (Task manager).</value>
|
||||
</data>
|
||||
<data name="Connection_string_tracing_DB" xml:space="preserve">
|
||||
<value>Konfigurácia databázy sledovania výroby</value>
|
||||
</data>
|
||||
<data name="Connection_string_users_DB" xml:space="preserve">
|
||||
<value>Konfigurácia databázy používateľov</value>
|
||||
</data>
|
||||
<data name="Database" xml:space="preserve">
|
||||
<value>Databáza</value>
|
||||
</data>
|
||||
<data name="Default_settings_are_used" xml:space="preserve">
|
||||
<value>Použijú sa základné nastavenia</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Chyba</value>
|
||||
</data>
|
||||
<data name="first" xml:space="preserve">
|
||||
<value>prvá/é</value>
|
||||
</data>
|
||||
<data name="Invalid_0" xml:space="preserve">
|
||||
<value>Neplatný(á,é) {0}</value>
|
||||
</data>
|
||||
<data name="Language_etc" xml:space="preserve">
|
||||
<value>Language, 语言, Sprache, jazyk</value>
|
||||
</data>
|
||||
<data name="Order" xml:space="preserve">
|
||||
<value>Zákazka</value>
|
||||
</data>
|
||||
<data name="State" xml:space="preserve">
|
||||
<value>Stav</value>
|
||||
</data>
|
||||
<data name="Pieces_count" xml:space="preserve">
|
||||
<value>Počet kusov</value>
|
||||
</data>
|
||||
<data name="prefix" xml:space="preserve">
|
||||
<value>Prefix</value>
|
||||
</data>
|
||||
<data name="Program_0_is_running_already" xml:space="preserve">
|
||||
<value>Program '[0}' už beží.</value>
|
||||
</data>
|
||||
<data name="Program_is_running_for_the_1st_time_on_this_PC" xml:space="preserve">
|
||||
<value>Program bol spustený na tomto počítači prvý krát.</value>
|
||||
</data>
|
||||
<data name="Program_restart_is_required" xml:space="preserve">
|
||||
<value>je potrebný reštart programu</value>
|
||||
</data>
|
||||
<data name="Remark" xml:space="preserve">
|
||||
<value>Poznámka</value>
|
||||
</data>
|
||||
<data name="Save" xml:space="preserve">
|
||||
<value>Uložíť</value>
|
||||
</data>
|
||||
<data name="Settings" xml:space="preserve">
|
||||
<value>Nastavenia</value>
|
||||
</data>
|
||||
<data name="digits_count" xml:space="preserve">
|
||||
<value>počet číslic</value>
|
||||
</data>
|
||||
<data name="suffix" xml:space="preserve">
|
||||
<value>Suffix</value>
|
||||
</data>
|
||||
<data name="Test_procedure" xml:space="preserve">
|
||||
<value>Testovacia procedúra</value>
|
||||
</data>
|
||||
<data name="User_login_is_required" xml:space="preserve">
|
||||
<value>Vyžaduje sa prihlásenie používateľa</value>
|
||||
</data>
|
||||
<data name="Variant_code" xml:space="preserve">
|
||||
<value>Kód variantu</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Upozornenie</value>
|
||||
</data>
|
||||
<data name="Workflow" xml:space="preserve">
|
||||
<value>Pracovný postup</value>
|
||||
</data>
|
||||
<data name="OK" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Parameter" xml:space="preserve">
|
||||
<value>Parameter</value>
|
||||
</data>
|
||||
<data name="Value" xml:space="preserve">
|
||||
<value>Hodnota</value>
|
||||
</data>
|
||||
<data name="Saving_order_failed" xml:space="preserve">
|
||||
<value>Chyba pri ukladaní zákazky</value>
|
||||
</data>
|
||||
<data name="Order_with_the_same_ID_already_exists" xml:space="preserve">
|
||||
<value>Existuje zákazka s rovnakým ID</value>
|
||||
</data>
|
||||
<data name="Order_number_must_be_larger_then_0" xml:space="preserve">
|
||||
<value>Číslo zákazky musí byť väčšie ako {0} </value>
|
||||
</data>
|
||||
<data name="Show_predefined_orders" xml:space="preserve">
|
||||
<value>Zobraziť preddefinované zákazky</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,23 @@
|
||||
<log4net>
|
||||
<!-- Program log appenders -->
|
||||
<appender name="OrderManagementLog" type="log4net.Appender.RollingFileAppender">
|
||||
<file value="..\Logs\OrderManagementLog.txt" />
|
||||
<appendToFile value="true" />
|
||||
<rollingMode value="Date" />
|
||||
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date %-5level %logger - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- Set root logger -->
|
||||
<root>
|
||||
<level value="WARN" />
|
||||
</root>
|
||||
|
||||
<!-- Set program loggers -->
|
||||
<logger name="OrderManagement"> <appender-ref ref="OrderManagementLog" /> <level value="WARN" /> </logger>
|
||||
|
||||
<!-- Set program logging levels -->
|
||||
<logger name="OrderManagement.OrderManagementDlg"> <level value="INFO" /> </logger>
|
||||
</log4net>
|
||||
Generated
+192
@@ -0,0 +1,192 @@
|
||||
namespace OrderManagement
|
||||
{
|
||||
partial class SettingsDlg
|
||||
{
|
||||
/// <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 Windows Form 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.commonGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.loginRequiredCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.languageComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.languageLabel = new System.Windows.Forms.Label();
|
||||
this.connStrForTracingGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.tracingDBConnStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.connStrForUsersGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.usersDBConnStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.saveButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.showPredefinedOrdersCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.commonGroupBox.SuspendLayout();
|
||||
this.connStrForTracingGroupBox.SuspendLayout();
|
||||
this.connStrForUsersGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// commonGroupBox
|
||||
//
|
||||
this.commonGroupBox.Controls.Add(this.showPredefinedOrdersCheckBox);
|
||||
this.commonGroupBox.Controls.Add(this.loginRequiredCheckBox);
|
||||
this.commonGroupBox.Controls.Add(this.languageComboBox);
|
||||
this.commonGroupBox.Controls.Add(this.languageLabel);
|
||||
this.commonGroupBox.Location = new System.Drawing.Point(12, 12);
|
||||
this.commonGroupBox.Name = "commonGroupBox";
|
||||
this.commonGroupBox.Size = new System.Drawing.Size(418, 116);
|
||||
this.commonGroupBox.TabIndex = 16;
|
||||
this.commonGroupBox.TabStop = false;
|
||||
//
|
||||
// loginRequiredCheckBox
|
||||
//
|
||||
this.loginRequiredCheckBox.AutoSize = true;
|
||||
this.loginRequiredCheckBox.Location = new System.Drawing.Point(22, 55);
|
||||
this.loginRequiredCheckBox.Name = "loginRequiredCheckBox";
|
||||
this.loginRequiredCheckBox.Size = new System.Drawing.Size(114, 17);
|
||||
this.loginRequiredCheckBox.TabIndex = 2;
|
||||
this.loginRequiredCheckBox.Text = "User login required";
|
||||
this.loginRequiredCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// languageComboBox
|
||||
//
|
||||
this.languageComboBox.FormattingEnabled = true;
|
||||
this.languageComboBox.Location = new System.Drawing.Point(292, 17);
|
||||
this.languageComboBox.Name = "languageComboBox";
|
||||
this.languageComboBox.Size = new System.Drawing.Size(80, 21);
|
||||
this.languageComboBox.TabIndex = 1;
|
||||
//
|
||||
// languageLabel
|
||||
//
|
||||
this.languageLabel.AutoSize = true;
|
||||
this.languageLabel.Location = new System.Drawing.Point(19, 20);
|
||||
this.languageLabel.Name = "languageLabel";
|
||||
this.languageLabel.Size = new System.Drawing.Size(134, 13);
|
||||
this.languageLabel.TabIndex = 0;
|
||||
this.languageLabel.Text = "Language, Sprache, Jazyk";
|
||||
//
|
||||
// connStrForTracingGroupBox
|
||||
//
|
||||
this.connStrForTracingGroupBox.Controls.Add(this.tracingDBConnStringTextBox);
|
||||
this.connStrForTracingGroupBox.Location = new System.Drawing.Point(12, 137);
|
||||
this.connStrForTracingGroupBox.Name = "connStrForTracingGroupBox";
|
||||
this.connStrForTracingGroupBox.Size = new System.Drawing.Size(660, 50);
|
||||
this.connStrForTracingGroupBox.TabIndex = 17;
|
||||
this.connStrForTracingGroupBox.TabStop = false;
|
||||
this.connStrForTracingGroupBox.Text = "Connection string for production tracing records";
|
||||
//
|
||||
// tracingDBConnStringTextBox
|
||||
//
|
||||
this.tracingDBConnStringTextBox.Location = new System.Drawing.Point(19, 18);
|
||||
this.tracingDBConnStringTextBox.Name = "tracingDBConnStringTextBox";
|
||||
this.tracingDBConnStringTextBox.Size = new System.Drawing.Size(617, 20);
|
||||
this.tracingDBConnStringTextBox.TabIndex = 0;
|
||||
//
|
||||
// connStrForUsersGroupBox
|
||||
//
|
||||
this.connStrForUsersGroupBox.Controls.Add(this.usersDBConnStringTextBox);
|
||||
this.connStrForUsersGroupBox.Location = new System.Drawing.Point(12, 196);
|
||||
this.connStrForUsersGroupBox.Name = "connStrForUsersGroupBox";
|
||||
this.connStrForUsersGroupBox.Size = new System.Drawing.Size(660, 50);
|
||||
this.connStrForUsersGroupBox.TabIndex = 18;
|
||||
this.connStrForUsersGroupBox.TabStop = false;
|
||||
this.connStrForUsersGroupBox.Text = "Connection string for central DB of users";
|
||||
//
|
||||
// usersDBConnStringTextBox
|
||||
//
|
||||
this.usersDBConnStringTextBox.Location = new System.Drawing.Point(19, 18);
|
||||
this.usersDBConnStringTextBox.Name = "usersDBConnStringTextBox";
|
||||
this.usersDBConnStringTextBox.Size = new System.Drawing.Size(617, 20);
|
||||
this.usersDBConnStringTextBox.TabIndex = 0;
|
||||
//
|
||||
// saveButton
|
||||
//
|
||||
this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.saveButton.Location = new System.Drawing.Point(475, 29);
|
||||
this.saveButton.Name = "saveButton";
|
||||
this.saveButton.Size = new System.Drawing.Size(74, 47);
|
||||
this.saveButton.TabIndex = 19;
|
||||
this.saveButton.Text = "Save";
|
||||
this.saveButton.UseVisualStyleBackColor = true;
|
||||
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.Location = new System.Drawing.Point(577, 29);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(71, 47);
|
||||
this.cancelButton.TabIndex = 20;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// showPredefinedOrdersCheckBox
|
||||
//
|
||||
this.showPredefinedOrdersCheckBox.AutoSize = true;
|
||||
this.showPredefinedOrdersCheckBox.Location = new System.Drawing.Point(22, 82);
|
||||
this.showPredefinedOrdersCheckBox.Name = "showPredefinedOrdersCheckBox";
|
||||
this.showPredefinedOrdersCheckBox.Size = new System.Drawing.Size(138, 17);
|
||||
this.showPredefinedOrdersCheckBox.TabIndex = 3;
|
||||
this.showPredefinedOrdersCheckBox.Text = "Show predefined orders";
|
||||
this.showPredefinedOrdersCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// SettingsDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(688, 261);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.saveButton);
|
||||
this.Controls.Add(this.connStrForUsersGroupBox);
|
||||
this.Controls.Add(this.connStrForTracingGroupBox);
|
||||
this.Controls.Add(this.commonGroupBox);
|
||||
this.Name = "SettingsDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Settings";
|
||||
this.Load += new System.EventHandler(this.SettingsDlg_Load);
|
||||
this.commonGroupBox.ResumeLayout(false);
|
||||
this.commonGroupBox.PerformLayout();
|
||||
this.connStrForTracingGroupBox.ResumeLayout(false);
|
||||
this.connStrForTracingGroupBox.PerformLayout();
|
||||
this.connStrForUsersGroupBox.ResumeLayout(false);
|
||||
this.connStrForUsersGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox commonGroupBox;
|
||||
private System.Windows.Forms.ComboBox languageComboBox;
|
||||
private System.Windows.Forms.Label languageLabel;
|
||||
private System.Windows.Forms.CheckBox loginRequiredCheckBox;
|
||||
private System.Windows.Forms.GroupBox connStrForTracingGroupBox;
|
||||
private System.Windows.Forms.TextBox tracingDBConnStringTextBox;
|
||||
private System.Windows.Forms.GroupBox connStrForUsersGroupBox;
|
||||
private System.Windows.Forms.TextBox usersDBConnStringTextBox;
|
||||
private System.Windows.Forms.Button saveButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.CheckBox showPredefinedOrdersCheckBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using OrderManagement.Resources;
|
||||
|
||||
namespace OrderManagement
|
||||
{
|
||||
public partial class SettingsDlg : Form
|
||||
{
|
||||
private LocalSettings ls;
|
||||
|
||||
public SettingsDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public SettingsDlg(LocalSettings localSettings)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.ls = localSettings;
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Settings;
|
||||
languageLabel.Text = Strings.Language_etc;
|
||||
loginRequiredCheckBox.Text = Strings.User_login_is_required;
|
||||
showPredefinedOrdersCheckBox.Text = Strings.Show_predefined_orders;
|
||||
saveButton.Text = Strings.Save;
|
||||
cancelButton.Text = Strings.Cancel;
|
||||
connStrForTracingGroupBox.Text = Strings.Connection_string_tracing_DB;
|
||||
connStrForUsersGroupBox.Text = Strings.Connection_string_users_DB;
|
||||
}
|
||||
|
||||
private void SettingsDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
languageComboBox.Items.Add("EN");
|
||||
languageComboBox.Items.Add("ZH_CN");
|
||||
languageComboBox.Items.Add("DE");
|
||||
languageComboBox.Items.Add("SK");
|
||||
languageComboBox.Text = ls.Language;
|
||||
|
||||
if (ls == null) return;
|
||||
|
||||
loginRequiredCheckBox.Checked = ls.IsUserLoginRequired;
|
||||
showPredefinedOrdersCheckBox.Checked = ls.IsShowPredefinedOrders;
|
||||
|
||||
tracingDBConnStringTextBox.Text = ls.TracingDBConnString;
|
||||
usersDBConnStringTextBox.Text = ls.UsersDBConnString;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies UI content
|
||||
/// </summary>
|
||||
/// <returns>None-empty string (message) when invalid</returns>
|
||||
string IsUIContentValid()
|
||||
{
|
||||
if (!languageComboBox.Items.Contains(languageComboBox.Text))
|
||||
{
|
||||
return "Invalid language";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates settings, checks for differences compared to previous setrtings
|
||||
/// </summary>
|
||||
/// <returns>true when settings are different</returns>
|
||||
bool UpdateSettings()
|
||||
{
|
||||
if (ls == null) return false;
|
||||
|
||||
bool isDifferent = false;
|
||||
|
||||
if (ls.Language != languageComboBox.Text)
|
||||
{
|
||||
ls.Language = languageComboBox.Text;
|
||||
isDifferent = true;
|
||||
}
|
||||
|
||||
if (ls.IsUserLoginRequired != loginRequiredCheckBox.Checked)
|
||||
{
|
||||
ls.IsUserLoginRequired = loginRequiredCheckBox.Checked;
|
||||
isDifferent = true;
|
||||
}
|
||||
|
||||
if (ls.IsShowPredefinedOrders != showPredefinedOrdersCheckBox.Checked)
|
||||
{
|
||||
ls.IsShowPredefinedOrders = showPredefinedOrdersCheckBox.Checked;
|
||||
isDifferent = true;
|
||||
}
|
||||
|
||||
if (ls.TracingDBConnString != tracingDBConnStringTextBox.Text)
|
||||
{
|
||||
ls.TracingDBConnString = tracingDBConnStringTextBox.Text;
|
||||
isDifferent = true;
|
||||
}
|
||||
|
||||
if (ls.UsersDBConnString != usersDBConnStringTextBox.Text)
|
||||
{
|
||||
ls.UsersDBConnString = usersDBConnStringTextBox.Text;
|
||||
isDifferent = true;
|
||||
}
|
||||
|
||||
return isDifferent;
|
||||
}
|
||||
|
||||
private void saveButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string message = IsUIContentValid();
|
||||
if (string.IsNullOrEmpty(message))
|
||||
{
|
||||
UpdateSettings();
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(message);
|
||||
}
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
+21
-14
@@ -44,7 +44,8 @@ namespace Results
|
||||
|
||||
public static BatchResults NewFromProcedure(int batchNr, int benchId, string benchName, string a1, string a2, string a3, string a4, string a5,
|
||||
string user, int userNr, string programVer, Config.Entities.Procedure procedure,
|
||||
WaterMeterData[] waterMeterDatas, int[] waterMeterParts, string variant,
|
||||
WaterMeterData[] waterMeterDatas, int[] waterMeterParts,
|
||||
string variant, string order, string workflow, string laserMarking,
|
||||
double realDensity, double atTemperature, double buoyancy)
|
||||
{
|
||||
BatchResults d = new BatchResults(waterMeterDatas.Length);
|
||||
@@ -66,7 +67,9 @@ namespace Results
|
||||
UserNumber = userNr,
|
||||
ProcedureName = procedure.Name,
|
||||
ProcedureDescription = procedure.Description,
|
||||
WatermetersStr = variant,
|
||||
WatermetersStr = (variant != null) ? variant : string.Empty,
|
||||
PurchaseOrder = order,
|
||||
Workflow = workflow,
|
||||
ProcedureRevision = procedure.Revision,
|
||||
StartTime = DateTime.Now,
|
||||
SampleDensity = realDensity,
|
||||
@@ -84,23 +87,27 @@ namespace Results
|
||||
///
|
||||
for (int wmPos0 = 0; wmPos0 < d.WMPositionsCount; wmPos0++)
|
||||
{
|
||||
if (waterMeterDatas[wmPos0] == null)
|
||||
var wm = new WaterMeter()
|
||||
{
|
||||
d.Batch.WaterMeters.Add(new WaterMeter() { Batch = d.Batch,
|
||||
WaterMeterData = null,
|
||||
WMPosition = wmPos0 + 1,
|
||||
YearOfProduction = year,
|
||||
Disabled = true, });
|
||||
Batch = d.Batch,
|
||||
WMPosition = wmPos0 + 1,
|
||||
YearOfProduction = year,
|
||||
};
|
||||
|
||||
if (waterMeterDatas[wmPos0] != null)
|
||||
{
|
||||
wm.WaterMeterData = WaterMeterData.UpdateList(d.WaterMeterDataList, waterMeterDatas[wmPos0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
WaterMeterData wmd = WaterMeterData.UpdateList(d.WaterMeterDataList, waterMeterDatas[wmPos0]);
|
||||
d.Batch.WaterMeters.Add(new WaterMeter() { Batch = d.Batch,
|
||||
WaterMeterData = wmd,
|
||||
WMPosition = wmPos0 + 1,
|
||||
YearOfProduction = year, });
|
||||
wm.Disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(order)) wm.PurchaseOrder = order;
|
||||
if (!string.IsNullOrEmpty(laserMarking)) wm.Remark = laserMarking;
|
||||
|
||||
d.Batch.WaterMeters.Add(wm);
|
||||
}
|
||||
|
||||
foreach (var ti in procedure.GetTestInstances())
|
||||
{
|
||||
|
||||
@@ -23,7 +23,9 @@ namespace Results.Entities
|
||||
public virtual int UserNumber { get; set; }
|
||||
public virtual string ProcedureName { get; set; }
|
||||
public virtual bool IsRemoteProcedure { get; set; } /// Stara Tura, not mapped to DB
|
||||
public virtual string ProcedureDescription { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual string PurchaseOrder { get; set; } /// Stara Tura, Nanjing, not mapped to DB
|
||||
public virtual string Workflow { get; set; } /// Stara Tura, Nanjing, not mapped to DB
|
||||
public virtual string ProcedureDescription { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual int ProcedureRevision { get; set; }
|
||||
public virtual string WatermetersStr { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual string Remark { get; set; }
|
||||
@@ -111,6 +113,7 @@ namespace Results.Entities
|
||||
UserName = string.Empty;
|
||||
ProcedureName = string.Empty;
|
||||
IsRemoteProcedure = false;
|
||||
PurchaseOrder = null;
|
||||
ProcedureDescription = string.Empty;
|
||||
WatermetersStr = string.Empty;
|
||||
Remark = string.Empty;
|
||||
@@ -138,6 +141,7 @@ namespace Results.Entities
|
||||
UserNumber = oriBatch.UserNumber;
|
||||
ProcedureName = oriBatch.ProcedureName;
|
||||
IsRemoteProcedure = oriBatch.IsRemoteProcedure;
|
||||
PurchaseOrder = oriBatch.PurchaseOrder;
|
||||
ProcedureDescription = oriBatch.ProcedureDescription;
|
||||
ProcedureRevision = oriBatch.ProcedureRevision;
|
||||
WatermetersStr = oriBatch.WatermetersStr;
|
||||
|
||||
@@ -44,8 +44,9 @@ namespace Results.Entities
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string SerialNr { get; set; } /// S/N _or_ S/N of the main meter of a compound meter _or_ PCB Number of an iPerl water meter
|
||||
public virtual string SerialNrAux { get; set; } /// S/N of the aux. meter of a compound meter _or_ a complete assigned S/N of an iPerl water meter
|
||||
public virtual string PurchaseOrder { get; set; }
|
||||
public virtual string SerialNrAux { get; set; } /// S/N of the aux. meter of a compound meter _or_ eRegister PCB Number of a 640 water meter
|
||||
public virtual string RadioAddress { get; set; }
|
||||
public virtual string PurchaseOrder { get; set; }
|
||||
public virtual int YearOfProduction { get; set; }
|
||||
public virtual int WMPosition { get; set; } /// 1-based water meter position
|
||||
public virtual string EndState { get; set; } /// End state (of the main water meter)
|
||||
@@ -77,7 +78,6 @@ namespace Results.Entities
|
||||
/// <summary>
|
||||
/// Data from a production test bench (in case of tests on iPerl special)
|
||||
/// </summary>
|
||||
public virtual string RadioAddress { get; set; }
|
||||
public virtual int PaletteNr { get; set; }
|
||||
public virtual int UmkartonNr { get; set; }
|
||||
public virtual string ProdTestBench { get; set; }
|
||||
@@ -97,6 +97,7 @@ namespace Results.Entities
|
||||
public virtual string Prefix { get; set; }
|
||||
public virtual string Suffix { get; set; }
|
||||
public virtual string CompleteSerialNr { get; set; }
|
||||
public virtual string OriRadioAddress { get; set; } /// Not mapped to DB !!! Original radio address of a 640 water meter (albatrosID)
|
||||
public virtual int WMTypeRevision { get; set; }
|
||||
public virtual int Pruefindex { get; set; } /// >= 1 ... pruefindex
|
||||
public virtual int HydrPruefung { get; set; }
|
||||
@@ -107,7 +108,7 @@ namespace Results.Entities
|
||||
/// Not mapped to database
|
||||
///
|
||||
public virtual int ProcessId { get; set; } /// Not mapped to DB !!! Tracing DB Process ID
|
||||
public virtual int SessionId { get; set; } /// Not mapped to DB !!! 1 (regular tracing DB session) or 2 (alternative tracing DB session)
|
||||
|
||||
public virtual bool LastRecordIsNok { get; set; } /// Not mapped to DB !!! Previous record verification result
|
||||
|
||||
public virtual WaterMeterData WaterMeterData { get; set; }
|
||||
@@ -436,7 +437,6 @@ namespace Results.Entities
|
||||
CompleteTestInfos = null;
|
||||
|
||||
ProcessId = 0;
|
||||
SessionId = 0;
|
||||
ErrorFlags = 0;
|
||||
LastRecordIsNok = false;
|
||||
|
||||
@@ -516,7 +516,6 @@ namespace Results.Entities
|
||||
CompleteTestInfos = src.CompleteTestInfos; /// Not mapped to DB
|
||||
|
||||
ProcessId = src.ProcessId; /// Not mapped to DB
|
||||
SessionId = src.SessionId; /// Not mapped to DB
|
||||
LastRecordIsNok = src.LastRecordIsNok; /// Not mapped to DB
|
||||
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
@@ -710,7 +709,6 @@ namespace Results.Entities
|
||||
}
|
||||
|
||||
writer.Write(ProcessId);
|
||||
writer.Write(SessionId);
|
||||
writer.Write(LastRecordIsNok);
|
||||
|
||||
/// Save WaterMeterData or WaterMeterData.Id
|
||||
@@ -810,7 +808,6 @@ namespace Results.Entities
|
||||
CompleteTestInfos = completeTestInfos;
|
||||
|
||||
ProcessId = reader.ReadInt32();
|
||||
SessionId = reader.ReadInt32();
|
||||
LastRecordIsNok = reader.ReadBoolean();
|
||||
|
||||
/// Retrieve TestData
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Common;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
@@ -55,7 +56,7 @@ namespace Results.Forms
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 msg, IntPtr wParam, ref HDITEM lParam);
|
||||
|
||||
public static void SetSortIcon(this ListViewEx listViewControl, int columnIndex, SortOrder order)
|
||||
public static void SetSortIcon(this ListViewEx listViewControl, int columnIndex, MySortOrder order)
|
||||
{
|
||||
IntPtr columnHeader = SendMessage(listViewControl.Handle, LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero);
|
||||
for (int columnNumber = 0; columnNumber <= listViewControl.Columns.Count - 1; columnNumber++)
|
||||
@@ -71,16 +72,18 @@ namespace Results.Forms
|
||||
throw new Win32Exception();
|
||||
}
|
||||
|
||||
if (order != SortOrder.None && columnNumber == columnIndex)
|
||||
if (order != MySortOrder.None && columnNumber == columnIndex)
|
||||
{
|
||||
switch (order)
|
||||
{
|
||||
case SortOrder.Ascending:
|
||||
case MySortOrder.Ascending:
|
||||
case MySortOrder.Ascending2:
|
||||
item.fmt &= ~HDITEM.Format.SortDown;
|
||||
item.fmt |= HDITEM.Format.SortUp;
|
||||
break;
|
||||
|
||||
case SortOrder.Descending:
|
||||
case MySortOrder.Descending:
|
||||
case MySortOrder.Descending2:
|
||||
item.fmt &= ~HDITEM.Format.SortUp;
|
||||
item.fmt |= HDITEM.Format.SortDown;
|
||||
break;
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
|
||||
namespace Results.Forms
|
||||
{
|
||||
public class LviIntColumnComparer : IComparer
|
||||
{
|
||||
int column;
|
||||
SortOrder order;
|
||||
MySortOrder order;
|
||||
|
||||
public LviIntColumnComparer()
|
||||
{
|
||||
column = 0;
|
||||
order = SortOrder.Ascending;
|
||||
order = MySortOrder.Ascending;
|
||||
}
|
||||
|
||||
public LviIntColumnComparer(int column, SortOrder order)
|
||||
public LviIntColumnComparer(int column, MySortOrder order)
|
||||
{
|
||||
this.column = column;
|
||||
this.order = order;
|
||||
@@ -25,7 +26,7 @@ namespace Results.Forms
|
||||
{
|
||||
int valX = int.Parse(((ListViewItem)x).SubItems[column].Text);
|
||||
int valY = int.Parse(((ListViewItem)y).SubItems[column].Text);
|
||||
return (order == SortOrder.Descending) ? (valY - valX) : (valX - valY);
|
||||
return (order == MySortOrder.Descending || order == MySortOrder.Descending2) ? (valY - valX) : (valX - valY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
|
||||
namespace Results.Forms
|
||||
{
|
||||
public class LviTextColumnComparer : IComparer
|
||||
{
|
||||
private int column;
|
||||
SortOrder order;
|
||||
MySortOrder order;
|
||||
|
||||
public LviTextColumnComparer()
|
||||
{
|
||||
column = 0;
|
||||
order = SortOrder.Ascending;
|
||||
order = MySortOrder.Ascending;
|
||||
}
|
||||
|
||||
public LviTextColumnComparer(int column, SortOrder order)
|
||||
public LviTextColumnComparer(int column, MySortOrder order)
|
||||
{
|
||||
this.column = column;
|
||||
this.order = order;
|
||||
@@ -25,7 +26,7 @@ namespace Results.Forms
|
||||
{
|
||||
string txtX = ((ListViewItem)x).SubItems[column].Text;
|
||||
string txtY = ((ListViewItem)y).SubItems[column].Text;
|
||||
return (order == SortOrder.Descending) ? String.Compare(txtY, txtX) : String.Compare(txtX, txtY);
|
||||
return (order == MySortOrder.Descending || order == MySortOrder.Descending2) ? String.Compare(txtY, txtX) : String.Compare(txtX, txtY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace Results.Forms
|
||||
}
|
||||
else
|
||||
{
|
||||
Process proc = refRecords[0].Process;
|
||||
Process proc = refRecords[0].Workflow;
|
||||
bool[] isMissing = new bool[proc.Worksteps.Count];
|
||||
for (int i = 0; i < isMissing.Length; i++) isMissing[i] = true;
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace Results.Forms
|
||||
rr.Result == 0 ? "OK" : "NOK",
|
||||
(rr.Workstep != null && rr.Workstep.ReferencePart != null) ? rr.Workstep.ReferencePart.Name : string.Empty,
|
||||
rr.Code,
|
||||
(rr.Process != null) ? rr.Process.Name : string.Empty,
|
||||
(rr.Workflow != null) ? rr.Workflow.Name : string.Empty,
|
||||
}));
|
||||
|
||||
for (int i = 0; i < isMissing.Length; i++)
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Results.Forms
|
||||
rr.Result == 0 ? "OK" : "NOK",
|
||||
rr.Workstep.ReferencePart.Name,
|
||||
rr.Code,
|
||||
rr.Process.Name,
|
||||
rr.Workflow.Name,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,6 +332,19 @@ namespace Results
|
||||
Diverter, /// 281
|
||||
RegValve, /// 282
|
||||
|
||||
X1, /// 283
|
||||
X2, /// 284
|
||||
X3, /// 285
|
||||
X4, /// 286
|
||||
X5, /// 287
|
||||
X6, /// 288
|
||||
X7, /// 289
|
||||
X8, /// 290
|
||||
X9, /// 291
|
||||
|
||||
RadioAddress, /// 292
|
||||
OriRadioAddress, /// 293
|
||||
|
||||
Count,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,8 @@ namespace Results.Mappings
|
||||
Id(x => x.Id);
|
||||
Map(x => x.SerialNr);
|
||||
Map(x => x.SerialNrAux);
|
||||
Map(x => x.PurchaseOrder);
|
||||
Map(x => x.RadioAddress);
|
||||
Map(x => x.PurchaseOrder);
|
||||
Map(x => x.YearOfProduction);
|
||||
Map(x => x.WMPosition);
|
||||
Map(x => x.EndState);
|
||||
@@ -43,7 +44,6 @@ namespace Results.Mappings
|
||||
Map(x => x.FWVersion);
|
||||
#endif
|
||||
#if TURA_SPECIAL
|
||||
Map(x => x.RadioAddress);
|
||||
Map(x => x.PaletteNr);
|
||||
Map(x => x.UmkartonNr);
|
||||
Map(x => x.ProdTestBench);
|
||||
@@ -60,6 +60,7 @@ namespace Results.Mappings
|
||||
Map(x => x.Prefix);
|
||||
Map(x => x.Suffix);
|
||||
Map(x => x.CompleteSerialNr);
|
||||
Map(x => x.OriRadioAddress);
|
||||
Map(x => x.Pruefindex);
|
||||
Map(x => x.HydrPruefung);
|
||||
Map(x => x.WMTypeRevision);
|
||||
|
||||
@@ -14,7 +14,7 @@ using GenCode128;
|
||||
|
||||
namespace Results.Output.Printers.Label
|
||||
{
|
||||
public class LabelPrintDocument : PrintersCommon
|
||||
public class LabelPrintDocument : Common.Printers.PrintersCommon
|
||||
{
|
||||
static QrEncoder encoder = new QrEncoder();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ using GenCode128;
|
||||
|
||||
namespace Results.Output.Printers.MultiLabel
|
||||
{
|
||||
public class MultiLabelPrintDocument : PrintersCommon
|
||||
public class MultiLabelPrintDocument : Common.Printers.PrintersCommon
|
||||
{
|
||||
static QrEncoder encoder = new QrEncoder();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ using Results.Resources;
|
||||
|
||||
namespace Results.Output.Printers.OnePerBatch
|
||||
{
|
||||
public class OnePerBatchPrintDocument : PrintersCommon
|
||||
public class OnePerBatchPrintDocument : Common.Printers.PrintersCommon
|
||||
{
|
||||
const float GapBetweenTableColumns = 10;
|
||||
const float GapBetweenCommonColumns = 10;
|
||||
|
||||
@@ -14,7 +14,7 @@ using Results.Resources;
|
||||
|
||||
namespace Results.Output.Printers.OnePerMeter
|
||||
{
|
||||
public class OnePerMeterPrintDocument : PrintersCommon
|
||||
public class OnePerMeterPrintDocument : Common.Printers.PrintersCommon
|
||||
{
|
||||
const float GapBetweenTableColumns = 10;
|
||||
const float GapBetweenCommonColumns = 10;
|
||||
|
||||
@@ -130,6 +130,8 @@ namespace Results.Output
|
||||
/// <returns>true when compatible</returns>
|
||||
public static bool AreCompatible(IList<SensusTestInfo> oracleTestInfo, SensusTestInfo[] completeTestInfo)
|
||||
{
|
||||
if (oracleTestInfo == null) return false;
|
||||
|
||||
/// All tests in oracleTestInfo must exist in completeTestInfo
|
||||
foreach (var oti in oracleTestInfo)
|
||||
{
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Results.Output
|
||||
else
|
||||
{
|
||||
bool isHeader = (colIx < Style.LeftHeadersCount) || (rowIx < Style.TopHeadersCount);
|
||||
SizeF size = Printers.PrintersCommon.Measure(e, Rows[rowIx][colIx], isHeader ? Style.HeaderFont : Style.Font);
|
||||
SizeF size = Common.Printers.PrintersCommon.Measure(e, Rows[rowIx][colIx], isHeader ? Style.HeaderFont : Style.Font);
|
||||
if (size.Width > columnWidth[colIx]) columnWidth[colIx] = size.Width;
|
||||
if (size.Height > rowHeight[rowIx]) rowHeight[rowIx] = size.Height;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ namespace Results.Output
|
||||
{
|
||||
/// In not a separator line
|
||||
bool isHeader = (colIx < Style.LeftHeadersCount) || (rowIx < Style.TopHeadersCount);
|
||||
SizeF size = Printers.PrintersCommon.Measure(e, Rows[rowIx][colIx], isHeader ? Style.HeaderFont : Style.Font);
|
||||
SizeF size = Common.Printers.PrintersCommon.Measure(e, Rows[rowIx][colIx], isHeader ? Style.HeaderFont : Style.Font);
|
||||
if ((Style.ColumnWidths != null) && (Style.ColumnWidths.Length > colIx))
|
||||
{
|
||||
size.Width = Style.ColumnWidths[colIx]; /// Override measurement if column width is defined
|
||||
@@ -247,7 +247,7 @@ namespace Results.Output
|
||||
for (int colIndex = 0; colIndex < tblColumnsCount; colIndex++)
|
||||
{
|
||||
bool isHeader = (colIndex < Style.LeftHeadersCount) || (rowIndex < Style.TopHeadersCount);
|
||||
Printers.PrintersCommon.PrintAt(e, oneTableRow[colIndex],
|
||||
Common.Printers.PrintersCommon.PrintAt(e, oneTableRow[colIndex],
|
||||
isHeader ? Style.HeaderFont : Style.Font,
|
||||
columnPos[colIndex],
|
||||
rowPos[rowIndex],
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.1.1464.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.1464.0")]
|
||||
[assembly: AssemblyVersion("3.1.1800.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.1800.0")]
|
||||
|
||||
Generated
+18
@@ -906,6 +906,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Radio address.
|
||||
/// </summary>
|
||||
internal static string Radio_address {
|
||||
get {
|
||||
return ResourceManager.GetString("Radio_address", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Ref.pulses.
|
||||
/// </summary>
|
||||
@@ -1581,6 +1590,15 @@ namespace Results.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Radio address of the meter.
|
||||
/// </summary>
|
||||
internal static string Tooltip_RA {
|
||||
get {
|
||||
return ResourceManager.GetString("Tooltip_RA", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calculated density of water from table or formula at water density calibration temperature (r).
|
||||
/// </summary>
|
||||
|
||||
@@ -831,4 +831,10 @@
|
||||
<data name="Info_flags" xml:space="preserve">
|
||||
<value>Info flags</value>
|
||||
</data>
|
||||
<data name="Radio_address" xml:space="preserve">
|
||||
<value>Radio address</value>
|
||||
</data>
|
||||
<data name="Tooltip_RA" xml:space="preserve">
|
||||
<value>Radio address of the meter</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -19,17 +19,17 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ORACLE_DB</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;ORACLE_DB</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -163,9 +163,6 @@
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\OnePerBatch\OnePerBatchPrinterCfg.cs" />
|
||||
<Compile Include="Output\Printers\PrintersCommon.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Output\Printers\OnePerMeter\OnePerMeterPrintDocument.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -366,11 +366,15 @@ namespace Results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Text5, "Text5", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => FormatStr(f, w.WaterMeterData.Text5)));
|
||||
|
||||
/// Water meters results
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr, Strings.sn, Strings.Tooltip_sn, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.SerialNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Purchase_order, Strings.PO, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.PurchaseOrder)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Year_of_production, Strings.Year, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.YearOfProduction)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.WM_Position, Strings.Pos, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.WMPosition)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Formatted_WM_ID, "Formatted WM ID", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? string.Format("{0}-{1}", w.BatchNr(), w.WMPosition) : string.Format(f, w.StartTime(), w.EndTime(), w.BatchNr(), w.WMPosition, w.SerialNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr, Strings.sn, Strings.Tooltip_sn, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.SerialNr)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.RadioAddress, Strings.Radio_address, Strings.Tooltip_RA, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.RadioAddress)));
|
||||
#if ORACLE_DB
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.OriRadioAddress, "Original " + Strings.Radio_address, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.OriRadioAddress)));
|
||||
#endif
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Purchase_order, Strings.PO, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => FormatStr(f, w.PurchaseOrder)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Year_of_production, Strings.Year, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.YearOfProduction)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.WM_Position, Strings.Pos, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => FormatInt(f, w.WMPosition)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Formatted_WM_ID, "Formatted WM ID", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? string.Format("{0}-{1}", w.BatchNr(), w.WMPosition) : string.Format(f, w.StartTime(), w.EndTime(), w.BatchNr(), w.WMPosition, w.SerialNr)));
|
||||
|
||||
/// Water meters results (single)
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state, Strings.End_state, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.EndState)));
|
||||
|
||||
+74
-14
@@ -48,13 +48,19 @@
|
||||
this.connectionStringTextBox4 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox6 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox9 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox9 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox8 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox7 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox8 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox7 = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// connectionStringTextBox1
|
||||
//
|
||||
this.connectionStringTextBox1.Location = new System.Drawing.Point(157, 45);
|
||||
this.connectionStringTextBox1.Name = "connectionStringTextBox1";
|
||||
this.connectionStringTextBox1.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox1.Size = new System.Drawing.Size(713, 20);
|
||||
this.connectionStringTextBox1.TabIndex = 3;
|
||||
//
|
||||
// benchNameLabel
|
||||
@@ -79,20 +85,20 @@
|
||||
//
|
||||
this.connectionStringTextBox2.Location = new System.Drawing.Point(157, 69);
|
||||
this.connectionStringTextBox2.Name = "connectionStringTextBox2";
|
||||
this.connectionStringTextBox2.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox2.Size = new System.Drawing.Size(713, 20);
|
||||
this.connectionStringTextBox2.TabIndex = 5;
|
||||
//
|
||||
// connectionStringTextBox3
|
||||
//
|
||||
this.connectionStringTextBox3.Location = new System.Drawing.Point(157, 93);
|
||||
this.connectionStringTextBox3.Name = "connectionStringTextBox3";
|
||||
this.connectionStringTextBox3.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox3.Size = new System.Drawing.Size(713, 20);
|
||||
this.connectionStringTextBox3.TabIndex = 7;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.okButton.Location = new System.Drawing.Point(506, 250);
|
||||
this.okButton.Location = new System.Drawing.Point(664, 326);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.okButton.TabIndex = 18;
|
||||
@@ -104,7 +110,7 @@
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(617, 250);
|
||||
this.cancelButton.Location = new System.Drawing.Point(775, 326);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.cancelButton.TabIndex = 19;
|
||||
@@ -137,7 +143,7 @@
|
||||
//
|
||||
this.languageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.languageLabel.AutoSize = true;
|
||||
this.languageLabel.Location = new System.Drawing.Point(26, 245);
|
||||
this.languageLabel.Location = new System.Drawing.Point(26, 317);
|
||||
this.languageLabel.Name = "languageLabel";
|
||||
this.languageLabel.Size = new System.Drawing.Size(55, 13);
|
||||
this.languageLabel.TabIndex = 14;
|
||||
@@ -146,7 +152,7 @@
|
||||
// languageTextBox
|
||||
//
|
||||
this.languageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.languageTextBox.Location = new System.Drawing.Point(29, 263);
|
||||
this.languageTextBox.Location = new System.Drawing.Point(29, 335);
|
||||
this.languageTextBox.Name = "languageTextBox";
|
||||
this.languageTextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.languageTextBox.TabIndex = 15;
|
||||
@@ -155,7 +161,7 @@
|
||||
//
|
||||
this.formatLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.formatLabel.AutoSize = true;
|
||||
this.formatLabel.Location = new System.Drawing.Point(26, 196);
|
||||
this.formatLabel.Location = new System.Drawing.Point(26, 268);
|
||||
this.formatLabel.Name = "formatLabel";
|
||||
this.formatLabel.Size = new System.Drawing.Size(94, 13);
|
||||
this.formatLabel.TabIndex = 12;
|
||||
@@ -164,9 +170,9 @@
|
||||
// timePeriodFormatTextBox
|
||||
//
|
||||
this.timePeriodFormatTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.timePeriodFormatTextBox.Location = new System.Drawing.Point(29, 215);
|
||||
this.timePeriodFormatTextBox.Location = new System.Drawing.Point(29, 287);
|
||||
this.timePeriodFormatTextBox.Name = "timePeriodFormatTextBox";
|
||||
this.timePeriodFormatTextBox.Size = new System.Drawing.Size(683, 20);
|
||||
this.timePeriodFormatTextBox.Size = new System.Drawing.Size(841, 20);
|
||||
this.timePeriodFormatTextBox.TabIndex = 13;
|
||||
//
|
||||
// benchNameTextBox5
|
||||
@@ -187,14 +193,14 @@
|
||||
//
|
||||
this.connectionStringTextBox5.Location = new System.Drawing.Point(157, 141);
|
||||
this.connectionStringTextBox5.Name = "connectionStringTextBox5";
|
||||
this.connectionStringTextBox5.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox5.Size = new System.Drawing.Size(713, 20);
|
||||
this.connectionStringTextBox5.TabIndex = 11;
|
||||
//
|
||||
// connectionStringTextBox4
|
||||
//
|
||||
this.connectionStringTextBox4.Location = new System.Drawing.Point(157, 117);
|
||||
this.connectionStringTextBox4.Name = "connectionStringTextBox4";
|
||||
this.connectionStringTextBox4.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox4.Size = new System.Drawing.Size(713, 20);
|
||||
this.connectionStringTextBox4.TabIndex = 9;
|
||||
//
|
||||
// benchNameTextBox6
|
||||
@@ -208,16 +214,64 @@
|
||||
//
|
||||
this.connectionStringTextBox6.Location = new System.Drawing.Point(157, 165);
|
||||
this.connectionStringTextBox6.Name = "connectionStringTextBox6";
|
||||
this.connectionStringTextBox6.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox6.Size = new System.Drawing.Size(713, 20);
|
||||
this.connectionStringTextBox6.TabIndex = 21;
|
||||
//
|
||||
// benchNameTextBox9
|
||||
//
|
||||
this.benchNameTextBox9.Location = new System.Drawing.Point(29, 237);
|
||||
this.benchNameTextBox9.Name = "benchNameTextBox9";
|
||||
this.benchNameTextBox9.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox9.TabIndex = 26;
|
||||
//
|
||||
// connectionStringTextBox9
|
||||
//
|
||||
this.connectionStringTextBox9.Location = new System.Drawing.Point(157, 237);
|
||||
this.connectionStringTextBox9.Name = "connectionStringTextBox9";
|
||||
this.connectionStringTextBox9.Size = new System.Drawing.Size(713, 20);
|
||||
this.connectionStringTextBox9.TabIndex = 27;
|
||||
//
|
||||
// benchNameTextBox8
|
||||
//
|
||||
this.benchNameTextBox8.Location = new System.Drawing.Point(29, 213);
|
||||
this.benchNameTextBox8.Name = "benchNameTextBox8";
|
||||
this.benchNameTextBox8.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox8.TabIndex = 24;
|
||||
//
|
||||
// benchNameTextBox7
|
||||
//
|
||||
this.benchNameTextBox7.Location = new System.Drawing.Point(29, 189);
|
||||
this.benchNameTextBox7.Name = "benchNameTextBox7";
|
||||
this.benchNameTextBox7.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox7.TabIndex = 22;
|
||||
//
|
||||
// connectionStringTextBox8
|
||||
//
|
||||
this.connectionStringTextBox8.Location = new System.Drawing.Point(157, 213);
|
||||
this.connectionStringTextBox8.Name = "connectionStringTextBox8";
|
||||
this.connectionStringTextBox8.Size = new System.Drawing.Size(713, 20);
|
||||
this.connectionStringTextBox8.TabIndex = 25;
|
||||
//
|
||||
// connectionStringTextBox7
|
||||
//
|
||||
this.connectionStringTextBox7.Location = new System.Drawing.Point(157, 189);
|
||||
this.connectionStringTextBox7.Name = "connectionStringTextBox7";
|
||||
this.connectionStringTextBox7.Size = new System.Drawing.Size(713, 20);
|
||||
this.connectionStringTextBox7.TabIndex = 23;
|
||||
//
|
||||
// DatabaseSettingsDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(743, 310);
|
||||
this.ClientSize = new System.Drawing.Size(901, 382);
|
||||
this.Controls.Add(this.benchNameTextBox9);
|
||||
this.Controls.Add(this.connectionStringTextBox9);
|
||||
this.Controls.Add(this.benchNameTextBox8);
|
||||
this.Controls.Add(this.benchNameTextBox7);
|
||||
this.Controls.Add(this.connectionStringTextBox8);
|
||||
this.Controls.Add(this.connectionStringTextBox7);
|
||||
this.Controls.Add(this.benchNameTextBox6);
|
||||
this.Controls.Add(this.connectionStringTextBox6);
|
||||
this.Controls.Add(this.benchNameTextBox5);
|
||||
@@ -269,5 +323,11 @@
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox4;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox6;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox6;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox9;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox9;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox8;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox7;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox8;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox7;
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,9 @@ namespace ResultsBrowser.Forms
|
||||
benchNameTextBox4.Text = Program.LocalSettings.Bench4;
|
||||
benchNameTextBox5.Text = Program.LocalSettings.Bench5;
|
||||
benchNameTextBox6.Text = Program.LocalSettings.Bench6;
|
||||
benchNameTextBox7.Text = Program.LocalSettings.Bench7;
|
||||
benchNameTextBox8.Text = Program.LocalSettings.Bench8;
|
||||
benchNameTextBox9.Text = Program.LocalSettings.Bench9;
|
||||
|
||||
connectionStringTextBox1.Text = Program.LocalSettings.ConnectionString1;
|
||||
connectionStringTextBox2.Text = Program.LocalSettings.ConnectionString2;
|
||||
@@ -28,6 +31,9 @@ namespace ResultsBrowser.Forms
|
||||
connectionStringTextBox4.Text = Program.LocalSettings.ConnectionString4;
|
||||
connectionStringTextBox5.Text = Program.LocalSettings.ConnectionString5;
|
||||
connectionStringTextBox6.Text = Program.LocalSettings.ConnectionString6;
|
||||
connectionStringTextBox7.Text = Program.LocalSettings.ConnectionString7;
|
||||
connectionStringTextBox8.Text = Program.LocalSettings.ConnectionString8;
|
||||
connectionStringTextBox9.Text = Program.LocalSettings.ConnectionString9;
|
||||
|
||||
timePeriodFormatTextBox.Text = Program.LocalSettings.TimePeriodFormat;
|
||||
|
||||
@@ -53,6 +59,9 @@ namespace ResultsBrowser.Forms
|
||||
Program.LocalSettings.Bench4 = benchNameTextBox4.Text;
|
||||
Program.LocalSettings.Bench5 = benchNameTextBox5.Text;
|
||||
Program.LocalSettings.Bench6 = benchNameTextBox6.Text;
|
||||
Program.LocalSettings.Bench7 = benchNameTextBox7.Text;
|
||||
Program.LocalSettings.Bench8 = benchNameTextBox8.Text;
|
||||
Program.LocalSettings.Bench9 = benchNameTextBox9.Text;
|
||||
|
||||
Program.LocalSettings.ConnectionString1 = connectionStringTextBox1.Text;
|
||||
Program.LocalSettings.ConnectionString2 = connectionStringTextBox2.Text;
|
||||
@@ -60,6 +69,9 @@ namespace ResultsBrowser.Forms
|
||||
Program.LocalSettings.ConnectionString4 = connectionStringTextBox4.Text;
|
||||
Program.LocalSettings.ConnectionString5 = connectionStringTextBox5.Text;
|
||||
Program.LocalSettings.ConnectionString6 = connectionStringTextBox6.Text;
|
||||
Program.LocalSettings.ConnectionString7 = connectionStringTextBox7.Text;
|
||||
Program.LocalSettings.ConnectionString8 = connectionStringTextBox8.Text;
|
||||
Program.LocalSettings.ConnectionString9 = connectionStringTextBox9.Text;
|
||||
|
||||
Program.LocalSettings.TimePeriodFormat = timePeriodFormatTextBox.Text;
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@ namespace ResultsBrowser
|
||||
public string Bench4;
|
||||
public string Bench5;
|
||||
public string Bench6;
|
||||
public string Bench7;
|
||||
public string Bench8;
|
||||
public string Bench9;
|
||||
|
||||
/// Database settings of servers.
|
||||
public string ConnectionString1;
|
||||
@@ -38,6 +41,9 @@ namespace ResultsBrowser
|
||||
public string ConnectionString4;
|
||||
public string ConnectionString5;
|
||||
public string ConnectionString6;
|
||||
public string ConnectionString7;
|
||||
public string ConnectionString8;
|
||||
public string ConnectionString9;
|
||||
|
||||
public bool Bench1Selected;
|
||||
public bool Bench2Selected;
|
||||
@@ -45,6 +51,9 @@ namespace ResultsBrowser
|
||||
public bool Bench4Selected;
|
||||
public bool Bench5Selected;
|
||||
public bool Bench6Selected;
|
||||
public bool Bench7Selected;
|
||||
public bool Bench8Selected;
|
||||
public bool Bench9Selected;
|
||||
|
||||
public string TimePeriodFormat;
|
||||
|
||||
@@ -115,14 +124,16 @@ namespace ResultsBrowser
|
||||
Bench3 = "WR13";
|
||||
Bench4 = "WR14";
|
||||
Bench5 = "WR15";
|
||||
Bench6 = "PT7";
|
||||
ConnectionString1 = "SERVER=10.42.130.69; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString2 = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString3 = "SERVER=10.42.128.61; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString4 = "SERVER=10.42.130.72; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString5 = "SERVER=10.42.130.71; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
ConnectionString6 = "SERVER=10.42.129.26; DATABASE=iperlspecial-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
|
||||
Language = "SK";
|
||||
Bench6 = "WR18";
|
||||
Bench7 = "WR19";
|
||||
ConnectionString1 = "SERVER=10.42.129.253; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
|
||||
ConnectionString2 = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
|
||||
ConnectionString3 = "SERVER=10.42.128.138; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
|
||||
ConnectionString4 = "SERVER=10.42.128.146; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
|
||||
ConnectionString5 = "SERVER=10.42.130.97; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
|
||||
ConnectionString6 = "SERVER=10.42.130.165; DATABASE=st-wr18-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
|
||||
ConnectionString7 = "SERVER=10.42.128.159; DATABASE=st-wr19-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
|
||||
Language = "EN";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace ResultsBrowser
|
||||
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
ExecutableDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||
#if false
|
||||
#if true
|
||||
/// Config directory is a sibling directory of the executable directory
|
||||
ConfigDirectory = Path.Combine(ExecutableDirectory, "..", string.Format("Cfg{0}", (args.Length >= 1) ? args[0] : string.Empty));
|
||||
LogDirectory = Path.Combine(ExecutableDirectory, "..\\Log\\");
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.1.1464.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.1464.0")]
|
||||
[assembly: AssemblyVersion("3.1.1800.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.1800.0")]
|
||||
|
||||
@@ -16,19 +16,19 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MANAGED;ORACLE_DB</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;MANAGED;ORACLE_DB;TURA_IPERL</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
|
||||
@@ -317,6 +317,12 @@ namespace SchematicDrawing
|
||||
Shapes[DrShIx(Shape.PressM, Sz.L)] = new DrawingShape(Shape.PressM, Sz.L, 0, 0);
|
||||
Shapes[DrShIx(Shape.PressM, Sz.XL)] = new DrawingShape(Shape.PressM, Sz.XL, 0, 0);
|
||||
|
||||
/// Parallel flow meters
|
||||
Shapes[DrShIx(Shape.ParallelFlowM, Sz.S)] = new DrawingShape(Shape.ParallelFlowM, Sz.S, 0, 0);
|
||||
Shapes[DrShIx(Shape.ParallelFlowM, Sz.M)] = new DrawingShape(Shape.ParallelFlowM, Sz.M, 0, 0);
|
||||
Shapes[DrShIx(Shape.ParallelFlowM, Sz.L)] = new DrawingShape(Shape.ParallelFlowM, Sz.L, 0, 0);
|
||||
Shapes[DrShIx(Shape.ParallelFlowM, Sz.XL)] = new DrawingShape(Shape.ParallelFlowM, Sz.XL, 0, 0);
|
||||
|
||||
/// Valve
|
||||
Shapes[DrShIx(Shape.Valve, Sz.S)] = new DrawingShape(Shape.Valve, Sz.S, 2, 2,
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace SchematicDrawing
|
||||
FlowM,
|
||||
Junction,
|
||||
Knee,
|
||||
ParallelFlowM,
|
||||
PressM,
|
||||
Pump,
|
||||
PumpFM,
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("3.0.2.0")]
|
||||
[assembly: AssemblyFileVersion("3.0.2.0")]
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
||||
@@ -140,13 +140,7 @@ namespace SchematicDrawing
|
||||
}
|
||||
set {
|
||||
pipesS.Clear();
|
||||
if (value != null)
|
||||
{
|
||||
foreach (var pStr in value)
|
||||
{
|
||||
pipesS.Add(new Pipe(pStr, Sz.S, Id2Item));
|
||||
}
|
||||
}
|
||||
if (value != null) foreach (var pStr in value) pipesS.Add(new Pipe(pStr, Sz.S, Id2Item));
|
||||
|
||||
if (!supressRedraws)
|
||||
{
|
||||
@@ -158,22 +152,14 @@ namespace SchematicDrawing
|
||||
///
|
||||
public string[] PipesM
|
||||
{
|
||||
get
|
||||
{
|
||||
get {
|
||||
string[] retv = new string[pipesM.Count];
|
||||
for (int i = 0; i < pipesM.Count; i++) retv[i] = pipesM[i].ToString();
|
||||
return retv;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
pipesM.Clear();
|
||||
if (value != null)
|
||||
{
|
||||
foreach (var pStr in value)
|
||||
{
|
||||
pipesM.Add(new Pipe(pStr, Sz.M, Id2Item));
|
||||
}
|
||||
}
|
||||
if (value != null) foreach (var pStr in value) pipesM.Add(new Pipe(pStr, Sz.M, Id2Item));
|
||||
|
||||
if (!supressRedraws)
|
||||
{
|
||||
@@ -192,13 +178,7 @@ namespace SchematicDrawing
|
||||
}
|
||||
set {
|
||||
pipesL.Clear();
|
||||
if (value != null)
|
||||
{
|
||||
foreach (var pStr in value)
|
||||
{
|
||||
pipesL.Add(new Pipe(pStr, Sz.L, Id2Item));
|
||||
}
|
||||
}
|
||||
if (value != null) foreach (var pStr in value) pipesL.Add(new Pipe(pStr, Sz.L, Id2Item));
|
||||
|
||||
if (!supressRedraws)
|
||||
{
|
||||
@@ -217,13 +197,7 @@ namespace SchematicDrawing
|
||||
}
|
||||
set {
|
||||
pipesXL.Clear();
|
||||
if (value != null)
|
||||
{
|
||||
foreach (var pStr in value)
|
||||
{
|
||||
pipesXL.Add(new Pipe(pStr, Sz.XL, Id2Item));
|
||||
}
|
||||
}
|
||||
if (value != null) foreach (var pStr in value) pipesXL.Add(new Pipe(pStr, Sz.XL, Id2Item));
|
||||
|
||||
if (!supressRedraws)
|
||||
{
|
||||
@@ -669,7 +643,7 @@ namespace SchematicDrawing
|
||||
if (dshape.Shape == Shape.Scale)
|
||||
{
|
||||
Rectangle r = dshape.GetRotatedFlippedImageRectangle(item);
|
||||
int level = (int)Math.Round((r.Height - 2) * msrdVal / itm.MsrdValLimHi);
|
||||
int level = (int)Math.Round((r.Height - 2) * Math.Max(0, Math.Min(msrdVal, itm.MsrdValLimHi)) / itm.MsrdValLimHi);
|
||||
e.Graphics.FillRectangle(brushWater, r.X + 2, r.Y + r.Height - 2 - level, r.Width - 4, level);
|
||||
}
|
||||
|
||||
@@ -720,10 +694,10 @@ namespace SchematicDrawing
|
||||
{
|
||||
string strVal = string.IsNullOrEmpty(its.SetpFormat) ? setpoint.ToString() : string.Format(its.SetpFormat, setpoint);
|
||||
SizeF size = (its.SetpUnit != Common.Unit.Pct) ? e.Graphics.MeasureString(strVal, setpointFont)
|
||||
: e.Graphics.MeasureString(string.Format(its.SetpFormat, 100.0), setpointFont);
|
||||
: e.Graphics.MeasureString(string.Format(its.SetpFormat, 100.0), setpointFont);
|
||||
Rectangle rect = new Rectangle(its.X + its.SetpX, its.Y + its.SetpY, (int)Math.Round(size.Width) + 4, (int)Math.Round(size.Height) + 2);
|
||||
ItemElementRectangles.Add(new ItemElementRect(item, Element.Setpoint, rect));
|
||||
int barLen = (int)Math.Round(rect.Width * setpoint / 100.0);
|
||||
int barLen = (int)Math.Round(rect.Width * Math.Max(0, Math.Min(setpoint, 100.0)) / 100.0);
|
||||
e.Graphics.FillRectangle(setpointBackColor, rect.X, rect.Y, barLen, rect.Height);
|
||||
e.Graphics.DrawRectangle(thinBlackPen, rect);
|
||||
e.Graphics.DrawString(strVal, setpointFont, setpointBrush, rect.X + 2, rect.Y + 2);
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace SharedDatabase
|
||||
}
|
||||
}
|
||||
|
||||
if (part.CodeType == CodeType.DateMMYY)
|
||||
if (part.CodeType == (sbyte)CodeType.DateMMYY)
|
||||
{
|
||||
if (info.BattMMYY != null) { error = true; break; }
|
||||
info.BattMMYY = part.Code;
|
||||
|
||||
@@ -1,37 +1,313 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using SharedDatabase.Resources;
|
||||
|
||||
namespace SharedDatabase.Entities
|
||||
{
|
||||
public class OrderInfo
|
||||
public class OrderInfo : IParamsProvider, Common.IOrderInfo
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string PurchaseOrder { get; set; }
|
||||
public virtual int TargetPcsCount { get; set; }
|
||||
public virtual int MaxPcsCount { get; set; }
|
||||
public virtual string Proc { get; set; }
|
||||
public virtual string Variant { get; set; }
|
||||
public virtual int BaseNr1 { get; set; }
|
||||
public virtual int BaseNr2 { get; set; }
|
||||
public virtual int BaseNr3 { get; set; }
|
||||
public virtual int BaseNr4 { get; set; }
|
||||
public virtual int BaseNr5 { get; set; }
|
||||
public virtual string Remark { get; set; }
|
||||
|
||||
public virtual Process Workflow { get; set; }
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string POName { get; set; } /// 0
|
||||
public virtual sbyte POState { get; set; } /// 1 0=New, 1=Active, 2=Finished
|
||||
public virtual string Workflow { get; set; } /// 2
|
||||
public virtual string TestProcedure { get; set; } /// 3
|
||||
public virtual string VariantCode { get; set; } /// 4
|
||||
public virtual string VacoDescription { get; set; } /// 5
|
||||
public virtual string MadeInText { get; set; } /// 6
|
||||
public virtual string ModuleParam { get; set; } /// 7
|
||||
public virtual string LaserMarking { get; set; } /// 8
|
||||
public virtual string Packing { get; set; } /// 9
|
||||
public virtual int PiecesCount { get; set; } /// 10
|
||||
public virtual string SNPrefix { get; set; } /// 11
|
||||
public virtual int SNFirst { get; set; } /// 12
|
||||
public virtual int SNDigitsCount { get; set; } /// 13
|
||||
public virtual string SNSuffix { get; set; } /// 14
|
||||
public virtual string RAPrefix { get; set; } /// 15
|
||||
public virtual int RAFirst { get; set; } /// 16
|
||||
public virtual string RASuffix { get; set; } /// 17
|
||||
public virtual string Remark { get; set; } /// 18
|
||||
public virtual int BaseNr1 { get; set; }
|
||||
public virtual int BaseNr2 { get; set; }
|
||||
public virtual int BaseNr3 { get; set; }
|
||||
public virtual int BaseNr4 { get; set; }
|
||||
public virtual int BaseNr5 { get; set; }
|
||||
public virtual int CurrentPcsCount { get; set; }
|
||||
public virtual int CurrentSN { get; set; }
|
||||
public virtual int CurrentRA { get; set; }
|
||||
public virtual int CurrentNr1 { get; set; }
|
||||
public virtual int CurrentNr2 { get; set; }
|
||||
public virtual int CurrentNr3 { get; set; }
|
||||
public virtual int CurrentNr4 { get; set; }
|
||||
public virtual int CurrentNr5 { get; set; }
|
||||
|
||||
public OrderInfo()
|
||||
{
|
||||
POName = string.Empty;
|
||||
InitializeAll();
|
||||
}
|
||||
|
||||
public OrderInfo(string orderName)
|
||||
{
|
||||
PurchaseOrder = string.Empty;
|
||||
Proc = string.Empty;
|
||||
POName = orderName;
|
||||
InitializeAll();
|
||||
}
|
||||
|
||||
public virtual void InitializeAll()
|
||||
{
|
||||
POState = (sbyte)OrderState.New;
|
||||
Workflow = string.Empty;
|
||||
TestProcedure = string.Empty;
|
||||
VariantCode = string.Empty;
|
||||
VacoDescription = string.Empty;
|
||||
MadeInText = string.Empty;
|
||||
ModuleParam = string.Empty;
|
||||
LaserMarking = string.Empty;
|
||||
Packing = string.Empty;
|
||||
SNPrefix = string.Empty;
|
||||
SNSuffix = string.Empty;
|
||||
RAPrefix = string.Empty;
|
||||
RASuffix = string.Empty;
|
||||
Remark = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual XmlSerializer GetSerializer() { return null; }
|
||||
|
||||
public virtual string ComponentName { get { return POName; } }
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
Strings.Order,
|
||||
Strings.State,
|
||||
Strings.Workflow,
|
||||
Strings.Test_procedure,
|
||||
Strings.Variant_code,
|
||||
Strings.Variant_description,
|
||||
Strings.Made_in_text,
|
||||
Strings.Module_parameter,
|
||||
Strings.Laser_marking,
|
||||
Strings.Packing,
|
||||
Strings.Pieces_count,
|
||||
Strings.Serial_nr + " " + Strings.prefix,
|
||||
Strings.Serial_nr + " " + Strings.first,
|
||||
Strings.Serial_nr + " " + Strings.digits_count,
|
||||
Strings.Serial_nr + " " + Strings.suffix,
|
||||
Strings.Radio_address + " " + Strings.prefix,
|
||||
Strings.Radio_address + " " + Strings.first,
|
||||
Strings.Radio_address + " " + Strings.suffix,
|
||||
Strings.Remark,
|
||||
};
|
||||
public virtual string ParamName(int i) { return paramNames[i]; }
|
||||
public virtual int ParamsCount() { return paramNames.Length; }
|
||||
|
||||
public virtual ICollection<string> ParamValues(int i)
|
||||
{
|
||||
var list = new List<string>();
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
for (OrderState os = 0; os < OrderState.Count; os++) list.Add(os.ToString());
|
||||
return list;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string ToString(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: return POName;
|
||||
case 1: return ((OrderState)POState).ToString();
|
||||
case 2: return Workflow;
|
||||
case 3: return TestProcedure;
|
||||
case 4: return VariantCode;
|
||||
case 5: return VacoDescription;
|
||||
case 6: return MadeInText;
|
||||
case 7: return ModuleParam;
|
||||
case 8: return LaserMarking;
|
||||
case 9: return Packing;
|
||||
case 10: return PiecesCount.ToString();
|
||||
case 11: return SNPrefix;
|
||||
case 12: return SNFirst.ToString();
|
||||
case 13: return SNDigitsCount.ToString();
|
||||
case 14: return SNSuffix;
|
||||
case 15: return RAPrefix;
|
||||
case 16: return RAFirst.ToString();
|
||||
case 17: return RASuffix;
|
||||
case 18: return Remark;
|
||||
default:
|
||||
return string.Format("order={0} pcs={1} wflow={2} proc={3} vaco={4} remark={5}",
|
||||
POName, PiecesCount, Workflow, TestProcedure, VariantCode, Remark);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual CfgUpdateFlags UpdateParam(int i, string str)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: POName = str; break;
|
||||
case 2: Workflow = str; break;
|
||||
case 3: TestProcedure = str; break;
|
||||
case 4: VariantCode = str; break;
|
||||
case 5: VacoDescription = str; break;
|
||||
case 6: MadeInText = str; break;
|
||||
case 7: ModuleParam = str; break;
|
||||
case 8: LaserMarking = str; break;
|
||||
case 9: Packing = str; break;
|
||||
case 10: PiecesCount = int.Parse(str); break;
|
||||
case 11: SNPrefix = str; break;
|
||||
case 12: SNFirst = int.Parse(str); break;
|
||||
case 13: SNDigitsCount = int.Parse(str); break;
|
||||
case 14: SNSuffix = str; break;
|
||||
case 15: RAPrefix = str; break;
|
||||
case 16: RAFirst = int.Parse(str); break;
|
||||
case 17: RASuffix = str; break;
|
||||
case 18: Remark = str; break;
|
||||
case 1:
|
||||
POState = (sbyte)((str == OrderState.New.ToString()) ? OrderState.New :
|
||||
(str == OrderState.Active.ToString()) ? OrderState.Active
|
||||
: OrderState.Finished);
|
||||
break;
|
||||
default:
|
||||
return CfgUpdateFlags.None;
|
||||
}
|
||||
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
}
|
||||
|
||||
public virtual bool ValidateParam(int i, string str, out string message)
|
||||
{
|
||||
message = string.Empty;
|
||||
int idummy;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0: /// POName
|
||||
if (str.Length != 7)
|
||||
{
|
||||
message = string.Format("Order must have 7 digits");
|
||||
return false;
|
||||
}
|
||||
else if (!int.TryParse(str, out idummy) || idummy <= 0)
|
||||
{
|
||||
message = string.Format("Order must be a positive integer number");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
case 2: /// Workflow
|
||||
case 3: /// TestProcedure
|
||||
case 8: /// LaserMarking
|
||||
case 9: /// Packing
|
||||
/// nonempty string
|
||||
if (!string.IsNullOrEmpty(str)) return true;
|
||||
message = string.Format(Strings._0_should_not_be_empty, ParamName(i));
|
||||
return false;
|
||||
case 4: /// VariantCode
|
||||
case 5: /// VacoDescription
|
||||
case 6: /// MadeInText
|
||||
case 7: /// ModuleParam
|
||||
/// string (incl. an empty one)
|
||||
if (str != null) return true;
|
||||
message = string.Format("Should not be null", ParamName(i));
|
||||
return false;
|
||||
case 1: /// POState
|
||||
if (ParamValues(i).Contains(str)) return true;
|
||||
break;
|
||||
case 10: /// PiecesCount
|
||||
case 13: /// SNDigits
|
||||
/// positive integers
|
||||
if (int.TryParse(str, out idummy) && idummy > 0) return true;
|
||||
break;
|
||||
case 11: /// SNPrefix
|
||||
case 14: /// SNSuffix
|
||||
case 15: /// RAPrefix
|
||||
case 17: /// RASuffix
|
||||
case 18: /// Remark
|
||||
/// strings
|
||||
return true;
|
||||
case 12: /// SNFirst
|
||||
case 16: /// RAFirst
|
||||
/// non-negative integer
|
||||
if (int.TryParse(str, out idummy) && idummy >= 0) return true;
|
||||
break;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
}
|
||||
|
||||
message = string.Format(Strings.Invalid_0, ParamName(i));
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual void CopyContentTo(OrderInfo dest)
|
||||
{
|
||||
dest.POName = POName;
|
||||
dest.POState = POState;
|
||||
dest.Workflow = Workflow;
|
||||
dest.TestProcedure = TestProcedure;
|
||||
dest.VariantCode = VariantCode;
|
||||
dest.VacoDescription = VacoDescription;
|
||||
dest.MadeInText = MadeInText;
|
||||
dest.ModuleParam = ModuleParam;
|
||||
dest.LaserMarking = LaserMarking;
|
||||
dest.Packing = Packing;
|
||||
dest.PiecesCount = PiecesCount;
|
||||
dest.SNPrefix = SNPrefix;
|
||||
dest.SNFirst = SNFirst;
|
||||
dest.SNDigitsCount = SNDigitsCount;
|
||||
dest.SNSuffix = SNSuffix;
|
||||
dest.RAPrefix = RAPrefix;
|
||||
dest.RAFirst = RAFirst;
|
||||
dest.RASuffix = RASuffix;
|
||||
dest.Remark = Remark;
|
||||
dest.BaseNr1 = BaseNr1;
|
||||
dest.BaseNr2 = BaseNr2;
|
||||
dest.BaseNr3 = BaseNr3;
|
||||
dest.BaseNr4 = BaseNr4;
|
||||
dest.BaseNr5 = BaseNr5;
|
||||
dest.CurrentPcsCount = CurrentPcsCount;
|
||||
dest.CurrentSN = CurrentSN;
|
||||
dest.CurrentRA = CurrentRA;
|
||||
dest.CurrentNr1 = CurrentNr1;
|
||||
dest.CurrentNr2 = CurrentNr2;
|
||||
dest.CurrentNr3 = CurrentNr3;
|
||||
dest.CurrentNr4 = CurrentNr4;
|
||||
dest.CurrentNr5 = CurrentNr5;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// All members are copied except of ID (so that NHibernate works properly).
|
||||
/// List of groups is empty.
|
||||
/// </summary>
|
||||
/// <param name="newOrderNr">New order ID string</param>
|
||||
/// <param name="targetPiecesCount">-1 = the same number of pieces as the original order</param>
|
||||
/// <returns></returns>
|
||||
public virtual IParamsProvider Clone()
|
||||
{
|
||||
OrderInfo clone = new OrderInfo();
|
||||
CopyContentTo(clone);
|
||||
return clone;
|
||||
}
|
||||
|
||||
public virtual bool UpdateEmbeddedDbEntity()
|
||||
{
|
||||
return true; /// =OK, do nothing
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("PO={0} pcs={1} max.pcs={2} wflow={3} proc={4} var={5} #1={6} #2={7} #3={8} #4={9} #5={10} remark={11}",
|
||||
PurchaseOrder, TargetPcsCount, MaxPcsCount, Workflow, Proc, Variant,
|
||||
BaseNr1, BaseNr2, BaseNr3, BaseNr4, BaseNr5, Remark);
|
||||
return POName;
|
||||
}
|
||||
}
|
||||
|
||||
public enum OrderState : sbyte
|
||||
{
|
||||
New = 0,
|
||||
Active = 1,
|
||||
Finished = 2,
|
||||
Count
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@ namespace SharedDatabase.Entities
|
||||
public virtual string Name { get; set; }
|
||||
public virtual string OraDBType { get; set; }
|
||||
public virtual string Description { get; set; }
|
||||
public virtual CodeType CodeType { get; set; }
|
||||
public virtual CodeForm CodeForm { get; set; }
|
||||
public virtual sbyte CodeType { get; set; }
|
||||
public virtual sbyte CodeForm { get; set; }
|
||||
public virtual CodeLocation CodeLocation { get; set; }
|
||||
public virtual string DefaultCode { get; set; }
|
||||
public virtual LifetimeManagement LifetimeManagement { get; set; }
|
||||
public virtual int StepNumber { get; set; }
|
||||
|
||||
public virtual Process Process { get; set; }
|
||||
public virtual Process Workflow { get; set; }
|
||||
public virtual Workstep Workstep { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -24,7 +24,7 @@ namespace SharedDatabase.Entities
|
||||
/// </summary>
|
||||
/// <param name="process">Process owning the cloned part</param>
|
||||
/// <returns>Cloned part</returns>
|
||||
public virtual Part Clone(Process owningProcess)
|
||||
public virtual Part Clone(Process owningWorkflow)
|
||||
{
|
||||
Part rslt = new Part();
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace SharedDatabase.Entities
|
||||
rslt.LifetimeManagement = LifetimeManagement;
|
||||
rslt.StepNumber = StepNumber;
|
||||
|
||||
rslt.Process = owningProcess;
|
||||
rslt.Workflow = owningWorkflow;
|
||||
rslt.Workstep = null;
|
||||
|
||||
return rslt;
|
||||
@@ -51,11 +51,11 @@ namespace SharedDatabase.Entities
|
||||
Description = string.Empty;
|
||||
}
|
||||
|
||||
public Part(string name, Process process, string description)
|
||||
public Part(string name, Process workflow, string description)
|
||||
{
|
||||
Name = name;
|
||||
Workflow = workflow;
|
||||
Description = description;
|
||||
Process = process;
|
||||
Workstep = null;
|
||||
}
|
||||
|
||||
@@ -65,19 +65,19 @@ namespace SharedDatabase.Entities
|
||||
/// <param name="name"></param>
|
||||
/// <param name="codeType"></param>
|
||||
/// <param name="codeForm"></param>
|
||||
/// <param name="process"></param>
|
||||
public Part(string name, Process process, CodeType codeType, CodeForm codeForm, CodeLocation codeLocation)
|
||||
/// <param name="workflow"></param>
|
||||
public Part(string name, Process workflow, CodeType codeType, CodeForm codeForm, CodeLocation codeLocation)
|
||||
{
|
||||
Name = name;
|
||||
OraDBType = string.Empty;
|
||||
Description = string.Empty;
|
||||
CodeType = codeType;
|
||||
CodeForm = codeForm;
|
||||
CodeType = (sbyte)codeType;
|
||||
CodeForm = (sbyte)codeForm;
|
||||
CodeLocation = codeLocation;
|
||||
DefaultCode = string.Empty;
|
||||
StepNumber = 0;
|
||||
|
||||
Process = process;
|
||||
Workflow = workflow;
|
||||
Workstep = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ namespace SharedDatabase.Entities
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual int ItemNr { get; set; }
|
||||
public virtual string Name { get; set; }
|
||||
public virtual int SubClass { get; set; } /// Main process: 1, Sub processes: 2, 4, 8, ...
|
||||
public virtual string Description { get; set; }
|
||||
public virtual string CreatedBy { get; set; }
|
||||
public virtual DateTime TimeStamp { get; set; }
|
||||
@@ -17,46 +16,9 @@ namespace SharedDatabase.Entities
|
||||
public virtual DateTime TimeStamp2 { get; set; }
|
||||
public virtual string ReleaseNotes { get; set; }
|
||||
public virtual ReleaseStatus ReleaseStatus { get; set; }
|
||||
|
||||
public virtual IList<Part> Parts { get; set; }
|
||||
public virtual IList<Workstep> Worksteps { get; set; }
|
||||
|
||||
#region SubClass utilities
|
||||
|
||||
/// Wrappers
|
||||
public virtual SubClass GetSubClass() { return (SubClass)SubClass; }
|
||||
public virtual void SetSubClass(SubClass subClass) { SubClass = (int)subClass; }
|
||||
|
||||
///// Convert SubClass to string
|
||||
//public static string SubClass2Str(SubClass subClass)
|
||||
//{
|
||||
// return subClass.ToDescription();
|
||||
//}
|
||||
|
||||
///// Convert string to SubClass
|
||||
//public static SubClass Str2SubClass(string str)
|
||||
//{
|
||||
// foreach (SubClass sc in Enum.GetValues(typeof(SubClass)))
|
||||
// {
|
||||
// if ((str == sc.ToDescription()) && (sc != SubClass.Invalid)) return sc;
|
||||
// }
|
||||
|
||||
// return SubClass.Invalid;
|
||||
//}
|
||||
|
||||
///// Determine whether string is a valid SubClass name
|
||||
//public static bool IsValidSubClassStr(string str)
|
||||
//{
|
||||
// foreach (SubClass sc in Enum.GetValues(typeof(SubClass)))
|
||||
// {
|
||||
// if ((str == sc.ToDescription()) && (sc != SubClass.Invalid)) return true;
|
||||
// }
|
||||
|
||||
// return false;
|
||||
//}
|
||||
|
||||
#endregion SubClass utilities
|
||||
|
||||
/// <summary>
|
||||
/// Default (private) constructor inicializing lists
|
||||
/// </summary>
|
||||
@@ -74,8 +36,7 @@ namespace SharedDatabase.Entities
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
SubClass = 0;
|
||||
Description = string.Empty;
|
||||
Description = string.Empty;
|
||||
ReleaseNotes = string.Empty;
|
||||
CreatedBy = "admin";
|
||||
TimeStamp = DateTime.Now;
|
||||
@@ -102,7 +63,6 @@ namespace SharedDatabase.Entities
|
||||
public virtual Process Clone(string name, string userName)
|
||||
{
|
||||
Process rslt = new Process(name);
|
||||
rslt.SubClass = SubClass;
|
||||
rslt.Description = Description;
|
||||
rslt.ReleaseNotes = ReleaseNotes;
|
||||
rslt.CreatedBy = userName;
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace SharedDatabase.Entities
|
||||
public virtual string UserName { get; set; }
|
||||
public virtual string Workplace { get; set; }
|
||||
public virtual int Result { get; set; } /// 0 = No error (OK), >0 = Error code
|
||||
|
||||
public virtual Process Process { get; set; }
|
||||
public virtual OrderInfo POrder { get; set; }
|
||||
public virtual Process Workflow { get; set; }
|
||||
public virtual Workstep Workstep { get; set; }
|
||||
public virtual IList<Record> Records { get; set; }
|
||||
|
||||
@@ -28,14 +28,16 @@ namespace SharedDatabase.Entities
|
||||
/// <summary>
|
||||
/// Constructor used when reference barcode is scanned
|
||||
/// </summary>
|
||||
/// <param name="process">Process</param>
|
||||
/// <param name="porder">Production order</param>
|
||||
/// <param name="workflow">Process</param>
|
||||
/// <param name="workstep">Workstep</param>
|
||||
/// <param name="code">Scanned barcode</param>
|
||||
public ReferenceRecord(Process process, Workstep workstep, string code,
|
||||
public ReferenceRecord(OrderInfo porder, Process workflow, Workstep workstep, string code,
|
||||
string userName, string workplace, int result)
|
||||
: this()
|
||||
{
|
||||
Process = process;
|
||||
POrder = porder;
|
||||
Workflow = workflow;
|
||||
Workstep = workstep;
|
||||
Code = code;
|
||||
TimeStamp = DateTime.Now;
|
||||
@@ -45,7 +47,7 @@ namespace SharedDatabase.Entities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a copy of a process with a new name
|
||||
/// Create a copy of a reference record with a new name
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
@@ -61,7 +63,7 @@ namespace SharedDatabase.Entities
|
||||
}
|
||||
}
|
||||
|
||||
ReferenceRecord rslt = new ReferenceRecord(newProcess, newWorkstep,
|
||||
ReferenceRecord rslt = new ReferenceRecord(POrder, newProcess, newWorkstep,
|
||||
Code, UserName, Workplace, Result);
|
||||
rslt.TimeStamp = TimeStamp;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace SharedDatabase.Entities
|
||||
public virtual int CheckPartNr { get; set; } /// 0 == No previous part checked
|
||||
public virtual bool AllowRepairs { get; set; }
|
||||
|
||||
public virtual Process Process { get; set; }
|
||||
public virtual Process Workflow { get; set; }
|
||||
public virtual Part ReferencePart { get; set; }
|
||||
public virtual IList<Part> Parts { get; set; }
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace SharedDatabase.Entities
|
||||
Description = string.Empty;
|
||||
CheckPartNr = 0;
|
||||
AllowRepairs = false;
|
||||
Process = process;
|
||||
Workflow = process;
|
||||
ReferencePart = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Common;
|
||||
using GemCard;
|
||||
using SharedDatabase.Entities;
|
||||
@@ -17,6 +18,8 @@ namespace SharedDatabase.Forms
|
||||
/// </summary>
|
||||
public partial class LoginDlg : Form
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(LoginDlg));
|
||||
|
||||
/// Public readonly
|
||||
public string UserName { get { return user; } }
|
||||
|
||||
@@ -111,10 +114,16 @@ namespace SharedDatabase.Forms
|
||||
string[] cardReaders = card.ListReaders();
|
||||
if (cardReaders != null)
|
||||
{
|
||||
foreach (var crd in cardReaders)
|
||||
{
|
||||
log.WarnFormat("SMART card reader found: {0}", crd);
|
||||
}
|
||||
|
||||
foreach (var crd in cardReaders)
|
||||
{
|
||||
if (crd.Contains("NFC"))
|
||||
{
|
||||
log.ErrorFormat("SMART card reader selected: {0}", crd);
|
||||
smartCardReader = crd; /// NFC smart card reader detected
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace SharedDatabase
|
||||
case ItemSpecID.MaxTestindexEx: return null;
|
||||
case ItemSpecID.TestBenchId: return null;
|
||||
|
||||
case ItemSpecID.Process: return Projections.Property(() => refRecord.Process);
|
||||
case ItemSpecID.Process: return Projections.Property(() => refRecord.Workflow);
|
||||
case ItemSpecID.Result: return Projections.Property(() => refRecord.Result);
|
||||
|
||||
default: return null;
|
||||
@@ -217,7 +217,7 @@ namespace SharedDatabase
|
||||
case ItemSpecID.MaxTestindexEx: return null;
|
||||
case ItemSpecID.TestBenchId: return null;
|
||||
|
||||
case ItemSpecID.Process: return Projections.Property(() => refRecord2.Process);
|
||||
case ItemSpecID.Process: return Projections.Property(() => refRecord2.Workflow);
|
||||
case ItemSpecID.Result: return Projections.Property(() => refRecord2.Result);
|
||||
|
||||
default: return null;
|
||||
|
||||
@@ -1,25 +1,47 @@
|
||||
using FluentNHibernate.Mapping;
|
||||
using SharedDatabase.Entities;
|
||||
|
||||
namespace SharedDatabase.Mappings
|
||||
{
|
||||
class OrderInfoMap : ClassMap<Entities.OrderInfo>
|
||||
class OrderInfoMap : ClassMap<OrderInfo>
|
||||
{
|
||||
public OrderInfoMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.PurchaseOrder);
|
||||
Map(x => x.TargetPcsCount);
|
||||
Map(x => x.MaxPcsCount);
|
||||
Map(x => x.Proc);
|
||||
Map(x => x.Variant);
|
||||
Map(x => x.POName);
|
||||
Map(x => x.POState);
|
||||
Map(x => x.Workflow);
|
||||
Map(x => x.TestProcedure);
|
||||
Map(x => x.VariantCode);
|
||||
Map(x => x.VacoDescription);
|
||||
Map(x => x.MadeInText);
|
||||
Map(x => x.ModuleParam)
|
||||
.CustomType("StringClob")
|
||||
.CustomSqlType("varchar(2000)");
|
||||
Map(x => x.LaserMarking);
|
||||
Map(x => x.Packing);
|
||||
Map(x => x.PiecesCount);
|
||||
Map(x => x.SNPrefix);
|
||||
Map(x => x.SNFirst);
|
||||
Map(x => x.SNDigitsCount);
|
||||
Map(x => x.SNSuffix);
|
||||
Map(x => x.RAPrefix);
|
||||
Map(x => x.RAFirst);
|
||||
Map(x => x.RASuffix);
|
||||
Map(x => x.Remark);
|
||||
Map(x => x.BaseNr1);
|
||||
Map(x => x.BaseNr2);
|
||||
Map(x => x.BaseNr3);
|
||||
Map(x => x.BaseNr4);
|
||||
Map(x => x.BaseNr5);
|
||||
Map(x => x.Remark);
|
||||
|
||||
References(x => x.Workflow);
|
||||
Map(x => x.CurrentPcsCount);
|
||||
Map(x => x.CurrentSN);
|
||||
Map(x => x.CurrentRA);
|
||||
Map(x => x.CurrentNr1);
|
||||
Map(x => x.CurrentNr2);
|
||||
Map(x => x.CurrentNr3);
|
||||
Map(x => x.CurrentNr4);
|
||||
Map(x => x.CurrentNr5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,8 @@ namespace SharedDatabase.Mappings
|
||||
Map(x => x.LifetimeManagement);
|
||||
Map(x => x.StepNumber);
|
||||
|
||||
References(x => x.Process);
|
||||
References(x => x.Workflow)
|
||||
.Column("Process_id");
|
||||
References(x => x.Workstep);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ namespace SharedDatabase.Mappings
|
||||
|
||||
Map(x => x.ItemNr);
|
||||
Map(x => x.Name);
|
||||
Map(x => x.SubClass);
|
||||
Map(x => x.Description);
|
||||
Map(x => x.ReleaseNotes)
|
||||
.CustomType("StringClob")
|
||||
|
||||
@@ -13,7 +13,9 @@ namespace SharedDatabase.Mappings
|
||||
Map(x => x.Workplace);
|
||||
Map(x => x.Result);
|
||||
|
||||
References(x => x.Process);
|
||||
References(x => x.POrder);
|
||||
References(x => x.Workflow)
|
||||
.Column("Process_id");
|
||||
References(x => x.Workstep);
|
||||
HasMany(x => x.Records)
|
||||
.Cascade.All();
|
||||
|
||||
@@ -13,7 +13,8 @@ namespace SharedDatabase.Mappings
|
||||
Map(x => x.CheckPartNr);
|
||||
Map(x => x.AllowRepairs);
|
||||
|
||||
References(x => x.Process);
|
||||
References(x => x.Workflow)
|
||||
.Column("Process_id");
|
||||
References(x => x.ReferencePart);
|
||||
HasMany(x => x.Parts)
|
||||
.OrderBy("StepNumber")
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("3.0.1.0")]
|
||||
[assembly: AssemblyFileVersion("3.0.1.0")]
|
||||
|
||||
+180
@@ -60,6 +60,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to '{0}' should not be empty.
|
||||
/// </summary>
|
||||
internal static string _0_should_not_be_empty {
|
||||
get {
|
||||
return ResourceManager.GetString("_0_should_not_be_empty", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Add.
|
||||
/// </summary>
|
||||
@@ -96,6 +105,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Base {0}.
|
||||
/// </summary>
|
||||
internal static string Base_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Base_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to calibration specialist.
|
||||
/// </summary>
|
||||
@@ -159,6 +177,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to digits count.
|
||||
/// </summary>
|
||||
internal static string digits_count {
|
||||
get {
|
||||
return ResourceManager.GetString("digits_count", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Edit User.
|
||||
/// </summary>
|
||||
@@ -195,6 +222,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to first.
|
||||
/// </summary>
|
||||
internal static string first {
|
||||
get {
|
||||
return ResourceManager.GetString("first", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow.
|
||||
/// </summary>
|
||||
@@ -249,6 +285,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid '{0}'.
|
||||
/// </summary>
|
||||
internal static string Invalid_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid Q2 correction factors.
|
||||
/// </summary>
|
||||
@@ -267,6 +312,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Laser marking.
|
||||
/// </summary>
|
||||
internal static string Laser_marking {
|
||||
get {
|
||||
return ResourceManager.GetString("Laser_marking", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Lower limit.
|
||||
/// </summary>
|
||||
@@ -276,6 +330,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Made in text.
|
||||
/// </summary>
|
||||
internal static string Made_in_text {
|
||||
get {
|
||||
return ResourceManager.GetString("Made_in_text", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to maintenance.
|
||||
/// </summary>
|
||||
@@ -312,6 +375,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Module parameter.
|
||||
/// </summary>
|
||||
internal static string Module_parameter {
|
||||
get {
|
||||
return ResourceManager.GetString("Module_parameter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} users copied.
|
||||
/// </summary>
|
||||
@@ -393,6 +465,24 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Order.
|
||||
/// </summary>
|
||||
internal static string Order {
|
||||
get {
|
||||
return ResourceManager.GetString("Order", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Packing.
|
||||
/// </summary>
|
||||
internal static string Packing {
|
||||
get {
|
||||
return ResourceManager.GetString("Packing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Part barcode.
|
||||
/// </summary>
|
||||
@@ -456,6 +546,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pieces count.
|
||||
/// </summary>
|
||||
internal static string Pieces_count {
|
||||
get {
|
||||
return ResourceManager.GetString("Pieces_count", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Power user cannot change it's password.
|
||||
/// </summary>
|
||||
@@ -465,6 +564,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to prefix.
|
||||
/// </summary>
|
||||
internal static string prefix {
|
||||
get {
|
||||
return ResourceManager.GetString("prefix", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Previous step is missing or NOK.
|
||||
/// </summary>
|
||||
@@ -492,6 +600,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Radio address.
|
||||
/// </summary>
|
||||
internal static string Radio_address {
|
||||
get {
|
||||
return ResourceManager.GetString("Radio_address", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Ref. part barcode.
|
||||
/// </summary>
|
||||
@@ -528,6 +645,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Remark.
|
||||
/// </summary>
|
||||
internal static string Remark {
|
||||
get {
|
||||
return ResourceManager.GetString("Remark", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Remove.
|
||||
/// </summary>
|
||||
@@ -573,6 +699,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to S/N.
|
||||
/// </summary>
|
||||
internal static string SN {
|
||||
get {
|
||||
return ResourceManager.GetString("SN", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to specialist.
|
||||
/// </summary>
|
||||
@@ -582,6 +717,24 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to State.
|
||||
/// </summary>
|
||||
internal static string State {
|
||||
get {
|
||||
return ResourceManager.GetString("State", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to suffix.
|
||||
/// </summary>
|
||||
internal static string suffix {
|
||||
get {
|
||||
return ResourceManager.GetString("suffix", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to NFC Tag.
|
||||
/// </summary>
|
||||
@@ -618,6 +771,15 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test procedure.
|
||||
/// </summary>
|
||||
internal static string Test_procedure {
|
||||
get {
|
||||
return ResourceManager.GetString("Test_procedure", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test repetition count exceeded the upper limit.
|
||||
/// </summary>
|
||||
@@ -744,6 +906,24 @@ namespace SharedDatabase.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Variant code.
|
||||
/// </summary>
|
||||
internal static string Variant_code {
|
||||
get {
|
||||
return ResourceManager.GetString("Variant_code", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Variant description.
|
||||
/// </summary>
|
||||
internal static string Variant_description {
|
||||
get {
|
||||
return ResourceManager.GetString("Variant_description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warning.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,101 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
<!--
|
||||
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.
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
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>
|
||||
@@ -366,4 +366,64 @@
|
||||
<data name="Yes" xml:space="preserve">
|
||||
<value>Yes</value>
|
||||
</data>
|
||||
<data name="first" xml:space="preserve">
|
||||
<value>first</value>
|
||||
</data>
|
||||
<data name="Order" xml:space="preserve">
|
||||
<value>Order</value>
|
||||
</data>
|
||||
<data name="Pieces_count" xml:space="preserve">
|
||||
<value>Pieces count</value>
|
||||
</data>
|
||||
<data name="digits_count" xml:space="preserve">
|
||||
<value>digits count</value>
|
||||
</data>
|
||||
<data name="Test_procedure" xml:space="preserve">
|
||||
<value>Test procedure</value>
|
||||
</data>
|
||||
<data name="Variant_code" xml:space="preserve">
|
||||
<value>Variant code</value>
|
||||
</data>
|
||||
<data name="Base_0" xml:space="preserve">
|
||||
<value>Base {0}</value>
|
||||
</data>
|
||||
<data name="Invalid_0" xml:space="preserve">
|
||||
<value>Invalid '{0}'</value>
|
||||
</data>
|
||||
<data name="prefix" xml:space="preserve">
|
||||
<value>prefix</value>
|
||||
</data>
|
||||
<data name="Remark" xml:space="preserve">
|
||||
<value>Remark</value>
|
||||
</data>
|
||||
<data name="State" xml:space="preserve">
|
||||
<value>State</value>
|
||||
</data>
|
||||
<data name="suffix" xml:space="preserve">
|
||||
<value>suffix</value>
|
||||
</data>
|
||||
<data name="_0_should_not_be_empty" xml:space="preserve">
|
||||
<value>'{0}' should not be empty</value>
|
||||
</data>
|
||||
<data name="Radio_address" xml:space="preserve">
|
||||
<value>Radio address</value>
|
||||
</data>
|
||||
<data name="SN" xml:space="preserve">
|
||||
<value>S/N</value>
|
||||
</data>
|
||||
<data name="Laser_marking" xml:space="preserve">
|
||||
<value>Laser marking</value>
|
||||
</data>
|
||||
<data name="Module_parameter" xml:space="preserve">
|
||||
<value>Module parameter</value>
|
||||
</data>
|
||||
<data name="Made_in_text" xml:space="preserve">
|
||||
<value>Made in text</value>
|
||||
</data>
|
||||
<data name="Packing" xml:space="preserve">
|
||||
<value>Packing</value>
|
||||
</data>
|
||||
<data name="Variant_description" xml:space="preserve">
|
||||
<value>Variant description</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -17,7 +17,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;ORACLE_DB</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -25,7 +25,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;ORACLE_DB</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace SharedDatabase
|
||||
|
||||
if (referenceRecords.Count == 0) return null; /// Returns an empty list if no such ref. record found
|
||||
|
||||
return referenceRecords[0].Process;
|
||||
return referenceRecords[0].Workflow;
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -231,7 +231,7 @@ namespace SharedDatabase
|
||||
foreach (var wf in workflows)
|
||||
{
|
||||
IList<Workstep> steps = session.QueryOver<Workstep>()
|
||||
.Where(ws => ((ws.Process == wf) && (ws.Name == thisWorkstepName)))
|
||||
.Where(ws => ((ws.Workflow == wf) && (ws.Name == thisWorkstepName)))
|
||||
.List();
|
||||
workflowDict.Add(wf.Id, wf);
|
||||
workflowStepsDict.Add(wf.Id, steps);
|
||||
@@ -264,7 +264,7 @@ namespace SharedDatabase
|
||||
if (workstep != null && workstep.ReferencePart != null)
|
||||
{
|
||||
IList<Workstep> worksteps = dbSession.QueryOver<Workstep>()
|
||||
.Where(x => (x.Process == process))
|
||||
.Where(x => (x.Workflow == process))
|
||||
.Where(x => (x.WorkstepNr < workstep.WorkstepNr))
|
||||
.OrderBy(x => x.WorkstepNr).Asc
|
||||
.List();
|
||||
@@ -291,9 +291,9 @@ namespace SharedDatabase
|
||||
|
||||
foreach (var part in worksteps[i].Parts)
|
||||
{
|
||||
bool isUnique = (part.CodeLocation == CodeLocation.OnPart) && ((part.CodeType == CodeType.UniqueNr)
|
||||
|| (part.CodeType == CodeType.FlowtubeNr)
|
||||
|| (part.CodeType == CodeType.FlowtubeNrLU));
|
||||
bool isUnique = (part.CodeLocation == CodeLocation.OnPart) && ((part.CodeType == (sbyte)CodeType.UniqueNr)
|
||||
|| (part.CodeType == (sbyte)CodeType.FlowtubeNr)
|
||||
|| (part.CodeType == (sbyte)CodeType.FlowtubeNrLU));
|
||||
if (isUnique)
|
||||
{
|
||||
if (part.Id == workstep.ReferencePart.Id)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user