FIX: cancellabile SOLO SE non ho AL su ordine
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_OrderList.ascx.cs" Inherits="MP_MAG.WebUserControls.cmp_OrderList" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_OrderListAdd.ascx" TagPrefix="uc1" TagName="cmp_OrderListAdd" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_numRow.ascx" TagPrefix="uc1" TagName="cmp_numRow" %>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-info text-light">
|
||||
<div class="card table-info">
|
||||
<div class="card-header bg-dark text-info py-1">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="col-4">
|
||||
<h5>Dettaglio Richiesta</h5>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<asp:LinkButton runat="server" ID="lbtPrintReport" CssClass="btn btn-block btn-primary" OnClick="lbtPrintReport_Click" Visible="true" ToolTip="Stampa report dettagliato pedane (A4)" OnClientClick='<%# SteamWare.jsUtils.getCBE("ConfirmPrintPackDetail") %>'>REPORT Dettaglio <i class="fas fa-print"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtPrintReportFull" CssClass="btn btn-block btn-primary" OnClick="lbtPrintReport_Click" Visible="true" ToolTip="Stampa report dettagliato pedane (A4)" OnClientClick='<%# SteamWare.jsUtils.getCBE("ConfirmPrintPackDetail") %>'>Report Full <i class="fas fa-print"></i></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<asp:LinkButton runat="server" ID="lbtPrintReport" CssClass="btn btn-block btn-primary" OnClick="lbtPrintReport_Click" Visible="true" ToolTip="Stampa report dettagliato pedane (A4)" OnClientClick='<%# SteamWare.jsUtils.getCBE("ConfirmPrintPackLoad") %>'>Report Pedane <i class="fas fa-print"></i></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<uc1:cmp_OrderListAdd runat="server" ID="cmp_OrderListAdd" />
|
||||
@@ -16,7 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<asp:GridView runat="server" ID="grView" AutoGenerateColumns="False" DataKeyNames="OrderListID" DataSourceID="ods" CssClass="table table-striped table-sm border border-info">
|
||||
<asp:GridView runat="server" ID="grView" AutoGenerateColumns="False" DataKeyNames="OrderListID" DataSourceID="ods" CssClass="table table-striped table-sm border border-info" AllowPaging="true">
|
||||
<HeaderStyle CssClass="default" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
@@ -109,7 +113,7 @@
|
||||
<asp:LinkButton ID="lbtAddNew" runat="server" CssClass="btn btn-sm btn-outline-dark" ToolTip="Add New" OnClick="lbtAddNew_Click" Visible='<%# EnableEdit %>'><i class="fas fa-plus"></i></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtDelete" runat="server" CausesValidation="False" CommandName="Delete" CssClass="btn btn-sm btn-danger" OnClientClick='<%# SteamWare.jsUtils.getCBE("ConfirmDelete") %>' Visible='<%# EnableEdit %>'><i class="fa fa-trash" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:LinkButton ID="lbtDelete" runat="server" CausesValidation="False" CommandName="Delete" CssClass="btn btn-sm btn-danger" OnClientClick='<%# SteamWare.jsUtils.getCBE("ConfirmDelete") %>' Visible='<%# EnableEdit && Eval("NumAL").ToString()=="0" %>'><i class="fa fa-trash" aria-hidden="true"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
@@ -134,9 +138,9 @@
|
||||
<asp:HiddenField runat="server" ID="hfEnableEdit" />
|
||||
</div>
|
||||
<div class="card-footer py-1">
|
||||
<div class="row small">
|
||||
<div class="col-12 text-right">
|
||||
<i class="fa fa-print" aria-hidden="true"></i>Report <i class="fa fa-arrow-right" aria-hidden="true"></i>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<i class="fa fa-print" aria-hidden="true"></i> Report <i class="fa fa-arrow-right" aria-hidden="true"></i>
|
||||
<asp:DropDownList runat="server" ID="ddlPost" DataSourceID="odsPedaneList" DataTextField="label" DataValueField="valString">
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="odsPedaneList" OldValuesParameterFormatString="original_{0}" SelectMethod="getFilt" TypeName="MagData.DS_UtilityTableAdapters.selAKVTableAdapter">
|
||||
@@ -145,6 +149,11 @@
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
</div>
|
||||
<div class="col-4 text-right">
|
||||
<uc1:cmp_numRow runat="server" ID="cmp_numRow" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,6 +46,11 @@ namespace MP_MAG.WebUserControls
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void Cmp_numRow_eh_doRefresh(object sender, EventArgs e)
|
||||
{
|
||||
grView.PageSize = cmp_numRow.numRow;
|
||||
}
|
||||
|
||||
private void Cmp_OrderListAdd_eh_addNew(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
@@ -85,6 +90,17 @@ namespace MP_MAG.WebUserControls
|
||||
MagDataLayerObj.taPJQ.insertQuery($"{tipoDocumento.docPackList}", $"{PackListID}", ddlPost.SelectedValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Avvia stampa report COMPLETO richieste
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtPrintReportFull_Click(object sender, EventArgs e)
|
||||
{
|
||||
// lancio il report x l'elenco pedane + contenuto
|
||||
MagDataLayerObj.taPJQ.insertQuery($"{tipoDocumento.docPackList}", $"{PackListID}", ddlPost.SelectedValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// comando reset
|
||||
/// </summary>
|
||||
@@ -101,8 +117,10 @@ namespace MP_MAG.WebUserControls
|
||||
{
|
||||
cmp_OrderListAdd.Visible = false;
|
||||
lbtPrintReport.DataBind();
|
||||
grView.PageSize = cmp_numRow.numRow;
|
||||
}
|
||||
cmp_OrderListAdd.eh_addNew += Cmp_OrderListAdd_eh_addNew;
|
||||
cmp_numRow.eh_doRefresh += Cmp_numRow_eh_doRefresh;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
+50
-32
@@ -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 MP_MAG.WebUserControls
|
||||
@@ -15,84 +15,102 @@ namespace MP_MAG.WebUserControls
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtPrintReport.
|
||||
/// lbtPrintReportFull 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 lbtPrintReportFull;
|
||||
|
||||
/// <summary>
|
||||
/// lbtPrintReport 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.LinkButton lbtPrintReport;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_OrderListAdd.
|
||||
/// cmp_OrderListAdd 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::MP_MAG.WebUserControls.cmp_OrderListAdd cmp_OrderListAdd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// grView 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.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ods.
|
||||
/// ods 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.ObjectDataSource ods;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfPackListID.
|
||||
/// hfPackListID 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 hfPackListID;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfCodCli.
|
||||
/// hfCodCli 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 hfCodCli;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfEnableEdit.
|
||||
/// hfEnableEdit 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 hfEnableEdit;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlPost.
|
||||
/// ddlPost 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.DropDownList ddlPost;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsPedaneList.
|
||||
/// odsPedaneList 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.ObjectDataSource odsPedaneList;
|
||||
|
||||
/// <summary>
|
||||
/// cmp_numRow control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::MP_MAG.WebUserControls.cmp_numRow cmp_numRow;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user