223 lines
12 KiB
Plaintext
223 lines
12 KiB
Plaintext
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestKIT.ascx.cs" Inherits="MP_ADM.WebUserControls.mod_gestKIT" %>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="card-deck">
|
|
<asp:HiddenField runat="server" ID="hlCodKitTemp" />
|
|
<div class="card">
|
|
<div class="card-header bg-primary text-light">
|
|
<h4>Composizione KIT</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<b>Ordini selezionati:</b>
|
|
<asp:GridView runat="server" ID="grViewWSK" DataSourceID="odsWSK" AutoGenerateColumns="False" DataKeyNames="KeyFilt,CodOrd" CssClass="table table-sm table-striped">
|
|
<EmptyDataTemplate>
|
|
Nessun Ordine caricato
|
|
</EmptyDataTemplate>
|
|
<Columns>
|
|
<asp:BoundField DataField="CodOrd" HeaderText="OPR" ReadOnly="True" SortExpression="CodOrd" ItemStyle-CssClass="text-nowrap" />
|
|
<asp:BoundField DataField="CodArt" HeaderText="Cod.Art" SortExpression="CodArt" ItemStyle-CssClass="font-weight-bold" />
|
|
<asp:BoundField DataField="DescArt" HeaderText="Desc.Art" SortExpression="DescArt" ItemStyle-CssClass="small" />
|
|
<asp:BoundField DataField="Qta" HeaderText="Qta" SortExpression="Qta" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
<asp:ObjectDataSource runat="server" ID="odsWSK" OldValuesParameterFormatString="original_{0}" SelectMethod="getByFilt" TypeName="MapoDb.DS_IntServTableAdapters.WipSetupKitTableAdapter">
|
|
<SelectParameters>
|
|
<asp:ControlParameter ControlID="hlCodKitTemp" Name="KeyFilt" PropertyName="Value" Type="String" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
</div>
|
|
<div class="card-footer py-1 bg-primary text-light">
|
|
Cod temp: <b><%: hlCodKitTemp.Value %></b>
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header bg-success text-light">
|
|
<h4>Verifica KIT</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<b>Elenco KIT compatibili</b>
|
|
<asp:GridView runat="server" ID="grViewKitSel" DataSourceID="odsKitSel" AutoGenerateColumns="False" CssClass="table table-striped table-sm" DataKeyNames="CodArtParent" OnSelectedIndexChanged="grViewKitSel_SelectedIndexChanged">
|
|
<EmptyDataTemplate>
|
|
Nessun KIT trovato
|
|
</EmptyDataTemplate>
|
|
<Columns>
|
|
<asp:BoundField DataField="CodArtParent" HeaderText="Codice KIT" SortExpression="CodArtParent" />
|
|
<asp:BoundField DataField="TotalScore" HeaderText="Coerenza KIT" ReadOnly="True" SortExpression="TotalScore" DataFormatString="{0:P2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:TemplateField HeaderText="Azione">
|
|
<ItemTemplate>
|
|
<asp:LinkButton runat="server" ID="lbtCreatePODL" Visible='<%# Eval("TotalScore","{0:P0}") == "100%" %>' CssClass="btn btn-success btn-sm" ToolTip="Crea ordine KIT" CommandName="select">
|
|
<i class="fa fa-plus-square"></i> Prom.ODL <i class="fa fa-plus-square"></i>
|
|
</asp:LinkButton>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
<asp:ObjectDataSource runat="server" ID="odsKitSel" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MapoDb.DS_IntServTableAdapters.TKS_SearchTableAdapter">
|
|
<SelectParameters>
|
|
<asp:ControlParameter ControlID="hlCodKitTemp" Name="KeyFilt" PropertyName="Value" Type="String" />
|
|
<asp:Parameter DefaultValue="2" Name="maxResult" Type="Int32" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
<div runat="server" id="divPODL">
|
|
<b>Elenco promesse per KIT (100%)</b>
|
|
<asp:GridView runat="server" ID="grViewPODL" DataSourceID="odsPODL" CssClass="table table-sm table-striped" AutoGenerateColumns="False" DataKeyNames="idxPromessa">
|
|
<Columns>
|
|
<asp:BoundField DataField="idxPromessa" HeaderText="#" InsertVisible="False" ReadOnly="True" SortExpression="idxPromessa" />
|
|
<asp:TemplateField HeaderText="Cod.KIT" SortExpression="KeyRichiesta">
|
|
<ItemTemplate>
|
|
<div style="float: left;">
|
|
<b>
|
|
<asp:Label runat="server" ID="txtCodArticolo" Text='<%# Eval("CodArticolo") %>' /></b>
|
|
</div>
|
|
<div style="float: right; font-size: 0.8em;">
|
|
<asp:Label runat="server" ID="Label3" Text='<%# Eval("KeyRichiesta") %>' />
|
|
</div>
|
|
<div style="float: none; clear: both;">
|
|
<asp:Label runat="server" ID="txtDescArticolo" Text='<%# Eval("DescArticolo") %>' />
|
|
</div>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Nome" SortExpression="Nome">
|
|
<ItemTemplate>
|
|
<b>
|
|
<asp:Label runat="server" ID="txtCodMacchina" Text='<%# Eval("CodMacchina") %>' /></b>
|
|
<br />
|
|
<asp:Label runat="server" ID="txtNome" Text='<%# Eval("Nome") %>' />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:BoundField DataField="NumPezzi" HeaderText="NumPezzi" SortExpression="NumPezzi" />
|
|
</Columns>
|
|
<EmptyDataTemplate>
|
|
Nessun Record (P.ODL da eseguire)
|
|
</EmptyDataTemplate>
|
|
</asp:GridView>
|
|
<asp:ObjectDataSource ID="odsPODL" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByCodArt" TypeName="MapoDb.DS_ProdTempiTableAdapters.PromesseODLTableAdapter">
|
|
<SelectParameters>
|
|
<asp:ControlParameter ControlID="hfCodArtKit" DefaultValue="###" Name="CodArticolo" PropertyName="Value" Type="String" />
|
|
<asp:Parameter DefaultValue="true" Name="onlyAvail" Type="Boolean" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
<asp:HiddenField runat="server" ID="hfCodArtKit" />
|
|
</div>
|
|
</div>
|
|
<div class="card-footer py-1 bg-success text-light">
|
|
Abilitato se = 100%
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header bg-danger text-light">
|
|
<h4>KIT e Promesse</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<b>Elenco KIT associati ad ordini</b>
|
|
<asp:GridView runat="server" ID="grViewIstanzeKIT" DataSourceID="odsIstanzeKIT" AutoGenerateColumns="False" DataKeyNames="KeyKit,KeyExtOrd" CssClass="table table-sm table-striped">
|
|
<EmptyDataTemplate>
|
|
Nessun Record (Ordini associati a KIT)
|
|
</EmptyDataTemplate>
|
|
<Columns>
|
|
<asp:BoundField DataField="KeyKit" HeaderText="OPR.KIT" ReadOnly="True" SortExpression="KeyKit" ItemStyle-CssClass="font-weight-bold" />
|
|
<asp:BoundField DataField="CodArtParent" HeaderText="Cod.KIT" SortExpression="CodArtParent" />
|
|
<asp:BoundField DataField="KeyExtOrd" HeaderText="OPR" ReadOnly="True" SortExpression="KeyExtOrd" ItemStyle-CssClass="text-danger" />
|
|
<asp:BoundField DataField="CodArtChild" HeaderText="Cod.Art" SortExpression="CodArtChild" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
<asp:ObjectDataSource ID="odsIstanzeKIT" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByExtOrd" TypeName="MapoDb.DS_IntServTableAdapters.IstanzeKITTableAdapter">
|
|
<SelectParameters>
|
|
<asp:ControlParameter ControlID="hlCodKitTemp" Name="KeyFilt" PropertyName="Value" Type="String" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
</div>
|
|
<div class="card-footer py-1 bg-danger text-light">
|
|
Attenzione: non associare OPR a più KIT!
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<%--<div class="col">
|
|
<ul>
|
|
<li><b>esempio KIT: 8060A00</b></li>
|
|
<li>OPR18-20381</li>
|
|
<li>OPR18-21855</li>
|
|
<li>OPR18-21856</li>
|
|
<li>OPR18-21857</li>
|
|
<li>OPR18-22974 (NON VA BENE A313)</li>
|
|
</ul>
|
|
</div>--%>
|
|
<%-- <div class="col">
|
|
<ul>
|
|
<li><b>esempio KIT: 8010A00</b></li>
|
|
<li>OPR18-22022</li>
|
|
<li>OPR18-22032</li>
|
|
</ul>
|
|
<br />
|
|
<ul>
|
|
<li><b>esempio KIT: 8665A00</b></li>
|
|
<li>OPR18-21255</li>
|
|
<li>OPR18-21259</li>
|
|
<li>OPR18-21268</li>
|
|
<li>OPR18-21262</li>
|
|
</ul>
|
|
</div>--%>
|
|
<div class="col-4">
|
|
<asp:HiddenField ID="hlLastInput" runat="server" />
|
|
<asp:Label runat="server" ID="lblOut" CssClass="text-danger" />
|
|
</div>
|
|
</div>
|
|
|
|
<%--TESTDB: MoonPro
|
|
select * from Config where chiave like 'regexp%'
|
|
|
|
TESTDB: IS_Colcom
|
|
|
|
exec stp_IstanzeKit_Search 'K1800000001', '', '', ''
|
|
exec stp_IstanzeKit_Search '', 'OPR-123456', '', ''
|
|
exec stp_IstanzeKit_Search '', '', 'A101000', ''
|
|
exec stp_IstanzeKit_Search '', '', '', 'A101001'
|
|
|
|
exec stp_TemplateKit_Search '8060A00',''
|
|
exec stp_TemplateKit_Search '','8060A313'
|
|
|
|
select * from TransitoDati
|
|
|
|
select * from IstanzeKIT
|
|
|
|
select top 1 * from TransitoDati where ValueOUT LIKE '%8060A0%'
|
|
select top 1 * from TransitoDati where ValueOUT LIKE '%8060A1%'
|
|
select top 1 * from TransitoDati where ValueOUT LIKE '%8060A2%'
|
|
select top 1 * from TransitoDati where ValueOUT LIKE '%8060A313%'
|
|
|
|
-- esempio KIT: 8060A00
|
|
-- OPR18-20381
|
|
-- OPR18-21855
|
|
-- OPR18-21856
|
|
-- OPR18-22974
|
|
|
|
select * from TemplateKIT order by CodArtChild DESC
|
|
exec stp_TKS_Search '1010A1,1010A2,'
|
|
exec stp_TKS_Search '8060A0,'
|
|
exec stp_TKS_Search '8060A1,'
|
|
exec stp_TKS_Search '8060A2,'
|
|
exec stp_TKS_Search '8060A313,'
|
|
exec stp_TKS_Search '8060A0,8060A1,8060A2,8060A313,'
|
|
|
|
exec stp_TKS_Search 'V10616D,'
|
|
exec stp_TKS_Search 'M06606,'
|
|
|
|
exec stp_TemplateKit_Search '1050A00',''
|
|
exec stp_TemplateKit_Search '1040A00',''
|
|
exec stp_TemplateKit_Search '6606A00',''
|
|
exec stp_TemplateKit_Search '6610A00',''
|
|
|
|
--truncate table IstanzeKIT
|
|
--truncate table Counters
|
|
|
|
select * from IstanzeKIT
|
|
|
|
exec stp_IstKit_byKeyExtOrd 'OPR-123321,OPR-123456,'
|
|
|
|
exec stp_IstKit_getKey
|
|
|
|
--%> |