Cambiata proc dies group con modulo, ora funziona correttamente

This commit is contained in:
Samuele E. Locatelli
2015-06-03 09:55:16 +02:00
parent 6adb1823b9
commit b30effb08d
19 changed files with 237 additions and 194 deletions
+16
View File
@@ -374,6 +374,7 @@
<Content Include="WebUserControls\mod_AgentsMan.ascx" />
<Content Include="WebUserControls\mod_autocompleteShort.ascx" />
<Content Include="WebUserControls\mod_createNewStdCost.ascx" />
<Content Include="WebUserControls\mod_DiesGroupMan.ascx" />
<Content Include="WebUserControls\mod_display.ascx" />
<Content Include="WebUserControls\mod_displayHor.ascx" />
<Content Include="WebUserControls\mod_elencoRichResetUtenti.ascx" />
@@ -414,6 +415,7 @@
<Content Include="WebUserControls\mod_testata.ascx" />
<Content Include="JumboPage.master" />
<Content Include="FullPage.master" />
<Content Include="WebUserControls\mod_TranspCostMan.ascx" />
<Content Include="WebUserControls\mod_vocabolario.ascx" />
<Content Include="WhatIf.aspx" />
<Content Include="fonts\glyphicons-halflings-regular.woff" />
@@ -795,6 +797,13 @@
<Compile Include="WebUserControls\mod_createNewStdCost.ascx.designer.cs">
<DependentUpon>mod_createNewStdCost.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_DiesGroupMan.ascx.cs">
<DependentUpon>mod_DiesGroupMan.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_DiesGroupMan.ascx.designer.cs">
<DependentUpon>mod_DiesGroupMan.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_display.ascx.cs">
<DependentUpon>mod_display.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -1082,6 +1091,13 @@
<Compile Include="WebUserControls\mod_testata.ascx.designer.cs">
<DependentUpon>mod_testata.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_TranspCostMan.ascx.cs">
<DependentUpon>mod_TranspCostMan.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_TranspCostMan.ascx.designer.cs">
<DependentUpon>mod_TranspCostMan.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_vocabolario.ascx.cs">
<DependentUpon>mod_vocabolario.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
+5 -65
View File
@@ -1,5 +1,8 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/FullPage.Master" AutoEventWireup="true" CodeBehind="DiesGroupMan.aspx.cs" Inherits="C2P.DiesGroupMan" %>
<%@ Register Src="~/WebUserControls/mod_fileUploader.ascx" TagName="mod_fileUploader" TagPrefix="uc2" %>
<%@ Register Src="~/WebUserControls/mod_DiesGroupMan.ascx" TagPrefix="uc1" TagName="mod_DiesGroupMan" %>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
@@ -9,70 +12,7 @@
<div class="container-fluid" style="background-color: #cdcdcd; padding-top: 2px; padding-bottom: 2px;">
<div class="container">
<div class="row">
<!--style="min-height: 282px;">-->
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-xs-8 col-xs-offset-2">
<div runat="server" id="divHelp">
<h3 style="text-align: center; margin: auto;"><%: traduci("HDiesGroupManTitle") %></h3>
<div style="font-size: 1.2em; text-align: center; margin: auto;">
<%: traduci("HDiesGroupManRepBody") %>
</div>
</div>
</div>
</div>
</div>
<div class="panel-body" style="min-height: 213px;">
<div class="row">
<div class="col-xs-6">
<div runat="server" id="divAnalisys">
<h3><%: traduci("StepA") %></h3>
<div class="panel panel-info" style="min-height: 180px;">
<div class="panel-heading">
<h4 style="margin-top: -4px; margin-bottom: -4px;"><%: traduci("HDiesGroupManStepA") %></h4>
</div>
<div class="panel-body bg-info" style="padding-top: 20px; padding-bottom: 20px;">
<div class="col-xs-12 text-center">
<asp:HyperLink runat="server" ID="HyperLink2" class="btn btn-success btn-lg" NavigateUrl="~/CsvExcelExporter?table=DiesGroup">
<i class="fa fa-file-excel-o fa-3x"></i>
<div style="margin-top:0.5em;">
<%: traduci("DiesGroupFile") %>
</div>
</asp:HyperLink>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-6">
<div runat="server" id="div1">
<h3><%: traduci("StepB") %></h3>
<div class="panel panel-success" style="min-height: 180px;">
<div class="panel-heading">
<h4 style="margin-top: -4px; margin-bottom: -4px;"><%: traduci("HDiesGroupManStepB") %></h4>
</div>
<div class="panel-body bg-success" style="padding-top: 20px; padding-bottom: 20px; height: 148px;">
<div class="col-xs-12 text-center">
<uc2:mod_fileuploader id="mod_fileUploader1" runat="server" conttypefilt="application/vnd.ms-excel" filename="DiesGroupRaw.csv" />
<asp:Label runat="server" ID="lblOut"><%: traduci("WaitingForFile") %></asp:Label>
<div class="row">
<div class="col-xs-9">
<asp:Label runat="server" ID="lblUploadDone" />
</div>
<%--<div class="col-xs-3">
<asp:Button runat="server" CssClass="btn btn-success btn-sm" ID="btnDoImport" Text='<%# traduci("DoImport") %>' Visible="false" />
</div>--%>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<uc1:mod_DiesGroupMan runat="server" ID="mod_DiesGroupMan" />
</div>
</div>
</div>
+1 -68
View File
@@ -4,78 +4,11 @@ using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
using C2P_Data;
namespace C2P
{
public partial class DiesGroupMan : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
#if false
if (!Page.IsPostBack)
{
btnDoImport.DataBind();
}
#endif
mod_fileUploader1.eh_uploadDone += mod_fileUploader1_eh_uploadDone;
}
/// <summary>
/// file caricato
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_fileUploader1_eh_uploadDone(object sender, EventArgs e)
{
// caricato file su server, PROVA ad eseguire import tabella
int numRecIn = 0;
int numRecConv = 0;
string fileName = "DiesGroupRaw";
string uplDir = memLayer.ML.confReadString("uplDir");
string FIELDTERMINATOR = memLayer.ML.confReadString("FIELDTERMINATOR");
string ROWTERMINATOR = memLayer.ML.confReadString("ROWTERMINATOR");
string FIRSTROW = memLayer.ML.confReadString("FIRSTROW");
string CODEPAGE = memLayer.ML.confReadString("CODEPAGE");
bool flgUpdate = memLayer.ML.confReadBool("flgUpdate");
int numTicket = Convert.ToInt32(DateTime.Now.ToString("yyMMddHHmm"));
try
{
DtProxy.man.taDGD.import(fileName, uplDir, "DiesGroupRaw.csv", FIELDTERMINATOR, ROWTERMINATOR, FIRSTROW, CODEPAGE, "errorDiesGroup.log", numTicket);
//numRecIn = DtProxy.man.taILog.getByTicket(numTicket)[0].re;
}
catch
{ }
try
{
DtProxy.man.taDGD.convert(fileName, numTicket);
//numRecConv = DtProxy.man.taOH.convert("OrdersHistRaw")[0].RecordsIn;
}
catch
{ }
try
{
DtProxy.man.taDGD.merge(fileName, numTicket, flgUpdate);
//DtProxy.man.taOH.merge("OrdersHistRaw");
}
catch
{ }
lblUploadDone.Text = string.Format("Upload and Import done for {0}", fileName);
//lblUploadDone.Text = string.Format("{0} records IN, {1} records acquired", numRecIn, numRecConv);
logger.lg.scriviLog(lblUploadDone.Text, tipoLog.INFO);
//btnDoImport.Visible = true;
//lblOut.Visible = !btnDoImport.Visible;
}
/// <summary>
/// wrapper traduzione
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
}
}
+2 -56
View File
@@ -13,66 +13,12 @@ namespace C2P {
public partial class DiesGroupMan {
/// <summary>
/// divHelp control.
/// mod_DiesGroupMan 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 divHelp;
/// <summary>
/// divAnalisys 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 divAnalisys;
/// <summary>
/// HyperLink2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink HyperLink2;
/// <summary>
/// div1 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 div1;
/// <summary>
/// mod_fileUploader1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::C2P.WebUserControls.mod_fileUploader mod_fileUploader1;
/// <summary>
/// lblOut control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblOut;
/// <summary>
/// lblUploadDone control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblUploadDone;
protected global::C2P.WebUserControls.mod_DiesGroupMan mod_DiesGroupMan;
}
}
+1 -1
View File
@@ -62,7 +62,7 @@
<add key="ROWTERMINATOR" value="\n" />
<add key="FIRSTROW" value="2" />
<add key="CODEPAGE" value="ACP" />
<add key="flgUpdate" value="1" />
<add key="flgUpdate" value="true" />
<!--area reports-->
<add key="ReportRemoteRender" value="true" />
<add key="enableQueue" value="false" />
+64
View File
@@ -0,0 +1,64 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_DiesGroupMan.ascx.cs" Inherits="C2P.WebUserControls.mod_DiesGroupMan" %>
<%@ Register Src="~/WebUserControls/mod_fileUploader.ascx" TagName="mod_fileUploader" TagPrefix="uc1" %>
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-xs-8 col-xs-offset-2">
<div runat="server" id="divHelp">
<h3 style="text-align: center; margin: auto;"><%: traduci("HDiesGroupManTitle") %></h3>
<div style="font-size: 1.2em; text-align: center; margin: auto;">
<%: traduci("HDiesGroupManRepBody") %>
</div>
</div>
</div>
</div>
</div>
<div class="panel-body" style="min-height: 213px;">
<div class="row">
<div class="col-xs-6">
<div runat="server" id="divAnalisys">
<h3><%: traduci("StepA") %></h3>
<div class="panel panel-info" style="min-height: 180px;">
<div class="panel-heading">
<h4 style="margin-top: -4px; margin-bottom: -4px;"><%: traduci("HDiesGroupManStepA") %></h4>
</div>
<div class="panel-body bg-info" style="padding-top: 20px; padding-bottom: 20px;">
<div class="col-xs-12 text-center">
<asp:HyperLink runat="server" ID="HyperLink2" class="btn btn-success btn-lg" NavigateUrl="~/CsvExcelExporter?table=DiesGroup">
<i class="fa fa-file-excel-o fa-3x"></i>
<div style="margin-top:0.5em;">
<%: traduci("DiesGroupFile") %>
</div>
</asp:HyperLink>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-6">
<div runat="server" id="div1">
<h3><%: traduci("StepB") %></h3>
<div class="panel panel-success" style="min-height: 180px;">
<div class="panel-heading">
<h4 style="margin-top: -4px; margin-bottom: -4px;"><%: traduci("HDiesGroupManStepB") %></h4>
</div>
<div class="panel-body bg-success" style="padding-top: 20px; padding-bottom: 20px; height: 148px;">
<div class="col-xs-12 text-center">
<uc1:mod_fileuploader id="mod_fileUploader1" runat="server" conttypefilt="application/vnd.ms-excel" filename="DiesGroupRaw.csv" />
<asp:Label runat="server" ID="lblOut"><%: traduci("WaitingForFile") %></asp:Label>
<div class="row">
<div class="col-xs-9">
<asp:Label runat="server" ID="lblUploadDone" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
using C2P_Data;
namespace C2P.WebUserControls
{
public partial class mod_DiesGroupMan : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
mod_fileUploader1.eh_uploadDone += mod_fileUploader1_eh_uploadDone;
}
/// <summary>
/// file caricato
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_fileUploader1_eh_uploadDone(object sender, EventArgs e)
{
// caricato file su server, PROVA ad eseguire import tabella
string fileName = "DiesGroupRaw";
string uplDir = memLayer.ML.confReadString("uplDir");
string FIELDTERMINATOR = memLayer.ML.confReadString("FIELDTERMINATOR");
string ROWTERMINATOR = memLayer.ML.confReadString("ROWTERMINATOR");
string FIRSTROW = memLayer.ML.confReadString("FIRSTROW");
string CODEPAGE = memLayer.ML.confReadString("CODEPAGE");
bool flgUpdate = memLayer.ML.confReadBool("flgUpdate");
int numTicket = 0; // Convert.ToInt32(DateTime.Now.ToString("yyMMddHHmm"));
try
{
DtProxy.man.taDGD.import(fileName, uplDir, "DiesGroupRaw.csv", FIELDTERMINATOR, ROWTERMINATOR, FIRSTROW, CODEPAGE, "errorDiesGroup.log", numTicket);
}
catch
{ }
try
{
DtProxy.man.taDGD.convert(fileName, numTicket);
}
catch
{ }
try
{
DtProxy.man.taDGD.merge(fileName, numTicket, flgUpdate);
}
catch
{ }
lblUploadDone.Text = string.Format("Upload and Import done for {0}", fileName);
logger.lg.scriviLog(lblUploadDone.Text, tipoLog.INFO);
}
/// <summary>
/// wrapper traduzione
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
}
}
+78
View File
@@ -0,0 +1,78 @@
//------------------------------------------------------------------------------
// <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 C2P.WebUserControls {
public partial class mod_DiesGroupMan {
/// <summary>
/// divHelp 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 divHelp;
/// <summary>
/// divAnalisys 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 divAnalisys;
/// <summary>
/// HyperLink2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink HyperLink2;
/// <summary>
/// div1 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 div1;
/// <summary>
/// mod_fileUploader1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::C2P.WebUserControls.mod_fileUploader mod_fileUploader1;
/// <summary>
/// lblOut control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblOut;
/// <summary>
/// lblUploadDone control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblUploadDone;
}
}
@@ -16,7 +16,6 @@ namespace C2P.WebUserControls
if (!Page.IsPostBack)
{
setModVisibility("");
//memLayer.ML.setSessionVal("runningQLR", false);
}
mod_fileUploader1.eh_uploadDone += mod_fileUploader1_eh_uploadDone;
// verifico se sto eseguendo task lungo di caricamento...
BIN
View File
Binary file not shown.
Binary file not shown.
@@ -11,7 +11,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>bnLKC9e9BFu5k+Ggb9RK7TyaV68=</dsig:DigestValue>
<dsig:DigestValue>scdH882AFFsw9qODgLh5duMYeOY=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
@@ -84,7 +84,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>aICFqQ8Ie+fElxKgP0aZ9zfZb7I=</dsig:DigestValue>
<dsig:DigestValue>9Co0gwc4OUj8X4I1+YFJDq4o77A=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
@@ -96,7 +96,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>qEnv3tKIoD5vse1IUJmYZ9B/d4o=</dsig:DigestValue>
<dsig:DigestValue>H0p40cT6cWtx9w3KeH6cGReWot4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.