Fix copia: OK!!!

This commit is contained in:
Samuele E. Locatelli
2019-10-16 19:53:55 +02:00
parent 3f80f1c04f
commit 329de7f0cf
6 changed files with 38 additions and 22 deletions
+11 -11
View File
@@ -4,20 +4,20 @@
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="table table-sm table-striped table-condensed" DataKeyNames="JobId" DataSourceID="ods">
<EmptyDataTemplate>Nessun Risultato</EmptyDataTemplate>
<Columns>
<asp:BoundField DataField="JobId" HeaderText="JobId" ReadOnly="True" SortExpression="JobId" />
<%--<asp:BoundField DataField="JobId" HeaderText="JobId" ReadOnly="True" SortExpression="JobId" />--%>
<asp:BoundField DataField="JobDescr" HeaderText="JobDescr" SortExpression="JobDescr" />
<asp:BoundField DataField="USER_NAME" HeaderText="USER_NAME" SortExpression="USER_NAME" />
<%--<asp:BoundField DataField="USER_NAME" HeaderText="USER_NAME" SortExpression="USER_NAME" />--%>
<asp:BoundField DataField="JStatusID" HeaderText="JStatusID" SortExpression="JStatusID" />
<asp:BoundField DataField="JsDescr" HeaderText="JsDescr" SortExpression="JsDescr" />
<asp:BoundField DataField="dtSubmiss" HeaderText="dtSubmiss" SortExpression="dtSubmiss" />
<asp:BoundField DataField="dtStartProc" HeaderText="dtStartProc" SortExpression="dtStartProc" />
<asp:BoundField DataField="dtEndProc" HeaderText="dtEndProc" SortExpression="dtEndProc" />
<asp:BoundField DataField="uploadSizeKb" HeaderText="uploadSizeKb" SortExpression="uploadSizeKb" />
<asp:BoundField DataField="uploadPath" HeaderText="uploadPath" SortExpression="uploadPath" />
<asp:BoundField DataField="downloadSizeKb" HeaderText="downloadSizeKb" SortExpression="downloadSizeKb" />
<asp:BoundField DataField="downloadPath" HeaderText="downloadPath" SortExpression="downloadPath" />
<asp:BoundField DataField="dtDownload" HeaderText="dtDownload" SortExpression="dtDownload" />
<asp:BoundField DataField="dtCleanup" HeaderText="dtCleanup" SortExpression="dtCleanup" />
<asp:BoundField DataField="dtSubmiss" HeaderText="Inviato" SortExpression="dtSubmiss" />
<asp:BoundField DataField="dtStartProc" HeaderText="Inizio Calc" SortExpression="dtStartProc" />
<asp:BoundField DataField="dtEndProc" HeaderText="FineCalc" SortExpression="dtEndProc" />
<%--<asp:BoundField DataField="uploadSizeKb" HeaderText="uploadSizeKb" SortExpression="uploadSizeKb" />--%>
<%--<asp:BoundField DataField="uploadPath" HeaderText="uploadPath" SortExpression="uploadPath" />--%>
<%--<asp:BoundField DataField="downloadSizeKb" HeaderText="downloadSizeKb" SortExpression="downloadSizeKb" />--%>
<%--<asp:BoundField DataField="downloadPath" HeaderText="downloadPath" SortExpression="downloadPath" />--%>
<%--<asp:BoundField DataField="dtDownload" HeaderText="dtDownload" SortExpression="dtDownload" />--%>
<%--<asp:BoundField DataField="dtCleanup" HeaderText="dtCleanup" SortExpression="dtCleanup" />--%>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByUser" TypeName="WebLCP.DS_AppTableAdapters.JobsListTableAdapter">
+1 -1
View File
@@ -6,7 +6,7 @@
<div class="card">
<div class="card-header bg-primary">
<a class="card-link text-light" data-toggle="collapse" href="#collAddNew">
<i class="fa fa-plus" aria-hidden="true"></i>Caricamento Nuovo Job <i class="fa fa-plus" aria-hidden="true"></i>
<i class="fa fa-plus" aria-hidden="true"></i> Caricamento Nuovo Job <i class="fa fa-plus" aria-hidden="true"></i>
</a>
</div>
<div id="collAddNew" class="collapse" data-parent="#accordion">
+21 -5
View File
@@ -15,22 +15,38 @@ namespace WebLCP.WUC
// controllo se ho i 2 files...
if (FUplCsv_A.FileName != "" && FUplCsv_B.FileName != "")
{
string basePath = memLayer.ML.CRS("_tempUploadDir");
string tempUploadDir = memLayer.ML.CRS("tempUploadDir");
string fileNameA = Path.GetFileName(FUplCsv_A.FileName);
string fileNameB = Path.GetFileName(FUplCsv_B.FileName);
FUplCsv_A.SaveAs(Server.MapPath($"{basePath}{fileNameA}"));
FUplCsv_B.SaveAs(Server.MapPath($"{basePath}{fileNameB}"));
FUplCsv_A.SaveAs(Server.MapPath($"{tempUploadDir}{fileNameA}"));
FUplCsv_B.SaveAs(Server.MapPath($"{tempUploadDir}{fileNameB}"));
// creo record
DS_App.JobsListDataTable tabJobs = dataLayer.man.taJL.insertNew(txtJobDescr.Text.Trim(), devicesAuthProxy.stObj.utente);
if (tabJobs.Count == 1)
{
DS_App.JobsListRow currJob = tabJobs[0];
// creo cartella in server target
string uploadJobFolder = "Pippo";
string sourceDir = Server.MapPath($"{tempUploadDir}");
string destDir = @"L:\IN\";
fileMover.obj.copiaFile(sourceDir, destDir, FUplCsv_A.FileName);
fileMover.obj.copiaFile(sourceDir, destDir, FUplCsv_B.FileName);
#if false
string destDir = $"{memLayer.ML.CRS("clusterBaseDir")}\\IN";
NetworkCredential destCred = new NetworkCredential
{
Domain = "",
UserName = "fbfusr",
Password = "fbfpwd2019!"
};
// trasferisco dati
fileMover.copiaFileL2N(sourceDir, destDir, destCred, FUplCsv_A.FileName, "File_A.csv");
fileMover.copiaFileL2N(sourceDir, destDir, destCred, FUplCsv_B.FileName, "File_B.csv");
#endif
// registro trasferimento effettuato...
int sizeKb = (FUplCsv_A.PostedFile.ContentLength + FUplCsv_B.PostedFile.ContentLength) / 1024;
// update record!
dataLayer.man.taJL.updateUpload(currJob.JobId, DateTime.Now, sizeKb, uploadJobFolder);
dataLayer.man.taJL.updateUpload(currJob.JobId, DateTime.Now, sizeKb, destDir);
}
}
}
+2 -2
View File
@@ -66,8 +66,8 @@
<add key="maxAgeAppConf_min" value="5" />
<add key="maxAgeAppConf_min" value="15" />
<!--area file upload-->
<add key="_tempUploadDir" value="~/FileUpload/" />
<add key="_SqlDir" value="\\sql2016dev\Share\NKC" />
<add key="tempUploadDir" value="~/FileUpload/" />
<add key="clusterBaseDir" value="\\10.74.82.228\fbf" />
<!--Configurazioni Redis-->
<add key="RedisConn" value="localhost,abortConnect=false,ssl=false" />
<add key="RedisConnAdmin" value="localhost,abortConnect=false,ssl=false,allowAdmin=true" />
+2 -2
View File
@@ -92,8 +92,8 @@
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
<HintPath>..\packages\StackExchange.Redis.2.0.601\lib\net461\StackExchange.Redis.dll</HintPath>
</Reference>
<Reference Include="SteamWare, Version=3.3.1910.677, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SteamWare.3.3.1910.677\lib\net462\SteamWare.dll</HintPath>
<Reference Include="SteamWare, Version=3.3.1910.679, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SteamWare.3.3.1910.679\lib\net462\SteamWare.dll</HintPath>
</Reference>
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
+1 -1
View File
@@ -25,7 +25,7 @@
<package id="popper.js" version="1.14.3" targetFramework="net462" />
<package id="SharpZipLib" version="1.2.0" targetFramework="net462" />
<package id="StackExchange.Redis" version="2.0.601" targetFramework="net462" />
<package id="SteamWare" version="3.3.1910.677" targetFramework="net462" />
<package id="SteamWare" version="3.3.1910.679" targetFramework="net462" />
<package id="System.Buffers" version="4.5.0" targetFramework="net462" />
<package id="System.Diagnostics.PerformanceCounter" version="4.6.0" targetFramework="net462" />
<package id="System.IO.Pipelines" version="4.6.0" targetFramework="net462" />