prova con timer x update post caricamento files
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
<%@ Register Src="WebUserControls/mod_inputDati.ascx" TagName="mod_inputDati" TagPrefix="uc3" %>
|
||||
<%@ Register Src="WebUserControls/mod_pathAndDocs.ascx" TagName="mod_pathAndDocs" TagPrefix="uc4" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<asp:Timer ID="timerUpload" runat="server" Interval="1000" >
|
||||
</asp:Timer>
|
||||
<div class="clearDiv divSx" style="min-width: 320px; width: 25%; background-color: #DDFFFF; min-height: 640px; height: 100%;">
|
||||
<div class="divCenter" style="padding-top: 0px; padding-bottom: 4px;">
|
||||
<div class="divSx half">
|
||||
|
||||
@@ -10,27 +10,50 @@ namespace ETS_WS
|
||||
{
|
||||
public partial class MyDocs : System.Web.UI.Page
|
||||
{
|
||||
/// <summary>
|
||||
/// salvo stato upload in corso...
|
||||
/// </summary>
|
||||
protected bool uploadInCorso
|
||||
{
|
||||
get
|
||||
{
|
||||
return utils.obj.BoolSessionObj("uploadInCorso");
|
||||
}
|
||||
set
|
||||
{
|
||||
utils.obj.setSessionVal("uploadInCorso", value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!Page.IsPostBack)
|
||||
if (!Page.IsPostBack && !uploadInCorso)
|
||||
{
|
||||
timerUpload.Enabled = false;
|
||||
showUpload = true;
|
||||
setPnlVisibility();
|
||||
#if false
|
||||
// verifico se c'è in sessione una richiesta di editing ed adeguo visualizzazione!
|
||||
if (WebShipUtils.mng.idxFileEdit > 0)
|
||||
{
|
||||
showUpload = false;
|
||||
setPnlVisibility();
|
||||
mod_inputDati1.loadEditData();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
mod_fileUpload1.eh_fileCaricato += new EventHandler(mod_fileUpload1_eh_fileCaricato);
|
||||
mod_inputDati1.eh_newData += new EventHandler(mod_inputDati1_eh_newData);
|
||||
mod_pathAndDocs1.eh_reqSalva += new EventHandler(mod_pathAndDocs1_eh_reqSalva);
|
||||
timerUpload.Tick += new EventHandler<EventArgs>(timerUpload_Tick);
|
||||
}
|
||||
/// <summary>
|
||||
/// quando scade il timer rimanda a visualizzazione risultati
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void timerUpload_Tick(object sender, EventArgs e)
|
||||
{
|
||||
showUpload = false;
|
||||
setPnlVisibility();
|
||||
timerUpload.Enabled = false;
|
||||
}
|
||||
/// <summary>
|
||||
/// update inserimento metadati
|
||||
@@ -57,9 +80,12 @@ namespace ETS_WS
|
||||
/// <param name="e"></param>
|
||||
void mod_fileUpload1_eh_fileCaricato(object sender, EventArgs e)
|
||||
{
|
||||
mod_myTempFile1.doUpdate();
|
||||
uploadInCorso = true;
|
||||
timerUpload.Enabled = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// fix panel visibility
|
||||
/// </summary>
|
||||
private void setPnlVisibility()
|
||||
{
|
||||
pnlFileUpload.Visible = showUpload;
|
||||
@@ -73,7 +99,14 @@ namespace ETS_WS
|
||||
{
|
||||
get
|
||||
{
|
||||
return utils.obj.BoolSessionObj("showPnlUpdate");
|
||||
bool answ = true;
|
||||
try
|
||||
{
|
||||
answ = utils.obj.BoolSessionObj("showPnlUpdate");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -87,6 +120,7 @@ namespace ETS_WS
|
||||
/// <param name="e"></param>
|
||||
protected void lnkUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
uploadInCorso = false;
|
||||
showUpload = true;
|
||||
setPnlVisibility();
|
||||
}
|
||||
@@ -97,6 +131,7 @@ namespace ETS_WS
|
||||
/// <param name="e"></param>
|
||||
protected void lnkGestione_Click(object sender, EventArgs e)
|
||||
{
|
||||
uploadInCorso = false;
|
||||
showUpload = false;
|
||||
setPnlVisibility();
|
||||
}
|
||||
|
||||
Generated
+9
@@ -12,6 +12,15 @@ namespace ETS_WS {
|
||||
|
||||
public partial class MyDocs {
|
||||
|
||||
/// <summary>
|
||||
/// timerUpload control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.Timer timerUpload;
|
||||
|
||||
/// <summary>
|
||||
/// lnkUpload control.
|
||||
/// </summary>
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace ETS_WS.WebUserControls
|
||||
{
|
||||
lg = LogManager.GetCurrentClassLogger();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// completato upload file
|
||||
/// </summary>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="tabellaFiles" TypeName="ETS_Data.fileMover" DeleteMethod="eliminaFile" OldValuesParameterFormatString="Original_{0}">
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="tabellaFiles" TypeName="ETS_Data.fileMover" DeleteMethod="eliminaFile" OldValuesParameterFormatString="Original_{0}" EnableCaching="false">
|
||||
<DeleteParameters>
|
||||
<asp:SessionParameter SessionField="UserTempPath" Name="Path" Type="String" />
|
||||
<asp:Parameter Name="Original_Nome" Type="String" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user