update pagina debug con paginazione

This commit is contained in:
Samuele E. Locatelli
2020-08-20 15:34:21 +02:00
parent cfc2a83092
commit 8bdda9b16f
9 changed files with 243 additions and 153 deletions
+2 -1
View File
@@ -6,7 +6,7 @@
<div class="card-body py-1">
<div class="row">
<div class="col-12 px-0">
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="ItemID" DataSourceID="ods" CssClass="table table-striped table-sm small">
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="ItemID" DataSourceID="ods" CssClass="table table-striped table-sm small" AllowPaging="true">
<Columns>
<asp:TemplateField HeaderText="QR">
<ItemTemplate>
@@ -56,6 +56,7 @@
<asp:HiddenField ID="hfSheetID" runat="server" />
<asp:HiddenField ID="hfShowQr" runat="server" Value="false" />
<asp:HiddenField ID="hfQrSize" runat="server" Value="32" />
<asp:HiddenField ID="hfNumRow" runat="server" Value="50" />
</div>
</div>
</div>
+22 -1
View File
@@ -40,7 +40,10 @@ namespace NKC_WF.WebUserControls
}
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
numRow = 10;
}
}
public void doUpdate()
{
@@ -64,6 +67,24 @@ namespace NKC_WF.WebUserControls
}
}
/// <summary>
/// Numero righe da mostrare (se 0 --> no pagiazione)
/// </summary>
public int numRow
{
get
{
int answ = 32;
int.TryParse(hfNumRow.Value, out answ);
return answ;
}
set
{
hfNumRow.Value = value.ToString();
grView.PageSize = value;
doUpdate();
}
}
/// <summary>
/// Calcola css da statusID
/// </summary>
/// <param name="_statusID"></param>
+52 -43
View File
@@ -11,52 +11,61 @@ namespace NKC_WF.WebUserControls
{
public partial class cmp_MU_Items
{
public partial class cmp_MU_Items
{
/// <summary>
/// Controllo grView.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView grView;
/// <summary>
/// Controllo grView.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView grView;
/// <summary>
/// Controllo ods.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
/// <summary>
/// Controllo ods.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
/// <summary>
/// Controllo hfSheetID.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfSheetID;
/// <summary>
/// Controllo hfSheetID.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfSheetID;
/// <summary>
/// Controllo hfShowQr.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfShowQr;
/// <summary>
/// Controllo hfShowQr.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfShowQr;
/// <summary>
/// Controllo hfQrSize.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfQrSize;
}
/// <summary>
/// Controllo hfQrSize.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfQrSize;
/// <summary>
/// Controllo hfNumRow.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfNumRow;
}
}
+42 -31
View File
@@ -5,37 +5,48 @@
<%@ Register Src="~/WebUserControls/cmp_MU_Items.ascx" TagPrefix="uc1" TagName="cmp_MU_Items" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<asp:HiddenField ID="hfBatchID" runat="server" />
<asp:HiddenField ID="hfSheetID" runat="server" />
<asp:Timer ID="timerRefresh" runat="server" Interval="5000" OnTick="timerRefresh_Tick"></asp:Timer>
<asp:UpdatePanel runat="server" ID="upnlDebug">
<ContentTemplate>
<div class="row">
<div class="col-2 text-left">
<asp:Image runat="server" Height="64" ID="imgQrLogin" />
<b>LOGIN</b> Page
</div>
<div class="col-8">
<h1 class="text-center">DEBUG UNLOAD PAGE</h1>
</div>
<div class="col-2 text-right">
QR size
<asp:HiddenField ID="hfBatchID" runat="server" />
<asp:HiddenField ID="hfSheetID" runat="server" />
<asp:UpdatePanel runat="server" ID="upnlDebug">
<ContentTemplate>
<asp:Timer ID="timerRefresh" runat="server" Interval="2000" OnTick="timerRefresh_Tick"></asp:Timer>
<div class="row">
<div class="col-2 text-left">
<asp:Image runat="server" Height="64" ID="imgQrLogin" />
<b>LOGIN</b> Page
</div>
<div class="col-8">
<h1 class="text-center">DEBUG UNLOAD PAGE</h1>
</div>
<div class="col-2 text-right">
<div>
QR size
<asp:DropDownList runat="server" ID="ddlQrSize" AutoPostBack="True" OnSelectedIndexChanged="ddlQrSize_SelectedIndexChanged">
<asp:ListItem Text="Small" Value="16"></asp:ListItem>
<asp:ListItem Text="Medium" Value="32" Selected="True"></asp:ListItem>
<asp:ListItem Text="Large" Value="64"></asp:ListItem>
<asp:ListItem Text="Small" Value="16"></asp:ListItem>
<asp:ListItem Text="Medium" Value="32" Selected="True"></asp:ListItem>
<asp:ListItem Text="Large" Value="64"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-12">
<uc1:cmp_MU_Items runat="server" ID="cmp_MU_Items" />
</div>
<div class="col-6">
<uc1:cmp_MU_carts runat="server" ID="cmp_MU_carts" />
</div>
<div class="col-6">
<uc1:cmp_MU_bins runat="server" ID="cmp_MU_bins" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div>
NUM Righe:
<asp:DropDownList runat="server" ID="ddlNumRow" AutoPostBack="True" OnSelectedIndexChanged="ddlNumRow_SelectedIndexChanged">
<asp:ListItem Text="10" Value="10" Selected="True"></asp:ListItem>
<asp:ListItem Text="25" Value="25"></asp:ListItem>
<asp:ListItem Text="50" Value="50"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="col-12">
<uc1:cmp_MU_Items runat="server" ID="cmp_MU_Items" />
</div>
<div class="col-6">
<uc1:cmp_MU_carts runat="server" ID="cmp_MU_carts" />
</div>
<div class="col-6">
<uc1:cmp_MU_bins runat="server" ID="cmp_MU_bins" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
+15
View File
@@ -68,6 +68,15 @@ namespace NKC_WF.site
return answ;
}
}
protected int numRow
{
get
{
int answ = 10;
int.TryParse(ddlNumRow.SelectedValue, out answ);
return answ;
}
}
/// <summary>
/// Aggiorna componente principale e child components
/// </summary>
@@ -107,12 +116,18 @@ namespace NKC_WF.site
updateSize();
}
protected void ddlNumRow_SelectedIndexChanged(object sender, EventArgs e)
{
updateSize();
}
private void updateSize()
{
imgQrLogin.Height = qrSize * 2;
cmp_MU_bins.qrSize = qrSize;
cmp_MU_carts.qrSize = qrSize;
cmp_MU_Items.qrSize = qrSize;
cmp_MU_Items.numRow = numRow;
}
protected void timerRefresh_Tick(object sender, EventArgs e)
+84 -75
View File
@@ -11,88 +11,97 @@ namespace NKC_WF.site
{
public partial class DBG_QRCode_Unload
{
public partial class DBG_QRCode_Unload
{
/// <summary>
/// Controllo hfBatchID.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfBatchID;
/// <summary>
/// Controllo hfBatchID.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfBatchID;
/// <summary>
/// Controllo hfSheetID.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfSheetID;
/// <summary>
/// Controllo hfSheetID.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfSheetID;
/// <summary>
/// Controllo timerRefresh.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.Timer timerRefresh;
/// <summary>
/// Controllo upnlDebug.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upnlDebug;
/// <summary>
/// Controllo upnlDebug.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upnlDebug;
/// <summary>
/// Controllo timerRefresh.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.Timer timerRefresh;
/// <summary>
/// Controllo imgQrLogin.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Image imgQrLogin;
/// <summary>
/// Controllo imgQrLogin.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Image imgQrLogin;
/// <summary>
/// Controllo ddlQrSize.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlQrSize;
/// <summary>
/// Controllo ddlQrSize.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlQrSize;
/// <summary>
/// Controllo cmp_MU_Items.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_Items cmp_MU_Items;
/// <summary>
/// Controllo ddlNumRow.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlNumRow;
/// <summary>
/// Controllo cmp_MU_carts.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_carts cmp_MU_carts;
/// <summary>
/// Controllo cmp_MU_Items.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_Items cmp_MU_Items;
/// <summary>
/// Controllo cmp_MU_bins.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_bins cmp_MU_bins;
}
/// <summary>
/// Controllo cmp_MU_carts.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_carts cmp_MU_carts;
/// <summary>
/// Controllo cmp_MU_bins.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_bins cmp_MU_bins;
}
}
+12 -1
View File
@@ -3,5 +3,16 @@
<%@ Register Src="~/WebUserControls/cmp_partMIA.ascx" TagPrefix="uc1" TagName="cmp_partMIA" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<uc1:cmp_partMIA runat="server" id="cmp_partMIA" />
<div class="card" style="width: 100%;">
<div class="card-header">
<h3><%: traduci("PartMIA") %></h3>
</div>
<div class="card-body">
<div class="row">
<div class="col-12 my-2" runat="server" id="divBatchList">
<uc1:cmp_partMIA runat="server" ID="cmp_partMIA" />
</div>
</div>
</div>
</div>
</asp:Content>
+5 -1
View File
@@ -7,11 +7,15 @@ using System.Web.UI.WebControls;
namespace NKC_WF.site
{
public partial class PartMIA : System.Web.UI.Page
public partial class PartMIA : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
((SiteContent)this.Master).showSearch = false;
}
}
}
}
+9
View File
@@ -14,6 +14,15 @@ namespace NKC_WF.site
public partial class PartMIA
{
/// <summary>
/// Controllo divBatchList.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divBatchList;
/// <summary>
/// Controllo cmp_partMIA.
/// </summary>