Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71e18660a1 | ||
|
|
24fed049e2 |
@@ -19,7 +19,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>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -29,7 +29,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>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.1.1840.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.1840.0")]
|
||||
[assembly: AssemblyVersion("3.1.1842.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.1842.0")]
|
||||
|
||||
@@ -87,6 +87,9 @@ namespace TBF.Rig.DataEntry.S620
|
||||
static IList<Part> uniqueCodeParts;
|
||||
static IList<ICheckItem> palety;
|
||||
|
||||
int lastProducedPcsCount;
|
||||
int lastAssignedSN;
|
||||
|
||||
static FormForMechanicalMetersWithTracing()
|
||||
{
|
||||
workflows = new List<Process>();
|
||||
@@ -417,27 +420,29 @@ namespace TBF.Rig.DataEntry.S620
|
||||
assignedSNs.Clear();
|
||||
|
||||
var order = ProcessData.OrderInfo;
|
||||
var oraOrder = order as TBF.Rig.Output.DB.SensusOracle.OrderDetails;
|
||||
///
|
||||
var oraOrder = order as TBF.Rig.Output.DB.SensusOracle.OrderDetails;
|
||||
if (oraOrder != null && (ProcessData.OracleDB == null || !ProcessData.OracleDB.ReadOrderDetails(ref oraOrder)))
|
||||
{
|
||||
return false;
|
||||
return false; /// Oracle order details could not be loaded
|
||||
}
|
||||
|
||||
lastProducedPcsCount = order.CurrentPcsCount;
|
||||
lastAssignedSN = order.CurrentSN;
|
||||
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
bool passed = waterMeters[i].PassedFromTests();
|
||||
if (passed && !string.IsNullOrEmpty(bodyNrBoxes[i].Text) && checkBoxes[i].Checked)
|
||||
if (passed && !string.IsNullOrEmpty(bodyNrBoxes[i].Text) && checkBoxes[i].Checked && lastProducedPcsCount < order.PiecesCount)
|
||||
{
|
||||
int currentSerialNr = (order.CurrentSN < order.SNFirst)
|
||||
int currentSerialNr = (lastAssignedSN < order.SNFirst)
|
||||
? order.SNFirst
|
||||
: order.CurrentSN + 1;
|
||||
: lastAssignedSN + 1;
|
||||
|
||||
serialNrBoxes[i].Text = currentSerialNr.ToString(string.Format("D{0}", snDigits));
|
||||
|
||||
order.CurrentSN = currentSerialNr;
|
||||
order.CurrentPcsCount++;
|
||||
lastAssignedSN = currentSerialNr;
|
||||
lastProducedPcsCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -789,7 +794,13 @@ namespace TBF.Rig.DataEntry.S620
|
||||
}
|
||||
disabled[i] = !checkBoxes[i].Checked;
|
||||
}
|
||||
purchaseOrder = (preSelectedPurchaseOrder != null) ? preSelectedPurchaseOrder : orderCB.Text;
|
||||
|
||||
if (atTheEnd && ProcessData.OrderInfo != null)
|
||||
{
|
||||
ProcessData.OrderInfo.CurrentPcsCount = lastProducedPcsCount;
|
||||
ProcessData.OrderInfo.CurrentSN = lastAssignedSN;
|
||||
}
|
||||
|
||||
|
||||
//SaveProductionTracingRecords(); /// TODO
|
||||
|
||||
@@ -1521,26 +1532,6 @@ namespace TBF.Rig.DataEntry.S620
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns next free serial number within specified range or 0 if no appropriate s/n is available
|
||||
/// </summary>
|
||||
/// <returns>Serial number or 0</returns>
|
||||
int GetNextSerialNr()
|
||||
{
|
||||
for (int sn = snRangeFirst; sn <= snRangeLast; sn++)
|
||||
{
|
||||
if (!foundSNs.Contains(sn) && !assignedSNs.Contains(sn))
|
||||
{
|
||||
/// A free serial number within specified range found
|
||||
assignedSNs.Add(sn);
|
||||
return sn;
|
||||
}
|
||||
}
|
||||
|
||||
return 0; /// No free serial number found
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Read released-active processes from the database.
|
||||
/// </summary>
|
||||
|
||||
+4
-4
@@ -39,7 +39,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;MANAGED;ORACLE_DB; TURA_IPERL</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
@@ -50,7 +50,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;MANAGED;ORACLE_DB; TURA_IPERL</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -60,7 +60,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;MANAGED;ORACLE_DB; TURA_IPERL</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
@@ -70,7 +70,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;MANAGED;ORACLE_DB; TURA_IPERL</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
||||
Reference in New Issue
Block a user