spostamento modulo a nuova denominazione
This commit is contained in:
@@ -603,6 +603,7 @@
|
||||
<Content Include="WebUserControls\cmp_planStats_Cli.ascx" />
|
||||
<Content Include="WebUserControls\cmp_planStats_Fasi.ascx" />
|
||||
<Content Include="WebUserControls\cmp_planStats_Mac.ascx" />
|
||||
<Content Include="WebUserControls\cmp_PODL_OUT.ascx" />
|
||||
<Content Include="WebUserControls\cmp_ST_detail.ascx" />
|
||||
<Content Include="WebUserControls\cmp_ST_objView.ascx" />
|
||||
<Content Include="WebUserControls\cmp_ST_preview.ascx" />
|
||||
@@ -622,7 +623,6 @@
|
||||
<Content Include="WebUserControls\mod_gestioneODL.ascx" />
|
||||
<Content Include="WebUserControls\mod_gestKIT.ascx" />
|
||||
<Content Include="WebUserControls\mod_gestPromODL.ascx" />
|
||||
<Content Include="WebUserControls\mod_gestPromODL_OUT.ascx" />
|
||||
<Content Include="WebUserControls\mod_login.ascx" />
|
||||
<Content Include="WebUserControls\mod_main_help.ascx" />
|
||||
<Content Include="WebUserControls\mod_menuBottom.ascx" />
|
||||
@@ -962,6 +962,13 @@
|
||||
<Compile Include="WebUserControls\cmp_planStats_Mac.ascx.designer.cs">
|
||||
<DependentUpon>cmp_planStats_Mac.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_PODL_OUT.ascx.cs">
|
||||
<DependentUpon>cmp_PODL_OUT.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_PODL_OUT.ascx.designer.cs">
|
||||
<DependentUpon>cmp_PODL_OUT.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_ST_detail.ascx.cs">
|
||||
<DependentUpon>cmp_ST_detail.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -1095,13 +1102,6 @@
|
||||
<Compile Include="WebUserControls\mod_gestPromODL.ascx.designer.cs">
|
||||
<DependentUpon>mod_gestPromODL.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_gestPromODL_OUT.ascx.cs">
|
||||
<DependentUpon>mod_gestPromODL_OUT.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_gestPromODL_OUT.ascx.designer.cs">
|
||||
<DependentUpon>mod_gestPromODL_OUT.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_login.ascx.cs">
|
||||
<DependentUpon>mod_login.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
+2
-8
@@ -2,7 +2,7 @@
|
||||
|
||||
<%@ Register Src="~/WebUserControls/cmp_planStats.ascx" TagPrefix="uc1" TagName="cmp_planStats" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_planApprove.ascx" TagPrefix="uc1" TagName="cmp_planApprove" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_gestPromODL_OUT.ascx" TagPrefix="uc1" TagName="mod_gestPromODL_OUT" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_PODL_OUT.ascx" TagPrefix="uc1" TagName="cmp_PODL_OUT" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<asp:Label runat="server" ID="lblDataImportOut" CssClass="text-danger" />
|
||||
@@ -23,13 +23,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-1" runat="server" id="divPromOUT">
|
||||
<%-- <br />
|
||||
rivedere il discorso dei FREEPASS autogenerati... x filtrare x TIPO creazione
|
||||
<br />
|
||||
ordinare SEMPRE x priorità ASC (FIFO) e indicarlo!!!
|
||||
<br />
|
||||
togliere filtri da header e/o gestione toggle e/o nascondere creazione promessa?--%>
|
||||
<uc1:mod_gestPromODL_OUT runat="server" ID="mod_gestPromODL_OUT" />
|
||||
<uc1:cmp_PODL_OUT runat="server" ID="cmp_PODL_OUT" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,19 +23,19 @@ namespace MP_ADM
|
||||
private void Cmp_planApprove_eh_nuovoValore(object sender, EventArgs e)
|
||||
{
|
||||
cmp_planStats.doReset();
|
||||
mod_gestPromODL_OUT.resetSelezione();
|
||||
cmp_PODL_OUT.resetSelezione();
|
||||
}
|
||||
|
||||
private void Cmp_planApprove_eh_resetSelezione(object sender, EventArgs e)
|
||||
{
|
||||
cmp_planStats.doReset();
|
||||
mod_gestPromODL_OUT.resetSelezione();
|
||||
cmp_PODL_OUT.resetSelezione();
|
||||
}
|
||||
|
||||
private void Cmp_planApprove_eh_selValore(object sender, EventArgs e)
|
||||
{
|
||||
cmp_planStats.doReset();
|
||||
mod_gestPromODL_OUT.resetSelezione();
|
||||
cmp_PODL_OUT.resetSelezione();
|
||||
}
|
||||
|
||||
private void cmp_planStats_eh_reset(object sender, EventArgs e)
|
||||
|
||||
Generated
+16
-14
@@ -7,11 +7,13 @@
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MP_ADM {
|
||||
|
||||
|
||||
public partial class Planner {
|
||||
|
||||
namespace MP_ADM
|
||||
{
|
||||
|
||||
|
||||
public partial class Planner
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblDataImportOut.
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace MP_ADM {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblDataImportOut;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divContent.
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace MP_ADM {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divContent;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_planStats.
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace MP_ADM {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MP_ADM.WebUserControls.cmp_planStats cmp_planStats;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_planApprove.
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace MP_ADM {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MP_ADM.WebUserControls.cmp_planApprove cmp_planApprove;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtToggle.
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace MP_ADM {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtToggle;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Controllo tgIcon.
|
||||
/// </summary>
|
||||
@@ -65,7 +67,7 @@ namespace MP_ADM {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl tgIcon;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divPromOUT.
|
||||
/// </summary>
|
||||
@@ -74,14 +76,14 @@ namespace MP_ADM {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divPromOUT;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_gestPromODL_OUT.
|
||||
/// Controllo cmp_PODL_OUT.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MP_ADM.WebUserControls.mod_gestPromODL_OUT mod_gestPromODL_OUT;
|
||||
protected global::MP_ADM.WebUserControls.cmp_PODL_OUT cmp_PODL_OUT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,247 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_PODL_OUT.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_PODL_OUT" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_newPromessaODL.ascx" TagPrefix="uc1" TagName="mod_newPromessaODL" %>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h4>Filtri attivi</h4>
|
||||
</div>
|
||||
<div class="col">
|
||||
REPARTO
|
||||
<br />
|
||||
<asp:DropDownList runat="server" ID="ddlCodGruppo" DataSourceID="odsCodGruppo" DataTextField="DescrGruppo" DataValueField="CodGruppo" AutoPostBack="True" OnSelectedIndexChanged="ddlCodGruppo_SelectedIndexChanged" AppendDataBoundItems="true">
|
||||
<asp:ListItem Text="-- SHOW ALL --" Value=""></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="odsCodGruppo" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MapoDb.DS_applicazioneTableAdapters.AnagraficaGruppiTableAdapter" FilterExpression="TipoGruppo = 'FASE' AND SelEnabled = 1"></asp:ObjectDataSource>
|
||||
</div>
|
||||
<div class="col text-nowrap">
|
||||
<div class="input-group my-1 input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<asp:LinkButton runat="server" ID="lbtResArt" CssClass="btn btn-outline-dark" OnClick="lbtResArt_Click"><i class="fa fa-refresh"></i> <b>Articolo</b></asp:LinkButton>
|
||||
<asp:Label runat="server" ID="lblCodArt" CssClass="input-group-text" />
|
||||
<asp:Label runat="server" ID="lblDescArt" CssClass="input-group-text text-truncate" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="input-group my-1 input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<asp:LinkButton runat="server" ID="lbtResMacc" CssClass="btn btn-outline-dark" OnClick="lbtResMacc_Click"><i class="fa fa-refresh"></i> <b>Macchina</b></asp:LinkButton>
|
||||
<asp:Label runat="server" ID="lblNomeMacc" CssClass="input-group-text" />
|
||||
<asp:Label runat="server" ID="lblIdxMacc" CssClass="input-group-text" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<asp:CheckBox runat="server" ID="chkUnassigned" AutoPostBack="True" OnCheckedChanged="chkUnassigned_CheckedChanged" Checked="true" />
|
||||
</div>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="lblUnass" CssClass="input-group-text" Text="Mostra SOLO programmate" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-dark text-light" style="white-space: nowrap; padding: 2px;">
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-4">
|
||||
<asp:LinkButton ID="lbtNewPODL" runat="server" OnClick="lbtNewPODL_Click" CssClass="btn btn-block btn-primary text-light"><i class="fa fa-plus"></i> PROMESSA ODL <i class="fa fa-list-ol"></i></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-4"></div>
|
||||
</div>
|
||||
<uc1:mod_newPromessaODL runat="server" ID="mod_newPromessaODL" />
|
||||
</div>
|
||||
<div id="divEditQta" runat="server" visible="false" class="ctrSelRowStyle" style="white-space: nowrap; padding: 2px;">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<asp:LinkButton ID="lbtOk" runat="server" Text="Ok" OnClick="btnOk_Click" CssClass="btn btn-block btn-success" OnClientClick="return confirm('Sicuro di voler modificare la Promessa ODL?');"><i class="fa fa-plus"></i> Modifica </asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
# Pezzi Richiesti:
|
||||
<asp:TextBox runat="server" ID="txtNewQta" Width="6em" />
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
Pezzi Pallet:
|
||||
<asp:TextBox runat="server" ID="txtNewPzPallet" Width="6em" />
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<asp:LinkButton ID="lbtCancel" runat="server" Text="Annulla" OnClick="btnCancel_Click" CssClass="btn btn-block btn-warning"><i class="fa fa-ban"></i> Annulla</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound" PageSize="25"
|
||||
DataKeyNames="IdxPromessa" DataSourceID="ods" Width="100%">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
<SelectedRowStyle CssClass="ctrSelRowStyle" />
|
||||
<FooterStyle CssClass="ctrFooter" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<EmptyDataRowStyle CssClass="ctrRowStyle" />
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbtReset" CausesValidation="false" OnClick="btnReset_Click" ToolTip="Reset selezione" CssClass="btn btn-block btn-warning"><i class="fa fa-refresh"></i></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbtSel" CausesValidation="false" CommandName="Select" OnCommand="lbt_Command" CommandArgument="Edit" ToolTip="Modifica promessa" Visible='<%# Eval("IdxODL").ToString()=="" || Eval("IdxODL").ToString()=="0" %>' CssClass="btn btn-sm btn-info"><i class="fa fa-edit"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtClona" CausesValidation="false" CommandName="Select" OnCommand="lbt_Command" CommandArgument="Clona" ToolTip="Copia promessa" CssClass="btn btn-sm btn-primary" Visible='<%# !Eval("KeyRichiesta").ToString().StartsWith("KIT") %>'><i class="fa fa-clipboard"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="#" SortExpression="IdxPromessa">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtIdxPromessa" Text='<%# Eval("IdxPromessa") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="ODL" SortExpression="IdxOdl">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtIdxOdl" Text='<%# Eval("IdxOdl") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="CodArticolo" SortExpression="CodArticolo">
|
||||
<ItemTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<asp:LinkButton runat="server" ID="lbtSelArt" OnClick="lbtSelArt_Click" CausesValidation="False" CommandArgument='<%# Eval("CodArticolo")+"|"+Eval("DescArticolo") %>' CssClass="btn btn-sm btn-outline-dark p-1">
|
||||
<i class="fa fa-search"></i>
|
||||
<b><%# Eval("CodArticolo") %></b>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-6 text-right font-weight-bold">
|
||||
<asp:Label runat="server" ID="Label1" Text='<%# Eval("KeyRichiesta") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<asp:Label runat="server" ID="txtDescArticolo" Text='<%# Eval("DescArticolo") %>' />
|
||||
</div>
|
||||
<div class="col-7 text-right">
|
||||
<asp:Label runat="server" ID="Label2" Text='<%# Eval("Note") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: none; clear: both;">
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="codMacchina" SortExpression="CodMacchina">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbtSelMacc" OnClick="lbtSelMacc_Click" CausesValidation="False" CommandArgument='<%# Eval("IdxMacchina")+"|"+Eval("Nome") %>' CssClass="btn btn-sm btn-outline-dark p-1 btn-block">
|
||||
<i class="fa fa-search"></i>
|
||||
<b><%# Eval("Nome") %></b>
|
||||
<div><%# Eval("CodMacchina") %></div>
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="NumPezzi" SortExpression="NumPezzi" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtNumPezzi" Text='<%# Eval("NumPezzi") %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:Label runat="server" ID="txtNumPezzi" Text='<%# Bind("NumPezzi") %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TCAssegnato" SortExpression="TCAssegnato" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtTCAssegnato" Text='<%# Eval("TCAssegnato","{0:0.000}") %>' />
|
||||
<div class="small">
|
||||
<asp:Label runat="server" ID="txtTCAssMs" Text='<%# SteamWare.TempiCiclo.minSec(Eval("TCAssegnato")) %>' />
|
||||
(m:s)
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="PzPallet" SortExpression="PzPallet" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtPzPallet" Text='<%# Eval("PzPallet") %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Data" SortExpression="DueDate" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtDataInizio" Text='<%# Eval("DueDate") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ord" SortExpression="Priorita" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtPriorita" Text='<%# Eval("Priorita") %>' CssClass="font-weight-bold" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<div class="d-flex">
|
||||
<div class="mr-auto p-2">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton runat="server" ID="lbtNoneSx" Enabled="false" Visible='<%# !checkChgPrio(Eval("IdxMacchina").ToString(), Eval("Priorita").ToString(), 1) %>' CssClass="btn btn-sm btn-outline-success text-light"><i class="fa fa-arrow-down" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lnkMoveUp" Visible='<%# checkChgPrio(Eval("IdxMacchina").ToString(), Eval("Priorita").ToString(), 1) %>' ToolTip="Aumenta (ritarda)" OnClick="lnkMoveUp_Click" CausesValidation="False" CommandArgument='<%# Eval("IdxPromessa") %>' CssClass="btn btn-sm btn-success"><i class="fa fa-arrow-down" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lnkMoveDown" Visible='<%# checkChgPrio(Eval("IdxMacchina").ToString(), Eval("Priorita").ToString(), -1) %>' ToolTip="Diminuisci (anticipa)" OnClick="lnkMoveDown_Click" CausesValidation="False" CommandArgument='<%# Eval("IdxPromessa") %>' CssClass="btn btn-sm btn-success"><i class="fa fa-arrow-up" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtNoneDx" Enabled="false" Visible='<%# !checkChgPrio(Eval("IdxMacchina").ToString(), Eval("Priorita").ToString(), -1) %>' CssClass="btn btn-sm btn-outline-success text-light"><i class="fa fa-arrow-up" aria-hidden="true"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Attiva" SortExpression="Attivabile" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkAttiva" Checked='<%# Eval("Attivabile") %>' Enabled="false" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbtDel" CommandArgument='<%# Eval("IdxPromessa") %>' OnClientClick="return confirm('Sicuro di voler procedere con eliminazione?');" OnClick="lbtDel_Click" ToolTip='<%# traduci("Delete") %>' Visible='<%# Eval("IdxODL").ToString()=="" || Eval("IdxODL").ToString()=="0" %>' CssClass="btn btn-sm btn-danger"><i class="fa fa-trash"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:HiddenField runat="server" ID="hfCodGruppo" />
|
||||
<asp:HiddenField runat="server" ID="hfCodPre" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByMaccArt" TypeName="MapoDb.DS_PlanTableAdapters.PromesseOUTTableAdapter" OnInserting="recuperaFooter" FilterExpression=" ( CodArticolo LIKE '%{0}%' OR DescArticolo LIKE '%{0}%' ) AND ( KeyRichiesta LIKE '{1}%' ) " OnInserted="ods_Updated" OnUpdated="ods_Updated" DeleteMethod="deleteQuery" OnDeleted="ods_Updated" UpdateMethod="updateQta">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
||||
<asp:ControlParameter ControlID="hfCodPre" Name="CodPre" PropertyName="Value" Type="String" />
|
||||
</FilterParameters>
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_idxPromessa" Type="Int32" />
|
||||
</DeleteParameters>
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="lblIdxMacc" Name="IdxMacchina" PropertyName="Text" Type="String" />
|
||||
<asp:ControlParameter ControlID="lblCodArt" Name="CodArticolo" PropertyName="Text" Type="String" />
|
||||
<asp:ControlParameter ControlID="ddlCodGruppo" Name="CodGruppo" PropertyName="SelectedValue" Type="String" />
|
||||
<asp:ControlParameter ControlID="chkUnassigned" Name="onlyFree" PropertyName="Checked" Type="Boolean" />
|
||||
</SelectParameters>
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="NumPezzi" Type="Int32" />
|
||||
<asp:Parameter Name="PzPallet" Type="Int32" />
|
||||
<asp:Parameter Name="Original_idxPromessa" Type="Int32" />
|
||||
</UpdateParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="row">
|
||||
<div class="col"></div>
|
||||
<div class="col text-center">
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
|
||||
<asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
mostra:
|
||||
<asp:TextBox runat="server" ID="txtPageSize" Text="10" Width="2em" OnTextChanged="txtPageSize_TextChanged" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
@@ -7,11 +9,691 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace MP_ADM.WebUserControls
|
||||
{
|
||||
public partial class cmp_PODL_OUT : System.Web.UI.UserControl
|
||||
public partial class cmp_PODL_OUT : BaseUserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
protected string _idxGridView;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Public Fields
|
||||
|
||||
/// <summary>
|
||||
/// Determina se sia solo readonly il controllo...
|
||||
/// </summary>
|
||||
public bool readOnly;
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// CodArt filtrato
|
||||
/// </summary>
|
||||
protected string CodArt
|
||||
{
|
||||
get
|
||||
{
|
||||
return lblCodArt.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
lblCodArt.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CodArt filtrato
|
||||
/// </summary>
|
||||
protected string DescArt
|
||||
{
|
||||
get
|
||||
{
|
||||
return lblDescArt.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
lblDescArt.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IdxMacchina filtrata
|
||||
/// </summary>
|
||||
protected string idxMacc
|
||||
{
|
||||
get
|
||||
{
|
||||
return lblIdxMacc.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
lblIdxMacc.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// idxOdl selezionato
|
||||
/// </summary>
|
||||
protected int idxPOdlSel
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(grView.SelectedValue);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nome filtrata
|
||||
/// </summary>
|
||||
protected string NomeMacc
|
||||
{
|
||||
get
|
||||
{
|
||||
return lblNomeMacc.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
lblNomeMacc.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nuovo num pz
|
||||
/// </summary>
|
||||
protected int numPz
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNewQta.Text.Trim());
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtNewQta.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nuovo num pz per pallet
|
||||
/// </summary>
|
||||
protected int pzPallet
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 1;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNewPzPallet.Text.Trim());
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo sia > 0...
|
||||
if (answ < 1)
|
||||
{
|
||||
answ = 1;
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtNewPzPallet.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gruppo selezionato
|
||||
/// </summary>
|
||||
public string CodGruppo
|
||||
{
|
||||
get
|
||||
{
|
||||
return ddlCodGruppo.SelectedValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
ddlCodGruppo.SelectedValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiave PRE selezione tipo richiesta ordine
|
||||
/// </summary>
|
||||
public string codOrdPre
|
||||
{
|
||||
get
|
||||
{
|
||||
return hfCodPre.Value.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
hfCodPre.Value = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Abilitazione modifica selettore fase
|
||||
/// </summary>
|
||||
public bool enableSelFase
|
||||
{
|
||||
get
|
||||
{
|
||||
return ddlCodGruppo.Enabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
ddlCodGruppo.Enabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// dimensione pagina
|
||||
/// </summary>
|
||||
public int pageSize
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 10;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtPageSize.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtPageSize.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// nuovo valore creato...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void mod_newOdl1_eh_nuovoValore(object sender, EventArgs e)
|
||||
{
|
||||
// nascondo controllo e mostro button
|
||||
mod_newPromessaODL.Visible = false;
|
||||
lbtNewPODL.Visible = true;
|
||||
// aggiorno!
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
private void showAddNewPODL()
|
||||
{
|
||||
// mostro controllo creazione ODL
|
||||
mod_newPromessaODL.Visible = true;
|
||||
divEditQta.Visible = false;
|
||||
lbtNewPODL.Visible = false;
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
private void updateCtrl()
|
||||
{
|
||||
divEditQta.Visible = false;
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorno Gridview
|
||||
/// </summary>
|
||||
private void updateGrView()
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
updateCtrl();
|
||||
}
|
||||
|
||||
protected void btnOk_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (idxPOdlSel > 0)
|
||||
{
|
||||
DataLayerObj.taPODL.updateQta(numPz, pzPallet, idxPOdlSel);
|
||||
}
|
||||
updateCtrl();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// reset della selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
protected void chkUnassigned_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// elenco colonne del datagrid
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected DataColumnCollection colonneObj()
|
||||
{
|
||||
MapoDb.DS_ProdTempi.ODLDataTable tabella = new MapoDb.DS_ProdTempi.ODLDataTable();
|
||||
DataColumnCollection colonne = tabella.Columns;
|
||||
return colonne;
|
||||
}
|
||||
|
||||
protected void ddlCodGruppo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in sessione selezione...
|
||||
memLayer.ML.setSessionVal("selFaseBCode", ddlCodGruppo.SelectedValue);
|
||||
}
|
||||
|
||||
protected void doUpdate()
|
||||
{
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gestione cambio selezione valore
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in session il valore selezionato...
|
||||
memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false);
|
||||
bool doClone = false;
|
||||
bool doEdit = false;
|
||||
// gestione buttons richieste
|
||||
string _comando = "";
|
||||
if (memLayer.ML.isInSessionObject("nextObjCommand"))
|
||||
{
|
||||
_comando = memLayer.ML.StringSessionObj("nextObjCommand");
|
||||
memLayer.ML.emptySessionVal("nextObjCommand");
|
||||
}
|
||||
switch (_comando)
|
||||
{
|
||||
case "Clona":
|
||||
doClone = true;
|
||||
break;
|
||||
|
||||
case "Edit":
|
||||
doEdit = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (doClone)
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxProm2Clone", grView.SelectedValue, false);
|
||||
showAddNewPODL();
|
||||
mod_newPromessaODL.doSelPODL();
|
||||
}
|
||||
else if (doEdit)
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxProm2Edit", grView.SelectedValue, false);
|
||||
showAddNewPODL();
|
||||
mod_newPromessaODL.doSelPODL();
|
||||
}
|
||||
else
|
||||
{
|
||||
// mostro edit quantità...
|
||||
divEditQta.Visible = true;
|
||||
lbtNewPODL.Visible = true;
|
||||
mod_newPromessaODL.Visible = false;
|
||||
var riga = DataLayerObj.taPODL.getByKey(idxPOdlSel)[0];
|
||||
numPz = riga.NumPezzi;
|
||||
pzPallet = riga.PzPallet;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// salvo comando
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbt_Command(object sender, CommandEventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// elimina commento
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton imgBtn = (LinkButton)sender;
|
||||
int IdxProm = 0;
|
||||
int.TryParse(imgBtn.CommandArgument, out IdxProm);
|
||||
DataLayerObj.taPODL.deleteQuery(IdxProm);
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// mostra creazione nuovo ODL
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtNewPODL_Click(object sender, EventArgs e)
|
||||
{
|
||||
showAddNewPODL();
|
||||
}
|
||||
|
||||
protected void lbtResArt_Click(object sender, EventArgs e)
|
||||
{
|
||||
CodArt = "";
|
||||
DescArt = "";
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
protected void lbtResMacc_Click(object sender, EventArgs e)
|
||||
{
|
||||
idxMacc = "";
|
||||
NomeMacc = "";
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezionato un condominio --> riporto selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSelArt_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
// imposto articolo, splittando
|
||||
string[] artData = lb.CommandArgument.Split('|');
|
||||
CodArt = artData[0];
|
||||
DescArt = artData[1];
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezionato un condominio --> riporto selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSelMacc_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
// imposto articolo, splittando
|
||||
string[] maccData = lb.CommandArgument.Split('|');
|
||||
idxMacc = maccData[0];
|
||||
NomeMacc = maccData[1];
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Richiesto abbassamento priorità = ANTICIPA
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkMoveDown_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
// imposto articolo, splittando
|
||||
int IdxPromessa = 0;
|
||||
int.TryParse(lb.CommandArgument, out IdxPromessa);
|
||||
// chiamo stored
|
||||
DataLayerObj.taPromOut.movePrio(IdxPromessa, -1);
|
||||
//update!
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Richiesto aumento priorità = RITARDA
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkMoveUp_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
// imposto articolo, splittando
|
||||
int IdxPromessa = 0;
|
||||
int.TryParse(lb.CommandArgument, out IdxPromessa);
|
||||
// chiamo stored
|
||||
DataLayerObj.taPromOut.movePrio(IdxPromessa, 1);
|
||||
//update!
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// svuoto da cache post update
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
raiseNewVal();
|
||||
}
|
||||
|
||||
/// inizializzazione valori di default
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
_idxGridView = "IdxODL";
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_newPromessaODL.Visible = false;
|
||||
grView.PageSize = pageSize;
|
||||
// se ho in sessione selezione la recupero...
|
||||
if (memLayer.ML.isInSessionObject("selFaseBCode") && enableSelFase)
|
||||
{
|
||||
ddlCodGruppo.SelectedValue = memLayer.ML.StringSessionObj("selFaseBCode");
|
||||
}
|
||||
}
|
||||
mod_newPromessaODL.eh_nuovoValore += new EventHandler(mod_newOdl1_eh_nuovoValore);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// recupera i dati di un nuovo record contenuti nel footer di un gridView;
|
||||
/// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
//recupero la riga footer...
|
||||
DataColumnCollection colonne = colonneObj();
|
||||
string nomeCol;
|
||||
string tipoColonna = "";
|
||||
foreach (DataColumn colonna in colonne)
|
||||
{
|
||||
nomeCol = colonna.ColumnName;
|
||||
// cerco un textbox o quello che sia...
|
||||
if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "textBox";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "dropDownList";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "checkBox";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "selAjax";
|
||||
}
|
||||
// in base al tipo salvo negli inputparameters dell'ODS
|
||||
switch (tipoColonna)
|
||||
{
|
||||
case "textBox":
|
||||
e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
|
||||
break;
|
||||
|
||||
case "dropDownList":
|
||||
e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
|
||||
break;
|
||||
|
||||
case "checkBox":
|
||||
e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
|
||||
break;
|
||||
//case "selAjax":
|
||||
// e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore;
|
||||
// break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tipoColonna = "";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// cambio dim pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtPageSize_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
grView.PageSize = pageSize;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se sia permesso cambio priorità (NON può andare a 0 ne oltre il max x macchina)
|
||||
/// </summary>
|
||||
/// <param name="IdxMacchina"></param>
|
||||
/// <param name="priorStr"></param>
|
||||
/// <param name="delta"></param>
|
||||
/// <returns></returns>
|
||||
public bool checkChgPrio(string IdxMacchina, string priorStr, int delta)
|
||||
{
|
||||
bool answ = false;
|
||||
int priorita = 0;
|
||||
int.TryParse(priorStr, out priorita);
|
||||
// calcolo i limiti priorità x macchina (0 --> max x macchina)... LPI/LPS liminte priorità inferiore / superiore
|
||||
int LPI = 1;
|
||||
int LPS = 1;
|
||||
var tabella = DataLayerObj.taPromOut.getMaxPrioByMacc(IdxMacchina, true);
|
||||
if (tabella.Rows.Count > 0)
|
||||
{
|
||||
LPS = tabella[0].Priorita;
|
||||
}
|
||||
// è ok SE sono ENTRO i 2 limiti
|
||||
answ = ((priorita + delta) >= LPI && (priorita + delta) <= LPS);
|
||||
//return
|
||||
return answ;
|
||||
}
|
||||
|
||||
public bool delEnabled(object _idxOdl)
|
||||
{
|
||||
bool answ = false;
|
||||
int idxOdl = 0;
|
||||
// controllo non sia già stata iniziata la produzione sennò non posso cancellare...
|
||||
try
|
||||
{
|
||||
idxOdl = Convert.ToInt32(_idxOdl);
|
||||
answ = (DataLayerObj.taODL.getByIdx(idxOdl, true).Count > 0);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// formatot url x stampa ODL
|
||||
/// </summary>
|
||||
/// <param name="idx"></param>
|
||||
/// <returns></returns>
|
||||
public string formattaUrlOdl(object idx)
|
||||
{
|
||||
string answ = String.Format(memLayer.ML.CRS("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx);
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView));
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
divEditQta.Visible = false;
|
||||
mod_newPromessaODL.Visible = false;
|
||||
lbtNewPODL.Visible = true;
|
||||
lblWarning.Visible = false;
|
||||
raiseReset();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
+221
-4
@@ -1,16 +1,233 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace MP_ADM.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class cmp_PODL_OUT
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlCodGruppo.
|
||||
/// </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 ddlCodGruppo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsCodGruppo.
|
||||
/// </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 odsCodGruppo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtResArt.
|
||||
/// </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.LinkButton lbtResArt;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblCodArt.
|
||||
/// </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.Label lblCodArt;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblDescArt.
|
||||
/// </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.Label lblDescArt;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtResMacc.
|
||||
/// </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.LinkButton lbtResMacc;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNomeMacc.
|
||||
/// </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.Label lblNomeMacc;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblIdxMacc.
|
||||
/// </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.Label lblIdxMacc;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo chkUnassigned.
|
||||
/// </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.CheckBox chkUnassigned;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblUnass.
|
||||
/// </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.Label lblUnass;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtNewPODL.
|
||||
/// </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.LinkButton lbtNewPODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_newPromessaODL.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MP_ADM.WebUserControls.mod_newPromessaODL mod_newPromessaODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divEditQta.
|
||||
/// </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 divEditQta;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtOk.
|
||||
/// </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.LinkButton lbtOk;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNewQta.
|
||||
/// </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.TextBox txtNewQta;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNewPzPallet.
|
||||
/// </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.TextBox txtNewPzPallet;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtCancel.
|
||||
/// </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.LinkButton lbtCancel;
|
||||
|
||||
/// <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 hfCodGruppo.
|
||||
/// </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 hfCodGruppo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfCodPre.
|
||||
/// </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 hfCodPre;
|
||||
|
||||
/// <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 lblNumRec.
|
||||
/// </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.Label lblNumRec;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblWarning.
|
||||
/// </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.Label lblWarning;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtPageSize.
|
||||
/// </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.TextBox txtPageSize;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,247 +0,0 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestPromODL_OUT.ascx.cs" Inherits="MP_ADM.WebUserControls.mod_gestPromODL_OUT" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_newPromessaODL.ascx" TagPrefix="uc1" TagName="mod_newPromessaODL" %>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h4>Filtri attivi</h4>
|
||||
</div>
|
||||
<div class="col">
|
||||
REPARTO
|
||||
<br />
|
||||
<asp:DropDownList runat="server" ID="ddlCodGruppo" DataSourceID="odsCodGruppo" DataTextField="DescrGruppo" DataValueField="CodGruppo" AutoPostBack="True" OnSelectedIndexChanged="ddlCodGruppo_SelectedIndexChanged" AppendDataBoundItems="true">
|
||||
<asp:ListItem Text="-- SHOW ALL --" Value=""></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="odsCodGruppo" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MapoDb.DS_applicazioneTableAdapters.AnagraficaGruppiTableAdapter" FilterExpression="TipoGruppo = 'FASE' AND SelEnabled = 1"></asp:ObjectDataSource>
|
||||
</div>
|
||||
<div class="col text-nowrap">
|
||||
<div class="input-group my-1 input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<asp:LinkButton runat="server" ID="lbtResArt" CssClass="btn btn-outline-dark" OnClick="lbtResArt_Click"><i class="fa fa-refresh"></i> <b>Articolo</b></asp:LinkButton>
|
||||
<asp:Label runat="server" ID="lblCodArt" CssClass="input-group-text" />
|
||||
<asp:Label runat="server" ID="lblDescArt" CssClass="input-group-text text-truncate" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="input-group my-1 input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<asp:LinkButton runat="server" ID="lbtResMacc" CssClass="btn btn-outline-dark" OnClick="lbtResMacc_Click"><i class="fa fa-refresh"></i> <b>Macchina</b></asp:LinkButton>
|
||||
<asp:Label runat="server" ID="lblNomeMacc" CssClass="input-group-text" />
|
||||
<asp:Label runat="server" ID="lblIdxMacc" CssClass="input-group-text" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<asp:CheckBox runat="server" ID="chkUnassigned" AutoPostBack="True" OnCheckedChanged="chkUnassigned_CheckedChanged" Checked="true" />
|
||||
</div>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="lblUnass" CssClass="input-group-text" Text="Mostra SOLO programmate" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-dark text-light" style="white-space: nowrap; padding: 2px;">
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-4">
|
||||
<asp:LinkButton ID="lbtNewPODL" runat="server" OnClick="lbtNewPODL_Click" CssClass="btn btn-block btn-primary text-light"><i class="fa fa-plus"></i> PROMESSA ODL <i class="fa fa-list-ol"></i></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-4"></div>
|
||||
</div>
|
||||
<uc1:mod_newPromessaODL runat="server" ID="mod_newPromessaODL" />
|
||||
</div>
|
||||
<div id="divEditQta" runat="server" visible="false" class="ctrSelRowStyle" style="white-space: nowrap; padding: 2px;">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<asp:LinkButton ID="lbtOk" runat="server" Text="Ok" OnClick="btnOk_Click" CssClass="btn btn-block btn-success" OnClientClick="return confirm('Sicuro di voler modificare la Promessa ODL?');"><i class="fa fa-plus"></i> Modifica </asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
# Pezzi Richiesti:
|
||||
<asp:TextBox runat="server" ID="txtNewQta" Width="6em" />
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
Pezzi Pallet:
|
||||
<asp:TextBox runat="server" ID="txtNewPzPallet" Width="6em" />
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<asp:LinkButton ID="lbtCancel" runat="server" Text="Annulla" OnClick="btnCancel_Click" CssClass="btn btn-block btn-warning"><i class="fa fa-ban"></i> Annulla</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound" PageSize="25"
|
||||
DataKeyNames="IdxPromessa" DataSourceID="ods" Width="100%">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
<SelectedRowStyle CssClass="ctrSelRowStyle" />
|
||||
<FooterStyle CssClass="ctrFooter" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<EmptyDataRowStyle CssClass="ctrRowStyle" />
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbtReset" CausesValidation="false" OnClick="btnReset_Click" ToolTip="Reset selezione" CssClass="btn btn-block btn-warning"><i class="fa fa-refresh"></i></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbtSel" CausesValidation="false" CommandName="Select" OnCommand="lbt_Command" CommandArgument="Edit" ToolTip="Modifica promessa" Visible='<%# Eval("IdxODL").ToString()=="" || Eval("IdxODL").ToString()=="0" %>' CssClass="btn btn-sm btn-info"><i class="fa fa-edit"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtClona" CausesValidation="false" CommandName="Select" OnCommand="lbt_Command" CommandArgument="Clona" ToolTip="Copia promessa" CssClass="btn btn-sm btn-primary" Visible='<%# !Eval("KeyRichiesta").ToString().StartsWith("KIT") %>'><i class="fa fa-clipboard"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="#" SortExpression="IdxPromessa">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtIdxPromessa" Text='<%# Eval("IdxPromessa") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="ODL" SortExpression="IdxOdl">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtIdxOdl" Text='<%# Eval("IdxOdl") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="CodArticolo" SortExpression="CodArticolo">
|
||||
<ItemTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<asp:LinkButton runat="server" ID="lbtSelArt" OnClick="lbtSelArt_Click" CausesValidation="False" CommandArgument='<%# Eval("CodArticolo")+"|"+Eval("DescArticolo") %>' CssClass="btn btn-sm btn-outline-dark p-1">
|
||||
<i class="fa fa-search"></i>
|
||||
<b><%# Eval("CodArticolo") %></b>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-6 text-right font-weight-bold">
|
||||
<asp:Label runat="server" ID="Label1" Text='<%# Eval("KeyRichiesta") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<asp:Label runat="server" ID="txtDescArticolo" Text='<%# Eval("DescArticolo") %>' />
|
||||
</div>
|
||||
<div class="col-7 text-right">
|
||||
<asp:Label runat="server" ID="Label2" Text='<%# Eval("Note") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: none; clear: both;">
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="codMacchina" SortExpression="CodMacchina">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbtSelMacc" OnClick="lbtSelMacc_Click" CausesValidation="False" CommandArgument='<%# Eval("IdxMacchina")+"|"+Eval("Nome") %>' CssClass="btn btn-sm btn-outline-dark p-1 btn-block">
|
||||
<i class="fa fa-search"></i>
|
||||
<b><%# Eval("Nome") %></b>
|
||||
<div><%# Eval("CodMacchina") %></div>
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="NumPezzi" SortExpression="NumPezzi" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtNumPezzi" Text='<%# Eval("NumPezzi") %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:Label runat="server" ID="txtNumPezzi" Text='<%# Bind("NumPezzi") %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TCAssegnato" SortExpression="TCAssegnato" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtTCAssegnato" Text='<%# Eval("TCAssegnato","{0:0.000}") %>' />
|
||||
<div class="small">
|
||||
<asp:Label runat="server" ID="txtTCAssMs" Text='<%# SteamWare.TempiCiclo.minSec(Eval("TCAssegnato")) %>' />
|
||||
(m:s)
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="PzPallet" SortExpression="PzPallet" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtPzPallet" Text='<%# Eval("PzPallet") %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Data" SortExpression="DueDate" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtDataInizio" Text='<%# Eval("DueDate") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ord" SortExpression="Priorita" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="txtPriorita" Text='<%# Eval("Priorita") %>' CssClass="font-weight-bold" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<div class="d-flex">
|
||||
<div class="mr-auto p-2">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton runat="server" ID="lbtNoneSx" Enabled="false" Visible='<%# !checkChgPrio(Eval("IdxMacchina").ToString(), Eval("Priorita").ToString(), 1) %>' CssClass="btn btn-sm btn-outline-success text-light"><i class="fa fa-arrow-down" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lnkMoveUp" Visible='<%# checkChgPrio(Eval("IdxMacchina").ToString(), Eval("Priorita").ToString(), 1) %>' ToolTip="Aumenta (ritarda)" OnClick="lnkMoveUp_Click" CausesValidation="False" CommandArgument='<%# Eval("IdxPromessa") %>' CssClass="btn btn-sm btn-success"><i class="fa fa-arrow-down" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lnkMoveDown" Visible='<%# checkChgPrio(Eval("IdxMacchina").ToString(), Eval("Priorita").ToString(), -1) %>' ToolTip="Diminuisci (anticipa)" OnClick="lnkMoveDown_Click" CausesValidation="False" CommandArgument='<%# Eval("IdxPromessa") %>' CssClass="btn btn-sm btn-success"><i class="fa fa-arrow-up" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtNoneDx" Enabled="false" Visible='<%# !checkChgPrio(Eval("IdxMacchina").ToString(), Eval("Priorita").ToString(), -1) %>' CssClass="btn btn-sm btn-outline-success text-light"><i class="fa fa-arrow-up" aria-hidden="true"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Attiva" SortExpression="Attivabile" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkAttiva" Checked='<%# Eval("Attivabile") %>' Enabled="false" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbtDel" CommandArgument='<%# Eval("IdxPromessa") %>' OnClientClick="return confirm('Sicuro di voler procedere con eliminazione?');" OnClick="lbtDel_Click" ToolTip='<%# traduci("Delete") %>' Visible='<%# Eval("IdxODL").ToString()=="" || Eval("IdxODL").ToString()=="0" %>' CssClass="btn btn-sm btn-danger"><i class="fa fa-trash"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:HiddenField runat="server" ID="hfCodGruppo" />
|
||||
<asp:HiddenField runat="server" ID="hfCodPre" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByMaccArt" TypeName="MapoDb.DS_PlanTableAdapters.PromesseOUTTableAdapter" OnInserting="recuperaFooter" FilterExpression=" ( CodArticolo LIKE '%{0}%' OR DescArticolo LIKE '%{0}%' ) AND ( KeyRichiesta LIKE '{1}%' ) " OnInserted="ods_Updated" OnUpdated="ods_Updated" DeleteMethod="deleteQuery" OnDeleted="ods_Updated" UpdateMethod="updateQta">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
||||
<asp:ControlParameter ControlID="hfCodPre" Name="CodPre" PropertyName="Value" Type="String" />
|
||||
</FilterParameters>
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_idxPromessa" Type="Int32" />
|
||||
</DeleteParameters>
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="lblIdxMacc" Name="IdxMacchina" PropertyName="Text" Type="String" />
|
||||
<asp:ControlParameter ControlID="lblCodArt" Name="CodArticolo" PropertyName="Text" Type="String" />
|
||||
<asp:ControlParameter ControlID="ddlCodGruppo" Name="CodGruppo" PropertyName="SelectedValue" Type="String" />
|
||||
<asp:ControlParameter ControlID="chkUnassigned" Name="onlyFree" PropertyName="Checked" Type="Boolean" />
|
||||
</SelectParameters>
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="NumPezzi" Type="Int32" />
|
||||
<asp:Parameter Name="PzPallet" Type="Int32" />
|
||||
<asp:Parameter Name="Original_idxPromessa" Type="Int32" />
|
||||
</UpdateParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="row">
|
||||
<div class="col"></div>
|
||||
<div class="col text-center">
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
|
||||
<asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
mostra:
|
||||
<asp:TextBox runat="server" ID="txtPageSize" Text="10" Width="2em" OnTextChanged="txtPageSize_TextChanged" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,684 +0,0 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MP_ADM.WebUserControls
|
||||
{
|
||||
public partial class mod_gestPromODL_OUT : BaseUserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Determina se sia solo readonly il controllo...
|
||||
/// </summary>
|
||||
public bool readOnly;
|
||||
|
||||
/// <summary>
|
||||
/// Chiave PRE selezione tipo richiesta ordine
|
||||
/// </summary>
|
||||
public string codOrdPre
|
||||
{
|
||||
get
|
||||
{
|
||||
return hfCodPre.Value.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
hfCodPre.Value = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// dimensione pagina
|
||||
/// </summary>
|
||||
public int pageSize
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 10;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtPageSize.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtPageSize.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Abilitazione modifica selettore fase
|
||||
/// </summary>
|
||||
public bool enableSelFase
|
||||
{
|
||||
get
|
||||
{
|
||||
return ddlCodGruppo.Enabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
ddlCodGruppo.Enabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gruppo selezionato
|
||||
/// </summary>
|
||||
public string CodGruppo
|
||||
{
|
||||
get
|
||||
{
|
||||
return ddlCodGruppo.SelectedValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
ddlCodGruppo.SelectedValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
#region area da NON modificare
|
||||
|
||||
#region area protected
|
||||
|
||||
protected string _idxGridView;
|
||||
|
||||
/// <summary>
|
||||
/// reset della selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// salvo comando
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbt_Command(object sender, CommandEventArgs e)
|
||||
{
|
||||
memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gestione cambio selezione valore
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in session il valore selezionato...
|
||||
memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false);
|
||||
bool doClone = false;
|
||||
bool doEdit = false;
|
||||
// gestione buttons richieste
|
||||
string _comando = "";
|
||||
if (memLayer.ML.isInSessionObject("nextObjCommand"))
|
||||
{
|
||||
_comando = memLayer.ML.StringSessionObj("nextObjCommand");
|
||||
memLayer.ML.emptySessionVal("nextObjCommand");
|
||||
}
|
||||
switch (_comando)
|
||||
{
|
||||
case "Clona":
|
||||
doClone = true;
|
||||
break;
|
||||
|
||||
case "Edit":
|
||||
doEdit = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (doClone)
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxProm2Clone", grView.SelectedValue, false);
|
||||
showAddNewPODL();
|
||||
mod_newPromessaODL.doSelPODL();
|
||||
}
|
||||
else if (doEdit)
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxProm2Edit", grView.SelectedValue, false);
|
||||
showAddNewPODL();
|
||||
mod_newPromessaODL.doSelPODL();
|
||||
}
|
||||
else
|
||||
{
|
||||
// mostro edit quantità...
|
||||
divEditQta.Visible = true;
|
||||
lbtNewPODL.Visible = true;
|
||||
mod_newPromessaODL.Visible = false;
|
||||
var riga = DataLayerObj.taPODL.getByKey(idxPOdlSel)[0];
|
||||
numPz = riga.NumPezzi;
|
||||
pzPallet = riga.PzPallet;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// recupera i dati di un nuovo record contenuti nel footer di un gridView;
|
||||
/// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
//recupero la riga footer...
|
||||
DataColumnCollection colonne = colonneObj();
|
||||
string nomeCol;
|
||||
string tipoColonna = "";
|
||||
foreach (DataColumn colonna in colonne)
|
||||
{
|
||||
nomeCol = colonna.ColumnName;
|
||||
// cerco un textbox o quello che sia...
|
||||
if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "textBox";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "dropDownList";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "checkBox";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "selAjax";
|
||||
}
|
||||
// in base al tipo salvo negli inputparameters dell'ODS
|
||||
switch (tipoColonna)
|
||||
{
|
||||
case "textBox":
|
||||
e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
|
||||
break;
|
||||
|
||||
case "dropDownList":
|
||||
e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
|
||||
break;
|
||||
|
||||
case "checkBox":
|
||||
e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
|
||||
break;
|
||||
//case "selAjax":
|
||||
// e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore;
|
||||
// break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tipoColonna = "";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// svuoto da cache post update
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
raiseNewVal();
|
||||
}
|
||||
|
||||
#endregion area protected
|
||||
|
||||
#region are public
|
||||
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView));
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
divEditQta.Visible = false;
|
||||
mod_newPromessaODL.Visible = false;
|
||||
lbtNewPODL.Visible = true;
|
||||
lblWarning.Visible = false;
|
||||
raiseReset();
|
||||
}
|
||||
|
||||
#endregion are public
|
||||
|
||||
#endregion area da NON modificare
|
||||
|
||||
#region area da modificare
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_newPromessaODL.Visible = false;
|
||||
grView.PageSize = pageSize;
|
||||
// se ho in sessione selezione la recupero...
|
||||
if (memLayer.ML.isInSessionObject("selFaseBCode") && enableSelFase)
|
||||
{
|
||||
ddlCodGruppo.SelectedValue = memLayer.ML.StringSessionObj("selFaseBCode");
|
||||
}
|
||||
}
|
||||
mod_newPromessaODL.eh_nuovoValore += new EventHandler(mod_newOdl1_eh_nuovoValore);
|
||||
}
|
||||
|
||||
/// inizializzazione valori di default
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
_idxGridView = "IdxODL";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// nuovo valore creato...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void mod_newOdl1_eh_nuovoValore(object sender, EventArgs e)
|
||||
{
|
||||
// nascondo controllo e mostro button
|
||||
mod_newPromessaODL.Visible = false;
|
||||
lbtNewPODL.Visible = true;
|
||||
// aggiorno!
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// elenco colonne del datagrid
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected DataColumnCollection colonneObj()
|
||||
{
|
||||
MapoDb.DS_ProdTempi.ODLDataTable tabella = new MapoDb.DS_ProdTempi.ODLDataTable();
|
||||
DataColumnCollection colonne = tabella.Columns;
|
||||
return colonne;
|
||||
}
|
||||
|
||||
public bool delEnabled(object _idxOdl)
|
||||
{
|
||||
bool answ = false;
|
||||
int idxOdl = 0;
|
||||
// controllo non sia già stata iniziata la produzione sennò non posso cancellare...
|
||||
try
|
||||
{
|
||||
idxOdl = Convert.ToInt32(_idxOdl);
|
||||
answ = (DataLayerObj.taODL.getByIdx(idxOdl, true).Count > 0);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// mostra creazione nuovo ODL
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtNewPODL_Click(object sender, EventArgs e)
|
||||
{
|
||||
showAddNewPODL();
|
||||
}
|
||||
|
||||
private void showAddNewPODL()
|
||||
{
|
||||
// mostro controllo creazione ODL
|
||||
mod_newPromessaODL.Visible = true;
|
||||
divEditQta.Visible = false;
|
||||
lbtNewPODL.Visible = false;
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// formatot url x stampa ODL
|
||||
/// </summary>
|
||||
/// <param name="idx"></param>
|
||||
/// <returns></returns>
|
||||
public string formattaUrlOdl(object idx)
|
||||
{
|
||||
string answ = String.Format(memLayer.ML.CRS("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx);
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// cambio dim pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtPageSize_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
grView.PageSize = pageSize;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// elimina commento
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton imgBtn = (LinkButton)sender;
|
||||
int IdxProm = 0;
|
||||
int.TryParse(imgBtn.CommandArgument, out IdxProm);
|
||||
DataLayerObj.taPODL.deleteQuery(IdxProm);
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
protected void doUpdate()
|
||||
{
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
#endregion area da modificare
|
||||
|
||||
protected void btnOk_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (idxPOdlSel > 0)
|
||||
{
|
||||
DataLayerObj.taPODL.updateQta(numPz, pzPallet, idxPOdlSel);
|
||||
}
|
||||
updateCtrl();
|
||||
}
|
||||
|
||||
private void updateCtrl()
|
||||
{
|
||||
divEditQta.Visible = false;
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// idxOdl selezionato
|
||||
/// </summary>
|
||||
protected int idxPOdlSel
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(grView.SelectedValue);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nuovo num pz
|
||||
/// </summary>
|
||||
protected int numPz
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNewQta.Text.Trim());
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtNewQta.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nuovo num pz per pallet
|
||||
/// </summary>
|
||||
protected int pzPallet
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 1;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNewPzPallet.Text.Trim());
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo sia > 0...
|
||||
if (answ < 1)
|
||||
{
|
||||
answ = 1;
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtNewPzPallet.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
updateCtrl();
|
||||
}
|
||||
|
||||
protected void chkUnassigned_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorno Gridview
|
||||
/// </summary>
|
||||
private void updateGrView()
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IdxMacchina filtrata
|
||||
/// </summary>
|
||||
protected string idxMacc
|
||||
{
|
||||
get
|
||||
{
|
||||
return lblIdxMacc.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
lblIdxMacc.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nome filtrata
|
||||
/// </summary>
|
||||
protected string NomeMacc
|
||||
{
|
||||
get
|
||||
{
|
||||
return lblNomeMacc.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
lblNomeMacc.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CodArt filtrato
|
||||
/// </summary>
|
||||
protected string CodArt
|
||||
{
|
||||
get
|
||||
{
|
||||
return lblCodArt.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
lblCodArt.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CodArt filtrato
|
||||
/// </summary>
|
||||
protected string DescArt
|
||||
{
|
||||
get
|
||||
{
|
||||
return lblDescArt.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
lblDescArt.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezionato un condominio --> riporto selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSelArt_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
// imposto articolo, splittando
|
||||
string[] artData = lb.CommandArgument.Split('|');
|
||||
CodArt = artData[0];
|
||||
DescArt = artData[1];
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezionato un condominio --> riporto selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSelMacc_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
// imposto articolo, splittando
|
||||
string[] maccData = lb.CommandArgument.Split('|');
|
||||
idxMacc = maccData[0];
|
||||
NomeMacc = maccData[1];
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Richiesto abbassamento priorità = ANTICIPA
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkMoveDown_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
// imposto articolo, splittando
|
||||
int IdxPromessa = 0;
|
||||
int.TryParse(lb.CommandArgument, out IdxPromessa);
|
||||
// chiamo stored
|
||||
DataLayerObj.taPromOut.movePrio(IdxPromessa, -1);
|
||||
//update!
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Richiesto aumento priorità = RITARDA
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkMoveUp_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lb = (LinkButton)sender;
|
||||
// imposto articolo, splittando
|
||||
int IdxPromessa = 0;
|
||||
int.TryParse(lb.CommandArgument, out IdxPromessa);
|
||||
// chiamo stored
|
||||
DataLayerObj.taPromOut.movePrio(IdxPromessa, 1);
|
||||
//update!
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
protected void lbtResArt_Click(object sender, EventArgs e)
|
||||
{
|
||||
CodArt = "";
|
||||
DescArt = "";
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
protected void lbtResMacc_Click(object sender, EventArgs e)
|
||||
{
|
||||
idxMacc = "";
|
||||
NomeMacc = "";
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
protected void ddlCodGruppo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in sessione selezione...
|
||||
memLayer.ML.setSessionVal("selFaseBCode", ddlCodGruppo.SelectedValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se sia permesso cambio priorità (NON può andare a 0 ne oltre il max x macchina)
|
||||
/// </summary>
|
||||
/// <param name="IdxMacchina"></param>
|
||||
/// <param name="priorStr"></param>
|
||||
/// <param name="delta"></param>
|
||||
/// <returns></returns>
|
||||
public bool checkChgPrio(string IdxMacchina, string priorStr, int delta)
|
||||
{
|
||||
bool answ = false;
|
||||
int priorita = 0;
|
||||
int.TryParse(priorStr, out priorita);
|
||||
// calcolo i limiti priorità x macchina (0 --> max x macchina)... LPI/LPS liminte priorità inferiore / superiore
|
||||
int LPI = 1;
|
||||
int LPS = 1;
|
||||
var tabella = DataLayerObj.taPromOut.getMaxPrioByMacc(IdxMacchina, true);
|
||||
if (tabella.Rows.Count > 0)
|
||||
{
|
||||
LPS = tabella[0].Priorita;
|
||||
}
|
||||
// è ok SE sono ENTRO i 2 limiti
|
||||
answ = ((priorita + delta) >= LPI && (priorita + delta) <= LPS);
|
||||
//return
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,231 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MP_ADM.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_gestPromODL_OUT {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlCodGruppo.
|
||||
/// </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 ddlCodGruppo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsCodGruppo.
|
||||
/// </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 odsCodGruppo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtResArt.
|
||||
/// </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.LinkButton lbtResArt;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblCodArt.
|
||||
/// </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.Label lblCodArt;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblDescArt.
|
||||
/// </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.Label lblDescArt;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtResMacc.
|
||||
/// </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.LinkButton lbtResMacc;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNomeMacc.
|
||||
/// </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.Label lblNomeMacc;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblIdxMacc.
|
||||
/// </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.Label lblIdxMacc;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo chkUnassigned.
|
||||
/// </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.CheckBox chkUnassigned;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblUnass.
|
||||
/// </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.Label lblUnass;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtNewPODL.
|
||||
/// </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.LinkButton lbtNewPODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_newPromessaODL.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MP_ADM.WebUserControls.mod_newPromessaODL mod_newPromessaODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divEditQta.
|
||||
/// </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 divEditQta;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtOk.
|
||||
/// </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.LinkButton lbtOk;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNewQta.
|
||||
/// </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.TextBox txtNewQta;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNewPzPallet.
|
||||
/// </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.TextBox txtNewPzPallet;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtCancel.
|
||||
/// </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.LinkButton lbtCancel;
|
||||
|
||||
/// <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 hfCodGruppo.
|
||||
/// </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 hfCodGruppo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfCodPre.
|
||||
/// </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 hfCodPre;
|
||||
|
||||
/// <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 lblNumRec.
|
||||
/// </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.Label lblNumRec;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblWarning.
|
||||
/// </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.Label lblWarning;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtPageSize.
|
||||
/// </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.TextBox txtPageSize;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user