Leggero cambio styling, inizio aggiunta pag ricerca ordini, fix display errori import KIT
This commit is contained in:
+14
-14
@@ -233,24 +233,24 @@ body {
|
||||
color: #333;
|
||||
}
|
||||
.shortcuts .shortcut:hover {
|
||||
color: #FFF;
|
||||
background: #696969;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#CDCDFF), to(#BDBDFF));
|
||||
background-image: -webkit-linear-gradient(top, #CDCDFF, 0%, #BDBDFF, 100%);
|
||||
background-image: -moz-linear-gradient(top, #CDCDFF 0%, #BDBDFF 100%);
|
||||
background-image: linear-gradient(to bottom, #CDCDFF 0%, #BDBDFF 100%);
|
||||
color: #696969;
|
||||
background: #00ABDE;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#00DEEF), to(#00ABDE));
|
||||
background-image: -webkit-linear-gradient(top, #00DEEF, 0%, #00ABDE, 100%);
|
||||
background-image: -moz-linear-gradient(top, #00DEEF 0%, #00ABDE 100%);
|
||||
background-image: linear-gradient(to bottom, #00DEEF 0%, #00ABDE 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#CDCDCDFF', endColorstr='#BDBDBDFF', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00DEEF', endColorstr='#00ABDE', GradientType=0);
|
||||
}
|
||||
.shortcuts .shortcut-sm:hover {
|
||||
color: #FFF;
|
||||
background: #696969;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#CDCDFF), to(#BDBDFF));
|
||||
background-image: -webkit-linear-gradient(top, #CDCDFF, 0%, #BDBDFF, 100%);
|
||||
background-image: -moz-linear-gradient(top, #CDCDFF 0%, #BDBDFF 100%);
|
||||
background-image: linear-gradient(to bottom, #CDCDFF 0%, #BDBDFF 100%);
|
||||
color: #696969;
|
||||
background: #00ABDE;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#00DEEF), to(#00ABDE));
|
||||
background-image: -webkit-linear-gradient(top, #00DEEF, 0%, #00ABDE, 100%);
|
||||
background-image: -moz-linear-gradient(top, #00DEEF 0%, #00ABDE 100%);
|
||||
background-image: linear-gradient(to bottom, #00DEEF 0%, #00ABDE 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#CDCDCDFF', endColorstr='#BDBDBDFF', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00DEEF', endColorstr='#00ABDE', GradientType=0);
|
||||
}
|
||||
.shortcuts .shortcut:active {
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
|
||||
+14
-14
@@ -279,25 +279,25 @@ body {
|
||||
}
|
||||
|
||||
.shortcuts .shortcut:hover {
|
||||
color: #FFF;
|
||||
background: #696969;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#CDCDFF), to(#BDBDFF));
|
||||
background-image: -webkit-linear-gradient(top, #CDCDFF, 0%, #BDBDFF, 100%);
|
||||
background-image: -moz-linear-gradient(top, #CDCDFF 0%, #BDBDFF 100%);
|
||||
background-image: linear-gradient(to bottom, #CDCDFF 0%, #BDBDFF 100%);
|
||||
color: #696969;
|
||||
background: #00ABDE;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#00DEEF), to(#00ABDE));
|
||||
background-image: -webkit-linear-gradient(top, #00DEEF, 0%, #00ABDE, 100%);
|
||||
background-image: -moz-linear-gradient(top, #00DEEF 0%, #00ABDE 100%);
|
||||
background-image: linear-gradient(to bottom, #00DEEF 0%, #00ABDE 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#CDCDCDFF', endColorstr='#BDBDBDFF', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00DEEF', endColorstr='#00ABDE', GradientType=0);
|
||||
}
|
||||
|
||||
.shortcuts .shortcut-sm:hover {
|
||||
color: #FFF;
|
||||
background: #696969;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#CDCDFF), to(#BDBDFF));
|
||||
background-image: -webkit-linear-gradient(top, #CDCDFF, 0%, #BDBDFF, 100%);
|
||||
background-image: -moz-linear-gradient(top, #CDCDFF 0%, #BDBDFF 100%);
|
||||
background-image: linear-gradient(to bottom, #CDCDFF 0%, #BDBDFF 100%);
|
||||
color: #696969;
|
||||
background: #00ABDE;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#00DEEF), to(#00ABDE));
|
||||
background-image: -webkit-linear-gradient(top, #00DEEF, 0%, #00ABDE, 100%);
|
||||
background-image: -moz-linear-gradient(top, #00DEEF 0%, #00ABDE 100%);
|
||||
background-image: linear-gradient(to bottom, #00DEEF 0%, #00ABDE 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#CDCDCDFF', endColorstr='#BDBDBDFF', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00DEEF', endColorstr='#00ABDE', GradientType=0);
|
||||
}
|
||||
|
||||
.shortcuts .shortcut:active {
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
body{font-family:'Roboto Condensed',sans-serif;padding-top:50px;padding-bottom:20px;}.body-content{padding-left:15px;padding-right:15px;}.textCondens{font-family:'Open Sans Condensed',sans-serif;}.textNormal{font-family:'Roboto',sans-serif;}.textBig{font-size:1.5em;}.fs-1{font-size:2em;}.fs-2{font-size:1.7em;}.fs-3{font-size:1.5em;}.fs-4{font-size:1.3em;}.fs-5{font-size:1.1em;}@media screen and (min-width:768px){.jumbotron{margin-top:20px;}.body-content{padding:0;}body{font-family:'Roboto',sans-serif;}}@media(max-width:992px){.container{width:100%;}body{font-family:'Roboto Condensed',sans-serif;font-size:.9rem;}.smallTable{font-size:.7rem;font-family:'Open Sans Condensed',sans-serif;}}.GridPager a,.GridPager span{display:block;height:1.5em;min-width:1.1em;text-align:center;text-decoration:none;}.GridPager a{background-color:#f5f5f5;color:#969696;}.GridPager span{background-color:#a1dcf2;color:#000;font-weight:bold;}.border-thick{border-width:3px!important;}.flashColor{border:3px solid #00f;-webkit-animation-name:blueFlash;-webkit-animation-duration:.5s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.5s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes blueFlash{0%{border-color:#c4dbff;}25%{border-color:#9dc4ff;}50%{border-color:#5ca5ff;}75%{border-color:#1b82ff;}100%{border-color:#005ccc;}}.bigText{font-size:1.3em;}.smallText{font-size:.8em;}.dl-horizontal dt{white-space:normal;}.deleted{text-decoration:line-through;}.padZL{padding-left:.2em;}.padZR{padding-right:.2em;}.padZRL{padding-left:.2em;padding-right:.2em;}.colAlt{color:#c93;}.fontBig{font-size:2em;}.tNote{color:#8a8a8a;font-style:italic;}.tNoWrap{white-space:nowrap;}.navbar{min-height:0;color:#696969;}.pagination{margin:5px 0;}.pageSelDD{width:6em;}.zeroWidth{width:0;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:9rem;min-height:5rem;display:inline-block;padding:.66666667rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut-sm{min-width:4.5rem;min-height:3rem;display:inline-block;padding:1rem/4 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut:hover{color:#fff;background:#696969;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#cdcdff),to(#bdbdff));background-image:-webkit-linear-gradient(top,#cdcdff,0%,#bdbdff,100%);background-image:-moz-linear-gradient(top,#cdcdff 0%,#bdbdff 100%);background-image:linear-gradient(to bottom,#cdcdff 0%,#bdbdff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#CDCDCDFF',endColorstr='#BDBDBDFF',GradientType=0);}.shortcuts .shortcut-sm:hover{color:#fff;background:#696969;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#cdcdff),to(#bdbdff));background-image:-webkit-linear-gradient(top,#cdcdff,0%,#bdbdff,100%);background-image:-moz-linear-gradient(top,#cdcdff 0%,#bdbdff 100%);background-image:linear-gradient(to bottom,#cdcdff 0%,#bdbdff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#CDCDCDFF',endColorstr='#BDBDBDFF',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:992px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}}
|
||||
body{font-family:'Roboto Condensed',sans-serif;padding-top:50px;padding-bottom:20px;}.body-content{padding-left:15px;padding-right:15px;}.textCondens{font-family:'Open Sans Condensed',sans-serif;}.textNormal{font-family:'Roboto',sans-serif;}.textBig{font-size:1.5em;}.fs-1{font-size:2em;}.fs-2{font-size:1.7em;}.fs-3{font-size:1.5em;}.fs-4{font-size:1.3em;}.fs-5{font-size:1.1em;}@media screen and (min-width:768px){.jumbotron{margin-top:20px;}.body-content{padding:0;}body{font-family:'Roboto',sans-serif;}}@media(max-width:992px){.container{width:100%;}body{font-family:'Roboto Condensed',sans-serif;font-size:.9rem;}.smallTable{font-size:.7rem;font-family:'Open Sans Condensed',sans-serif;}}.GridPager a,.GridPager span{display:block;height:1.5em;min-width:1.1em;text-align:center;text-decoration:none;}.GridPager a{background-color:#f5f5f5;color:#969696;}.GridPager span{background-color:#a1dcf2;color:#000;font-weight:bold;}.border-thick{border-width:3px!important;}.flashColor{border:3px solid #00f;-webkit-animation-name:blueFlash;-webkit-animation-duration:.5s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.5s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes blueFlash{0%{border-color:#c4dbff;}25%{border-color:#9dc4ff;}50%{border-color:#5ca5ff;}75%{border-color:#1b82ff;}100%{border-color:#005ccc;}}.bigText{font-size:1.3em;}.smallText{font-size:.8em;}.dl-horizontal dt{white-space:normal;}.deleted{text-decoration:line-through;}.padZL{padding-left:.2em;}.padZR{padding-right:.2em;}.padZRL{padding-left:.2em;padding-right:.2em;}.colAlt{color:#c93;}.fontBig{font-size:2em;}.tNote{color:#8a8a8a;font-style:italic;}.tNoWrap{white-space:nowrap;}.navbar{min-height:0;color:#696969;}.pagination{margin:5px 0;}.pageSelDD{width:6em;}.zeroWidth{width:0;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:9rem;min-height:5rem;display:inline-block;padding:.66666667rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut-sm{min-width:4.5rem;min-height:3rem;display:inline-block;padding:1rem/4 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut:hover{color:#696969;background:#00abde;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#00deef),to(#00abde));background-image:-webkit-linear-gradient(top,#00deef,0%,#00abde,100%);background-image:-moz-linear-gradient(top,#00deef 0%,#00abde 100%);background-image:linear-gradient(to bottom,#00deef 0%,#00abde 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00DEEF',endColorstr='#00ABDE',GradientType=0);}.shortcuts .shortcut-sm:hover{color:#696969;background:#00abde;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#00deef),to(#00abde));background-image:-webkit-linear-gradient(top,#00deef,0%,#00abde,100%);background-image:-moz-linear-gradient(top,#00deef 0%,#00abde 100%);background-image:linear-gradient(to bottom,#00deef 0%,#00abde 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00DEEF',endColorstr='#00ABDE',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:992px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}}
|
||||
@@ -519,6 +519,7 @@
|
||||
<Content Include="site\TestChart.aspx" />
|
||||
<Content Include="site\Unauth.aspx" />
|
||||
<Content Include="site\UpdMan.aspx" />
|
||||
<Content Include="site\OrderSearch.aspx" />
|
||||
<Content Include="WebUserControls\cmp_barcode.ascx" />
|
||||
<Content Include="WebUserControls\cmp_batchDetail.ascx" />
|
||||
<Content Include="WebUserControls\cmp_batchDetailData.ascx" />
|
||||
@@ -1193,6 +1194,13 @@
|
||||
<Compile Include="site\vocabolario.aspx.designer.cs">
|
||||
<DependentUpon>vocabolario.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="site\OrderSearch.aspx.cs">
|
||||
<DependentUpon>OrderSearch.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="site\OrderSearch.aspx.designer.cs">
|
||||
<DependentUpon>OrderSearch.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_barcode.ascx.cs">
|
||||
<DependentUpon>cmp_barcode.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
<div class="col-2">
|
||||
<asp:HyperLink runat="server" ID="hlShowErrors" Target="_blank" CssClass="btn btn-danger btn-block"><i class="fa fa-bug" aria-hidden="true"></i></asp:HyperLink>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="lblOutTask" CssClass="col-12 text-truncate"></asp:Label>
|
||||
<div style="max-height: 96px; overflow: auto;">
|
||||
<asp:Label runat="server" ID="lblOutTask" CssClass="col-12 text-truncate"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
@@ -137,11 +138,17 @@ namespace NKC_WF.WebUserControls
|
||||
var risultati = DLMan.taImpLog.importCsvKit($"{dirImport}", fileName, batchName, ";", "\n", "2", numTask, 0, 0, testOnly);
|
||||
// se ho delle righe di log processo...
|
||||
bool allCheck = true;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
string errorTxt = "";
|
||||
foreach (var item in risultati)
|
||||
{
|
||||
if (!item.IsOk)
|
||||
{
|
||||
allCheck = false;
|
||||
sb.AppendLine("----------------------");
|
||||
sb.AppendLine("Error reported:");
|
||||
sb.AppendLine($"{item.Note}");
|
||||
sb.AppendLine("----------------------");
|
||||
}
|
||||
}
|
||||
checkOk = allCheck;
|
||||
@@ -149,7 +156,13 @@ namespace NKC_WF.WebUserControls
|
||||
imported = checkOk && !testOnly;
|
||||
// ora effettua validazione e mostra eventuale esito...
|
||||
processValidation();
|
||||
displayMessage($"{traduci("KitDataImportExecuted")}: {traduci("Validated")}: {checkOk} | {traduci("Imported")} : {imported}", false);
|
||||
string baseMsg = $"{traduci("KitDataImportExecuted")}: {traduci("Validated")}: {checkOk} | {traduci("Imported")} : {imported}";
|
||||
// se ho errori aggiungo...
|
||||
if(!checkOk)
|
||||
{
|
||||
baseMsg += $"{Environment.NewLine}{sb.ToString()}".Replace(Environment.NewLine, "<br/>");
|
||||
}
|
||||
displayMessage(baseMsg, !checkOk);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
|
||||
+38
-38
@@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
@@ -15,101 +15,101 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfFileName.
|
||||
/// hfFileName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfFileName;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfBatchName.
|
||||
/// hfBatchName control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfBatchName;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfNumTask.
|
||||
/// hfNumTask control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfNumTask;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfCheckOk.
|
||||
/// hfCheckOk control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfCheckOk;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfImported.
|
||||
/// hfImported control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfImported;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtDoAction.
|
||||
/// lbtDoAction control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtDoAction;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlShowErrors.
|
||||
/// hlShowErrors control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink hlShowErrors;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblOutTask.
|
||||
/// lblOutTask control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblOutTask;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divStep1.
|
||||
/// divStep1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divStep1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divStep2.
|
||||
/// divStep2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divStep2;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divStep3.
|
||||
/// divStep3 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divStep3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="OrderSearch.aspx.cs" Inherits="NKC_WF.site.WebForm1" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_fileUpload.ascx" TagPrefix="uc1" TagName="cmp_fileUpload" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_batchList.ascx" TagPrefix="uc1" TagName="cmp_batchList" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="container-fluid">
|
||||
<div class="card" style="width: 100%;">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<h3><%: traduci("OrderManager") %></h3>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<uc1:cmp_fileUpload runat="server" ID="cmp_fileUpload" isWriteEnabled="true" filePrefix="CNC" fileSuffix=".csv" checkBatchAppr="true" checkRunning="false" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body py-1">
|
||||
<div class="row">
|
||||
<div class="col-12" runat="server" id="divBatchList">
|
||||
<uc1:cmp_batchList runat="server" ID="cmp_batchList" forceCreatePng="false" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,277 @@
|
||||
using AppData;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace NKC_WF.site
|
||||
{
|
||||
public partial class WebForm1 : BasePage
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
/// Folder REMOTA x copia verso SQL
|
||||
/// </summary>
|
||||
protected string _SqlCopyDir = memLayer.ML.CRS("_SqlCopyDir");
|
||||
|
||||
/// <summary>
|
||||
/// Folder x SQL import
|
||||
/// </summary>
|
||||
protected string _SqlImportDir = memLayer.ML.CRS("_SqlImportDir");
|
||||
|
||||
/// <summary>
|
||||
/// Path base x nesting
|
||||
/// </summary>
|
||||
protected string cadBasePath = $"{memLayer.ML.CRS("nestBasePath")}{memLayer.ML.CRS("drawingFolder")}/";
|
||||
|
||||
/// <summary>
|
||||
/// Path base x server
|
||||
/// </summary>
|
||||
protected string srvCadBasePath = $"{memLayer.ML.CRS("servBasePath")}{memLayer.ML.CRS("drawingFolder")}/";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void Cmp_batchList_eh_doRefresh(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
private void Cmp_fileUpload_eh_doRefresh(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ora continuo processing
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Cmp_fileUpload_eh_FileUploaded(object sender, WebUserContols.FileUploadEventArgs e)
|
||||
{
|
||||
/*--------------------------------------------
|
||||
* Note validazione:
|
||||
* - leggo CSV
|
||||
* - carico su DB
|
||||
* - verifico (come ora x DXF) TUTTI i particolari
|
||||
* - cerco su tab ItemValidation
|
||||
* --> NON TROVATO --> creo record IV + record Batch stato 8, con KitID = OrdID = 0, DA VALUTARE!!!
|
||||
* - se valutazione tempo <= 1 sec --> NON VALIDO
|
||||
* - se valutazione tempo > 1 sec --> VALIDO
|
||||
*
|
||||
* --> trovato
|
||||
* - se valido --> check DXF,
|
||||
* --> dxf ok --> finito
|
||||
* --> dxf non trovato --> NON VALIDO, segnalo errore su part
|
||||
* - se NON valido --> segnalo errore su part
|
||||
*
|
||||
*--------------------------------------------*/
|
||||
|
||||
bool dataValidated = true;
|
||||
DateTime adesso = DateTime.Now;
|
||||
string dirFrom = e.LocalPath;
|
||||
string dirTo = $"{_SqlCopyDir}{adesso.ToString("yyyy-MM")}\\";
|
||||
string dirImport = $"{_SqlImportDir}{adesso.ToString("yyyy-MM")}\\";
|
||||
int batchID = 0;
|
||||
// recupero elenco parti validate...
|
||||
DS_App.ItemListDataTable ItemValitadion = DLMan.taIL.GetData();
|
||||
// preporcessing file: leggo e correggo:
|
||||
// - sostituisco "," --> ";" come separatore
|
||||
// - tolgo "" e spazi da stringa
|
||||
string[] rawLines = System.IO.File.ReadAllLines($"{e.LocalPath}{e.FileName}");
|
||||
string[] fixLines = new string[rawLines.Length];
|
||||
int numRow = 0;
|
||||
if (memLayer.ML.CRB("preFixCsv"))
|
||||
{
|
||||
foreach (var riga in rawLines)
|
||||
{
|
||||
string newLine = "";
|
||||
// splitto con "
|
||||
string[] rowPart = riga.Split('"');
|
||||
int i = 0;
|
||||
foreach (var parte in rowPart)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
// pari --> sostituisco , --> ;
|
||||
newLine += parte.Replace(",", ";");
|
||||
}
|
||||
else
|
||||
{
|
||||
// dispari: trimmo
|
||||
newLine += parte.Trim();
|
||||
}
|
||||
i++;
|
||||
}
|
||||
// ricombino!
|
||||
fixLines[numRow] = newLine;
|
||||
numRow++;
|
||||
}
|
||||
// salvo NUOVO file...
|
||||
System.IO.File.WriteAllLines($"{e.LocalPath}{e.FileName}", fixLines);
|
||||
}
|
||||
// copio su server SQL
|
||||
try
|
||||
{
|
||||
// copio su SQL...
|
||||
fileMover.obj.copiaFile(dirFrom, dirTo, e.FileName);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Instance.Error($"{traduci("ErrOrderCsvImp01")}:{Environment.NewLine}{exc}");
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "Copy CSV", $"{e.BatchName}", $"{e.BatchName}.{e.FileName}", $"Exception: {exc}");
|
||||
}
|
||||
// chiamo stored caricamento
|
||||
DS_App.ImportLogDataTable tabDati = null;
|
||||
try
|
||||
{
|
||||
// pulizia eventuali vecchi file errore in "dirTo"
|
||||
string[] file2del = Directory.GetFiles(dirTo, "error*");
|
||||
if (file2del.Length > 0)
|
||||
{
|
||||
Log.Instance.Info($"Trovati {file2del.Length} file errore, li elimino");
|
||||
foreach (var item in file2del)
|
||||
{
|
||||
File.Delete(item);
|
||||
Log.Instance.Info($"Eliminato {item}");
|
||||
}
|
||||
}
|
||||
|
||||
// chiamo procedura SQL x import...
|
||||
tabDati = DLMan.taImpLog.importCsvOrd($"{dirImport}", e.FileName, e.BatchName, ";", "\n", "2", 0, 0, 0);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Instance.Error($"{traduci("ErrOrderCsvImp02")}:{Environment.NewLine}{exc}");
|
||||
// salvo log errore...
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "Upload CSV", $"{e.BatchName}", $"{e.BatchName}.{e.FileName}", $"Exception: {exc}");
|
||||
dataValidated = false;
|
||||
}
|
||||
// FIX eventuali cadFilePath...
|
||||
DLMan.taIL.updateCadPath(cadBasePath, 0, false);
|
||||
// recupero da batch la riga impostata...
|
||||
try
|
||||
{
|
||||
var tabBatch = DLMan.taBL.getLastByTakt(e.BatchName);
|
||||
if (tabBatch != null)
|
||||
{
|
||||
if (tabBatch.Count > 0)
|
||||
{
|
||||
batchID = tabBatch[0].BatchID;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Instance.Error($"{traduci("ErrOrderCsvImp03")}:{Environment.NewLine}{exc}");
|
||||
dataValidated = false;
|
||||
}
|
||||
if (dataValidated && batchID > 0)
|
||||
{
|
||||
dataValidated = doValidations(batchID);
|
||||
}
|
||||
if (!dataValidated)
|
||||
{
|
||||
try
|
||||
{
|
||||
var newBatch = tabDati[0];
|
||||
int bStatus = 7;
|
||||
DLMan.taBL.updateStatus(batchID, bStatus, e.BatchName, -1);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
Response.Redirect(Request.RawUrl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua validazione dati
|
||||
/// </summary>
|
||||
private bool doValidations(int batchID)
|
||||
{
|
||||
bool allOk = true;
|
||||
List<string> missingDxfList = new List<string>();
|
||||
// faccio un ciclo su OGNI record Part --> cerco se mancassero dei file dxf...
|
||||
try
|
||||
{
|
||||
var tabParts = DLMan.taIL.getByBatch(batchID);
|
||||
if (tabParts.Count > 0)
|
||||
{
|
||||
bool fileOk = false;
|
||||
string localPath = "";
|
||||
foreach (var item in tabParts)
|
||||
{
|
||||
// verifico SE già processato...
|
||||
if (!missingDxfList.Contains(item.ItemExtCode))
|
||||
{
|
||||
// cerco file! sostituisco cadBasePath --> srvCadBasePath
|
||||
if (string.IsNullOrEmpty(item.CadFilePath))
|
||||
{
|
||||
localPath = $"{srvCadBasePath}{item.ItemExtCode}.dxf";
|
||||
}
|
||||
else
|
||||
{
|
||||
localPath = item.CadFilePath.Replace(cadBasePath, srvCadBasePath);
|
||||
}
|
||||
// fix slash/backslash
|
||||
localPath = localPath.Replace("/", "\\");
|
||||
// verifico
|
||||
fileOk = File.Exists(localPath);
|
||||
if (!fileOk)
|
||||
{
|
||||
string errMsg = $"{traduci("ErrOrderDxfNotFound")} {localPath} | part {item.ItemExtCode} | {item.ItemDesc}";
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "I.1", $"B.{batchID}", $"{item.ItemExtCode}.dxf", errMsg);
|
||||
allOk = false;
|
||||
missingDxfList.Add(item.ItemExtCode);
|
||||
Log.Instance.Error(errMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
allOk = false;
|
||||
string errMsg = $"Excetion on doValidations fot BatchId: {batchID}{Environment.NewLine}{exc}";
|
||||
Log.Instance.Error(errMsg);
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "I.2", $"B.{batchID}", "doValidations", errMsg);
|
||||
}
|
||||
// risultato
|
||||
return allOk;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
((SiteMaster)this.Master).showSearch = false;
|
||||
doUpdate();
|
||||
}
|
||||
cmp_batchList.eh_doRefresh += Cmp_batchList_eh_doRefresh;
|
||||
cmp_fileUpload.eh_doRefresh += Cmp_fileUpload_eh_doRefresh;
|
||||
cmp_fileUpload.eh_FileUploaded += Cmp_fileUpload_eh_FileUploaded;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Update interfaccia
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
cmp_batchList.doUpdate();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
Generated
+44
@@ -0,0 +1,44 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NKC_WF.site
|
||||
{
|
||||
|
||||
|
||||
public partial class WebForm1
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// cmp_fileUpload control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserContols.cmp_fileUpload cmp_fileUpload;
|
||||
|
||||
/// <summary>
|
||||
/// divBatchList control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divBatchList;
|
||||
|
||||
/// <summary>
|
||||
/// cmp_batchList control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_batchList cmp_batchList;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user