Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a76ef1d999 | |||
| b76924be89 | |||
| 0effcdbb5a | |||
| 2814015459 | |||
| cf549ec8cf | |||
| 2cb5113b89 | |||
| c34e363140 | |||
| b48070f791 | |||
| fa5a80399f | |||
| 50260c0535 |
+2
-1
@@ -2,6 +2,7 @@
|
||||
# /
|
||||
/revision.h
|
||||
/*.aps
|
||||
**/*.aps
|
||||
/*.ncb
|
||||
/*.suo
|
||||
/*.user
|
||||
@@ -16,4 +17,4 @@
|
||||
**/ipch
|
||||
**/bin
|
||||
**/obj
|
||||
/.vs
|
||||
**/.vs
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28010.2016
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.10.35027.167
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationEgaltech", "IntegrationEgaltech\IntegrationEgaltech.csproj", "{A80D9CFF-5312-40C7-8F67-AC5D62C18824}"
|
||||
EndProject
|
||||
|
||||
@@ -16,13 +16,17 @@ namespace ib.essetre.integration.egaltech
|
||||
public class BTL
|
||||
{
|
||||
public string projectNumber ;
|
||||
public int productionId ;
|
||||
public int patternId ;
|
||||
public int productionId ;
|
||||
public int patternId ;
|
||||
public string barLength ;
|
||||
public string panelLength ;
|
||||
public string panelWidth ;
|
||||
public string barLoad90 ;
|
||||
public int RefPos ;
|
||||
public string barUnload ;
|
||||
public int RefPos ;
|
||||
public string panelDeltaX ;
|
||||
public string panelDeltaY ;
|
||||
public string panelDeltaZ ;
|
||||
public List<Part> parts ;
|
||||
// Contatore entità di contorno libero
|
||||
private int _FcEnt ;
|
||||
@@ -73,14 +77,13 @@ namespace ib.essetre.integration.egaltech
|
||||
tw.WriteLine( Constants.VERSION) ;
|
||||
tw.WriteLine( Constants.BUILD) ;
|
||||
tw.WriteLine( Constants.GENERAL) ;
|
||||
tw.WriteLine( Constants.PROJECT_NUMBER + this.projectNumber) ;
|
||||
tw.WriteLine( Constants.PROJECT_NUMBER + "0") ;
|
||||
tw.WriteLine( Constants.SCALE_UNIT + Constants.scaleUnit.ToString()) ;
|
||||
tw.WriteLine( Constants.USERATTRIBUTE + "\"PRODID\":" + "\"" + ( IsFromProject ? 0 : productionId) + "\"") ;
|
||||
tw.WriteLine( Constants.USERATTRIBUTE + "\"PRODID\":" + "\"" + "0" + "\"") ;
|
||||
tw.WriteLine( Constants.USERATTRIBUTE + "\"PATTID\":" + "\"" + ( IsFromProject ? 0 : patternId) + "\"") ;
|
||||
tw.WriteLine( Constants.USERATTRIBUTE + "\"BARLEN\":" + "\"" + barLength + "\"") ;
|
||||
tw.WriteLine( Constants.USERATTRIBUTE + "\"PANELLEN\":" + "\"" + panelLength + "\"") ;
|
||||
tw.WriteLine( Constants.USERATTRIBUTE + "\"PANELWIDTH\":" + "\"" + panelWidth + "\"") ;
|
||||
tw.WriteLine( Constants.USERATTRIBUTE + "\"REFPOS\":" + "\"" + RefPos.ToString() + "\"") ;
|
||||
tw.WriteLine( Constants.USERATTRIBUTE + "\"PROJECT\":" + "\"" + ( IsFromProject ? "1" : "0") + "\"") ;
|
||||
|
||||
if ( nStart <= 0) {
|
||||
@@ -105,7 +108,18 @@ namespace ib.essetre.integration.egaltech
|
||||
double wid = Convert.ToDouble( singlePart.width) * Math.Pow( 10, Constants.scaleUnit) ;
|
||||
int intWid = Convert.ToInt32( wid) ;
|
||||
tw.WriteLine( Constants.WIDTH + intWid.ToString( "D8")) ;
|
||||
|
||||
|
||||
if (singlePart.Offsets[0] != "0" || singlePart.Offsets[1] != "0" ||
|
||||
singlePart.Offsets[2] != "0" || singlePart.Offsets[3] != "0" || singlePart.Offsets[4] != "0") {
|
||||
tw.Write(Constants.PARTOFFSET);
|
||||
tw.Write(" P04:" + MultAndConvertTo8(singlePart.Offsets[0]));
|
||||
tw.Write(" P11:" + MultAndConvertTo8(singlePart.Offsets[1]));
|
||||
tw.Write(" P12:" + MultAndConvertTo8(singlePart.Offsets[2]));
|
||||
tw.Write(" P13:" + MultAndConvertTo8(singlePart.Offsets[3]));
|
||||
tw.Write(" P14:" + MultAndConvertTo8(singlePart.Offsets[4]));
|
||||
tw.WriteLine("");
|
||||
}
|
||||
|
||||
string posX = singlePart.x.ToString( "0.00", System.Globalization.CultureInfo.InvariantCulture) ;
|
||||
tw.WriteLine( Constants.USERATTRIBUTE + "\"POSX\":" + "\"" + posX + "\"") ;
|
||||
|
||||
@@ -208,8 +222,15 @@ namespace ib.essetre.integration.egaltech
|
||||
{
|
||||
using ( var tw = new StreamWriter( Path.ChangeExtension( BtlPath, ".btm"), false)) {
|
||||
tw.WriteLine( "[AuxData]") ;
|
||||
tw.WriteLine( "PROGID=" + nStart.ToString()) ;
|
||||
tw.WriteLine( "PROJID=" + projectNumber) ;
|
||||
tw.WriteLine( "PRODID=" + (IsFromProject ? "0" : productionId.ToString())) ;
|
||||
tw.WriteLine( "LOAD90=" + barLoad90) ;
|
||||
tw.WriteLine( "PROGID=" + nStart.ToString());
|
||||
tw.WriteLine( "UNLOAD=" + barUnload) ;
|
||||
tw.WriteLine( "REFPOS=" + RefPos.ToString()) ;
|
||||
tw.WriteLine( "PANELDELTAX=" + panelDeltaX) ;
|
||||
tw.WriteLine( "PANELDELTAY=" + panelDeltaY) ;
|
||||
tw.WriteLine( "PANELDELTAZ=" + panelDeltaZ) ;
|
||||
}
|
||||
}
|
||||
catch {
|
||||
@@ -639,6 +660,7 @@ namespace ib.essetre.integration.egaltech
|
||||
public string height ;
|
||||
public string width ;
|
||||
public string Material ;
|
||||
public List<string> Offsets ;
|
||||
public string Type ;
|
||||
public List<Feature> features ;
|
||||
public double x ;
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace ib.essetre.integration.egaltech
|
||||
public const string LENGTH = "LENGTH: " ;
|
||||
public const string HEIGHT = "HEIGHT: " ;
|
||||
public const string WIDTH = "WIDTH: " ;
|
||||
public const string PARTOFFSET = "PARTOFFSET: " ;
|
||||
public const string OUTLINE_KEY = "OUTLINE: ";
|
||||
public const string APERTURE_KEY = "APERTURE: ";
|
||||
public const string SIDE = "SIDE: ";
|
||||
|
||||
@@ -108,19 +108,19 @@ namespace ib.essetre.integration.egaltech
|
||||
"WHERE E.projectId = @firstId AND E.elementId = @secondId" ;
|
||||
}
|
||||
else {
|
||||
sql = "SELECT vw_Cut.productionId, " +
|
||||
"vw_Cut.patternId, vw_Cut.cutId, taskId, info1, info2, enabled, level, " +
|
||||
"inTools, outTools, isChecked, vw_Task.done, isoType, ax, ay, az, vw_Cut.x, vw_Cut.y, vw_Cut.z, " +
|
||||
"vw_Task.flagDeleted, [group], [key], face, edge, des, " +
|
||||
sql = "SELECT C.productionId, " +
|
||||
"C.patternId, C.cutId, taskId, info1, info2, enabled, level, " +
|
||||
"inTools, outTools, isChecked, T.done, isoType, ax, ay, az, C.x, C.y, C.z, " +
|
||||
"T.flagDeleted, T.[group], [key], face, edge, des, " +
|
||||
"p01, p02, p03, p04, p05, p06, p07, p08, p09, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, " +
|
||||
"q01, q02, q03, q04, q05, q06, q07, q08, q09, q10, q11, q12, q13, q14, q15, q16, q17, q18, q19, q20, " +
|
||||
"ox, oy, oz, xx, xy, xz, yx, yy, yz, " +
|
||||
"priority, processIdent, processingQuality, sag1, sag2, text, vw_Cut.projectId, vw_Cut.elementId, cutStart, cutEnd, " +
|
||||
"priority, processIdent, processingQuality, sag1, sag2, text, C.projectId, C.elementId, cutStart, cutEnd, " +
|
||||
"inverted, rotated, startAngle, endAngle, referenceCutId, length, width, height " +
|
||||
"FROM dbo.vw_Task " +
|
||||
"RIGHT OUTER JOIN dbo.vw_Cut " +
|
||||
"ON (vw_Task.cutId = vw_Cut.cutId AND vw_Task.patternId = vw_Cut.patternId AND vw_Task.productionId = vw_Cut.productionId) " +
|
||||
"WHERE vw_Cut.productionId = @firstId AND vw_Cut.patternId = @secondId" ;
|
||||
"FROM dbo.vw_Task AS T " +
|
||||
"RIGHT OUTER JOIN dbo.vw_Cut AS C " +
|
||||
"ON (T.cutId = C.cutId AND T.patternId = C.patternId AND T.productionId = C.productionId) " +
|
||||
"WHERE C.productionId = @firstId AND C.patternId = @secondId" ;
|
||||
}
|
||||
|
||||
// Connessione al DB ed esecuzione query
|
||||
@@ -358,22 +358,29 @@ namespace ib.essetre.integration.egaltech
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
private static void ProcessResults( string BtlPath, PatternInfo pattInfo, InOutParameters.UIModes UIMode)
|
||||
{
|
||||
if ( UIMode == InOutParameters.UIModes.SHOWUI || UIMode == InOutParameters.UIModes.SIMULAZIONE)
|
||||
return ;
|
||||
bool bErrors = false ;
|
||||
bool bEdit = (UIMode == InOutParameters.UIModes.SHOWUI || UIMode == InOutParameters.UIModes.SIMULAZIONE);
|
||||
int nLastErr = 0 ;
|
||||
string sLastMsg = "" ;
|
||||
int nCurrCutId = 0 ;
|
||||
Dictionary<int,PatternInfo.Results> dctErr = new Dictionary<int, PatternInfo.Results>() ;
|
||||
Dictionary<int,double> dctRot = new Dictionary<int, double>() ;
|
||||
int nTotTime = 0 ;
|
||||
if ( File.Exists( Path.ChangeExtension( BtlPath, ".txt"))) {
|
||||
string TxtPath = Path.ChangeExtension(BtlPath, ".txt") ;
|
||||
if ( File.Exists(TxtPath)) {
|
||||
// se eseguito edit, verifico se file realmente modificato
|
||||
if ( bEdit) {
|
||||
string NgePath = Path.ChangeExtension(BtlPath, ".nge") ;
|
||||
if ( File.GetLastWriteTime(TxtPath) > File.GetLastWriteTime(NgePath))
|
||||
return ;
|
||||
}
|
||||
// analizzo il file dei risultati
|
||||
int nErr = 0 ;
|
||||
string sMsg = "" ;
|
||||
double dRot = 0 ;
|
||||
int cutId = 0 ;
|
||||
int taskId = 0 ;
|
||||
string[] lines = System.IO.File.ReadAllLines( Path.ChangeExtension( BtlPath, ".txt")) ;
|
||||
string[] lines = System.IO.File.ReadAllLines(TxtPath) ;
|
||||
foreach ( string line in lines) {
|
||||
if ( line.StartsWith( "ERR=")) {
|
||||
int? nVal = GetVal(line, "ERR") ;
|
||||
@@ -418,8 +425,13 @@ namespace ib.essetre.integration.egaltech
|
||||
sLastMsg = sMsg ;
|
||||
}
|
||||
}
|
||||
// se edit (possibile modifica utente)
|
||||
if ( bEdit) {
|
||||
pattInfo.SetTaskState(cutId, 0, PatternInfo.Results.NONE, "") ;
|
||||
break ;
|
||||
}
|
||||
// gestione errore per feature identificata
|
||||
if ( taskId != 0) {
|
||||
else if ( taskId != 0) {
|
||||
// verifiche per feature con più parti
|
||||
if ( dctErr.TryGetValue( taskId, out PatternInfo.Results resCurrExe)) {
|
||||
if ( resExe > resCurrExe) {
|
||||
@@ -576,7 +588,12 @@ namespace ib.essetre.integration.egaltech
|
||||
btlObject.panelLength = GetBarLengthP( (int)dRow0["patternId"], (int)dRow0["productionId"]).ToString( "F3", CultureInfo.InvariantCulture) ;
|
||||
btlObject.panelWidth = GetBarWidthP( (int)dRow0["patternId"], (int)dRow0["productionId"]).ToString( "F3", CultureInfo.InvariantCulture) ;
|
||||
btlObject.barLoad90 = GetBarLoad90P( (int)dRow0["patternId"], (int)dRow0["productionId"]).ToString( CultureInfo.InvariantCulture) ;
|
||||
btlObject.barUnload = GetBarOutput( (int)dRow0["patternId"], (int)dRow0["productionId"]).ToString( CultureInfo.InvariantCulture);
|
||||
btlObject.RefPos = GetBarOriginP( (int)dRow0["patternId"], (int)dRow0["productionId"]) ;
|
||||
// i Delta sono spostati di una posizione tra visualizzazione e salvataggio nel DB, qui si ripristina XYZ macchina
|
||||
btlObject.panelDeltaX = GetBarDeltaZP((int)dRow0["patternId"], (int)dRow0["productionId"]).ToString("F3", CultureInfo.InvariantCulture);
|
||||
btlObject.panelDeltaY = GetBarDeltaXP((int)dRow0["patternId"], (int)dRow0["productionId"]).ToString("F3", CultureInfo.InvariantCulture);
|
||||
btlObject.panelDeltaZ = GetBarDeltaYP((int)dRow0["patternId"], (int)dRow0["productionId"]).ToString("F3", CultureInfo.InvariantCulture);
|
||||
btlObject.parts = new List<BTL.Part>() ;
|
||||
|
||||
List<int> ListaCutParts = GetListaCutIdP() ;
|
||||
@@ -595,6 +612,7 @@ namespace ib.essetre.integration.egaltech
|
||||
if ( bFirst) {
|
||||
readPart.singleMemberNumber = GetElementSN( (int)dRowF["elementId"], (int)dRowF["projectId"]) ;
|
||||
readPart.Material = GetElementMaterial( (int)dRowF["elementId"], (int)dRowF["projectId"]) ;
|
||||
readPart.Offsets = GetElementOffsets((int)dRowF["elementId"], (int)dRowF["projectId"]);
|
||||
readPart.Type = GetElementType( (int)dRowF["elementId"], (int)dRowF["projectId"]) ;
|
||||
readPart.count = "1" ;
|
||||
readPart.length = dRowF["length"].ToString() ;
|
||||
@@ -726,6 +744,9 @@ namespace ib.essetre.integration.egaltech
|
||||
btlObject.panelWidth = GetPanelWidthO( (int)dRow0["elementId"], (int)dRow0["projectId"]).ToString( "F3", CultureInfo.InvariantCulture) ;
|
||||
btlObject.barLoad90 = "0" ;
|
||||
btlObject.RefPos = 1 ;
|
||||
btlObject.panelDeltaX = "0" ;
|
||||
btlObject.panelDeltaY = "0";
|
||||
btlObject.panelDeltaZ = "0";
|
||||
btlObject.parts = new List<BTL.Part>() ;
|
||||
|
||||
List<int> ListaCutParts = new List<int>( 1) ;
|
||||
@@ -745,6 +766,7 @@ namespace ib.essetre.integration.egaltech
|
||||
if ( bFirst) {
|
||||
readPart.singleMemberNumber = GetElementSN( (int)dRow0["elementId"], (int)dRow0["projectId"]) ;
|
||||
readPart.Material = GetElementMaterial( (int)dRow0["elementId"], (int)dRow0["projectId"]) ;
|
||||
readPart.Offsets = GetElementOffsets((int)dRowF["elementId"], (int)dRowF["projectId"]);
|
||||
readPart.Type = GetElementType( (int)dRow0["elementId"], (int)dRow0["projectId"]) ;
|
||||
readPart.count = "1" ;
|
||||
readPart.length = dRowF["length"].ToString() ;
|
||||
@@ -756,6 +778,11 @@ namespace ib.essetre.integration.egaltech
|
||||
readPart.inverted = (double)dRowF["inverted"] ;
|
||||
readPart.rotated = (double)dRowF["rotated"] ;
|
||||
readPart.elementId = (int)dRowF["elementId"] ;
|
||||
if ( Math.Abs(readPart.inverted - 90) < 0.1 || Math.Abs(readPart.inverted - 270) < 0.1) {
|
||||
string sTemp = btlObject.panelLength ;
|
||||
btlObject.panelLength = btlObject.panelWidth ;
|
||||
btlObject.panelWidth = sTemp ;
|
||||
}
|
||||
bFirst = false ;
|
||||
readPart.features = new List<BTL.Feature>() ;
|
||||
}
|
||||
@@ -947,6 +974,46 @@ namespace ib.essetre.integration.egaltech
|
||||
|
||||
return Mat ;
|
||||
}
|
||||
private static List<string> GetElementOffsets(int ElementId, int ProjectId)
|
||||
{
|
||||
List<string> Offsets = new List<string>{ "0", "0", "0", "0", "0"} ;
|
||||
|
||||
string sqlElementMat = "SELECT name, value " +
|
||||
"FROM dbo.vw_ElementParam " +
|
||||
"WHERE elementId = @firstId " +
|
||||
"AND projectId = @secondId " +
|
||||
"AND name like 'PARTOFFSET_%' ";
|
||||
|
||||
// Connessione al DB ed esecuzione query
|
||||
using (SqlConnection cn = new SqlConnection(_SqlConnectionStr))
|
||||
{
|
||||
cn.Open() ;
|
||||
using (SqlCommand sqlCommand = new SqlCommand(sqlElementMat, cn))
|
||||
{
|
||||
sqlCommand.Parameters.Add("@firstId", SqlDbType.Int);
|
||||
sqlCommand.Parameters.Add("@secondId", SqlDbType.Int);
|
||||
sqlCommand.Parameters["@firstId"].Value = ElementId;
|
||||
sqlCommand.Parameters["@secondId"].Value = ProjectId;
|
||||
SqlDataReader reader = sqlCommand.ExecuteReader();
|
||||
while (reader.Read()) {
|
||||
string sName = Convert.ToString(reader["name"]);
|
||||
string sVal = Convert.ToString(reader["value"]);
|
||||
if ( sName == "PARTOFFSET_P04")
|
||||
Offsets[0] = sVal ;
|
||||
else if (sName == "PARTOFFSET_P11")
|
||||
Offsets[1] = sVal ;
|
||||
else if (sName == "PARTOFFSET_P12")
|
||||
Offsets[2] = sVal ;
|
||||
else if (sName == "PARTOFFSET_P13")
|
||||
Offsets[3] = sVal ;
|
||||
else if (sName == "PARTOFFSET_P14")
|
||||
Offsets[4] = sVal ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Offsets ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// Recupera la lunghezza della barra nel caso Produzione (colonna "l")
|
||||
@@ -1035,6 +1102,102 @@ namespace ib.essetre.integration.egaltech
|
||||
return barWidth ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// Recupera lo spiazzamento X del pannello dall'origine nel caso Produzione (colonna "x")
|
||||
private static double GetBarDeltaXP(int patternId, int productionId)
|
||||
{
|
||||
double DeltaX = 0;
|
||||
|
||||
string sqlBarWidth = "SELECT x " +
|
||||
"FROM dbo.vw_Pattern " +
|
||||
"WHERE patternId = @firstId " +
|
||||
"AND productionId = @secondId";
|
||||
|
||||
// Connessione al DB ed esecuzione query
|
||||
using (SqlConnection cn = new SqlConnection(_SqlConnectionStr))
|
||||
{
|
||||
cn.Open();
|
||||
using (SqlCommand sqlCommand = new SqlCommand(sqlBarWidth, cn))
|
||||
{
|
||||
sqlCommand.Parameters.Add("@firstId", SqlDbType.Int);
|
||||
sqlCommand.Parameters.Add("@secondId", SqlDbType.Int);
|
||||
sqlCommand.Parameters["@firstId"].Value = patternId;
|
||||
sqlCommand.Parameters["@secondId"].Value = productionId;
|
||||
SqlDataReader reader = sqlCommand.ExecuteReader();
|
||||
while (reader.Read())
|
||||
{
|
||||
DeltaX = Convert.ToDouble(reader["x"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return DeltaX;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// Recupera lo spiazzamento Y del pannello dall'origine nel caso Produzione (colonna "y")
|
||||
private static double GetBarDeltaYP(int patternId, int productionId)
|
||||
{
|
||||
double DeltaY = 0;
|
||||
|
||||
string sqlBarWidth = "SELECT y " +
|
||||
"FROM dbo.vw_Pattern " +
|
||||
"WHERE patternId = @firstId " +
|
||||
"AND productionId = @secondId";
|
||||
|
||||
// Connessione al DB ed esecuzione query
|
||||
using (SqlConnection cn = new SqlConnection(_SqlConnectionStr))
|
||||
{
|
||||
cn.Open();
|
||||
using (SqlCommand sqlCommand = new SqlCommand(sqlBarWidth, cn))
|
||||
{
|
||||
sqlCommand.Parameters.Add("@firstId", SqlDbType.Int);
|
||||
sqlCommand.Parameters.Add("@secondId", SqlDbType.Int);
|
||||
sqlCommand.Parameters["@firstId"].Value = patternId;
|
||||
sqlCommand.Parameters["@secondId"].Value = productionId;
|
||||
SqlDataReader reader = sqlCommand.ExecuteReader();
|
||||
while (reader.Read())
|
||||
{
|
||||
DeltaY = Convert.ToDouble(reader["y"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return DeltaY;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// Recupera lo spiazzamento Z del pannello dall'origine nel caso Produzione (colonna "z")
|
||||
private static double GetBarDeltaZP(int patternId, int productionId)
|
||||
{
|
||||
double DeltaZ = 0;
|
||||
|
||||
string sqlBarWidth = "SELECT z " +
|
||||
"FROM dbo.vw_Pattern " +
|
||||
"WHERE patternId = @firstId " +
|
||||
"AND productionId = @secondId";
|
||||
|
||||
// Connessione al DB ed esecuzione query
|
||||
using (SqlConnection cn = new SqlConnection(_SqlConnectionStr))
|
||||
{
|
||||
cn.Open();
|
||||
using (SqlCommand sqlCommand = new SqlCommand(sqlBarWidth, cn))
|
||||
{
|
||||
sqlCommand.Parameters.Add("@firstId", SqlDbType.Int);
|
||||
sqlCommand.Parameters.Add("@secondId", SqlDbType.Int);
|
||||
sqlCommand.Parameters["@firstId"].Value = patternId;
|
||||
sqlCommand.Parameters["@secondId"].Value = productionId;
|
||||
SqlDataReader reader = sqlCommand.ExecuteReader();
|
||||
while (reader.Read())
|
||||
{
|
||||
DeltaZ = Convert.ToDouble(reader["z"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return DeltaZ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// Recupera il flag di carico con rotazione di 90° nel caso Produzione (colonna "load90")
|
||||
private static int GetBarLoad90P( int patternId, int productionId)
|
||||
@@ -1064,6 +1227,38 @@ namespace ib.essetre.integration.egaltech
|
||||
return nLoad90 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// Recupera il tipo di scarico nel caso Produzione (colonna "ChosenOutput")
|
||||
private static int GetBarOutput(int patternId, int productionId)
|
||||
{
|
||||
int nOutput = 0;
|
||||
|
||||
string sqlBarLength = "SELECT ChosenOutput " +
|
||||
"FROM dbo.vw_Pattern " +
|
||||
"WHERE patternId = @firstId " +
|
||||
"AND productionId = @secondId";
|
||||
|
||||
// Connessione al DB ed esecuzione query
|
||||
using (SqlConnection cn = new SqlConnection(_SqlConnectionStr))
|
||||
{
|
||||
cn.Open();
|
||||
using (SqlCommand sqlCommand = new SqlCommand(sqlBarLength, cn))
|
||||
{
|
||||
sqlCommand.Parameters.Add("@firstId", SqlDbType.Int);
|
||||
sqlCommand.Parameters.Add("@secondId", SqlDbType.Int);
|
||||
sqlCommand.Parameters["@firstId"].Value = patternId;
|
||||
sqlCommand.Parameters["@secondId"].Value = productionId;
|
||||
SqlDataReader reader = sqlCommand.ExecuteReader();
|
||||
while (reader.Read())
|
||||
{
|
||||
nOutput = Convert.ToInt32(reader["ChosenOutput"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nOutput;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// Recupera l'indice dell'origine del pannello nel caso Produzione (colonna "RefPos")
|
||||
private static int GetBarOriginP( int patternId, int productionId)
|
||||
@@ -1172,7 +1367,7 @@ namespace ib.essetre.integration.egaltech
|
||||
int listaProcessesCount = dTab.Rows.Count ;
|
||||
if ( listaProcessesCount > 0) {
|
||||
double wallWidth = Convert.ToDouble( dTab.Rows[0]["width"]) ;
|
||||
panelWidth = wallWidth ;
|
||||
panelWidth = wallWidth + 2 * Constants.PanelOverMat ;
|
||||
}
|
||||
|
||||
return panelWidth ;
|
||||
@@ -1188,7 +1383,7 @@ namespace ib.essetre.integration.egaltech
|
||||
int listaProcessesCount = dTab.Rows.Count ;
|
||||
if ( listaProcessesCount > 0) {
|
||||
double wallWidth = Convert.ToDouble( dTab.Rows[0]["height"]) ;
|
||||
panelWidth = wallWidth ;
|
||||
panelWidth = wallWidth + 2 * Constants.PanelOverMat ;
|
||||
}
|
||||
|
||||
return panelWidth ;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ib.essetre.integration.egaltech</RootNamespace>
|
||||
<AssemblyName>ib.essetre.integration.egaltech</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
@@ -23,6 +23,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
@@ -33,6 +34,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ib.essetre.integration">
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Egalware s.r.l.")]
|
||||
[assembly: AssemblyProduct("Beam & Wall")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018-2023 by Egalware s.r.l.")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018-2026 by Egalware s.r.l.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -36,5 +36,5 @@ using System.Runtime.InteropServices;
|
||||
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
|
||||
// usando l'asterisco '*' come illustrato di seguito:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.5.11.1")]
|
||||
[assembly: AssemblyFileVersion("2.5.11.1")]
|
||||
[assembly: AssemblyVersion("3.1.1.3")]
|
||||
[assembly: AssemblyFileVersion("3.1.1.3")]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -15,19 +15,19 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{69c15767-8e9e-42be-b8f8-aea49dc572ce}</ProjectGuid>
|
||||
<RootNamespace>IntegrationEgaltech2</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
||||
Reference in New Issue
Block a user