223 lines
17 KiB
Plaintext
223 lines
17 KiB
Plaintext
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_OffersArchive.ascx.cs" Inherits="C2P.WebUserControls.mod_OffersArchive" %>
|
|
<%@ Register Src="mod_autocomplete.ascx" TagPrefix="uc1" TagName="mod_autocomplete" %>
|
|
<%@ Register Src="mod_selPeriodo.ascx" TagName="mod_selPeriodo" TagPrefix="uc2" %>
|
|
<%@ Register Src="mod_slider.ascx" TagName="mod_slider" TagPrefix="uc3" %>
|
|
<%@ Register Src="mod_range.ascx" TagName="mod_range" TagPrefix="uc4" %>
|
|
<%@ Register Src="mod_imgPreview.ascx" TagPrefix="uc1" TagName="mod_imgPreview" %>
|
|
|
|
|
|
<%if (false)
|
|
{ %>
|
|
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
|
|
<%} %>
|
|
<script>
|
|
function confermaDel() {
|
|
<%=SteamWare.jsUtils.getCBE("confermaDel") %>
|
|
}
|
|
</script>
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title"><%: traduci("SearchFilters") %></h3>
|
|
<br />
|
|
<asp:TextBox ID="txtSearch" runat="server" CssClass="form-control input-sm search-query" placeholder="Search" AutoPostBack="true" OnTextChanged="txtSearch_TextChanged" TextMode="Search" />
|
|
</div>
|
|
<div class="panel-body">
|
|
<div class="row" style="min-height: 3.3em;">
|
|
<div class="col-sm-12">
|
|
<asp:RadioButtonList ID="rblQState" runat="server" AutoPostBack="True" class="btn-group btn-group-justified" RepeatDirection="Horizontal" RepeatLayout="Flow" OnSelectedIndexChanged="rblQState_SelectedIndexChanged" DataSourceID="ods_rblQState" DataTextField="label" DataValueField="value" CssClass="btn-group btn-group-justified" OnPreRender="rblQState_PreRender">
|
|
</asp:RadioButtonList>
|
|
<asp:ObjectDataSource ID="ods_rblQState" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByTableFieldLang" TypeName="C2P_Data.DS_UtilityTableAdapters.v_selListValTableAdapter">
|
|
<SelectParameters>
|
|
<asp:Parameter DefaultValue="OffersArchive" Name="TableName" Type="String" />
|
|
<asp:Parameter DefaultValue="RblQState" Name="FieldName" Type="String" />
|
|
<asp:SessionParameter SessionField="Lingua" DefaultValue="IT" Name="Lingua" Type="String" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
</div>
|
|
</div>
|
|
<div class="row" style="min-height: 3.3em;">
|
|
<div class="col-sm-12">
|
|
<asp:RadioButtonList ID="rblTipo" runat="server" AutoPostBack="True" class="btn-group btn-group-justified" RepeatDirection="Horizontal" RepeatLayout="Flow" OnSelectedIndexChanged="rblTipo_SelectedIndexChanged">
|
|
<asp:ListItem Value="*" Text="All" Selected="True" class="btn btn-default btn-xs"></asp:ListItem>
|
|
<asp:ListItem Value="Q" Text="Quotes" class="btn btn-default btn-xs"></asp:ListItem>
|
|
<asp:ListItem Value="S" Text="Simulation" class="btn btn-default btn-xs"></asp:ListItem>
|
|
</asp:RadioButtonList>
|
|
</div>
|
|
</div>
|
|
<div class="row" style="min-height: 3.3em;">
|
|
<div class="col-sm-12">
|
|
<uc2:mod_selPeriodo ID="mod_selPeriodo1" runat="server" autoUpdate="true" />
|
|
</div>
|
|
</div>
|
|
<div class="row" style="min-height: 3.3em;">
|
|
<div class="col-sm-12">
|
|
<uc1:mod_autocomplete runat="server" ID="acClient" contextKey="c" minCharAutocomplete="2" showKey="false" ServicePath='<%# serviceUrl("Clients") %>' placeholder="Type to Search - Clients" labelRicercaTrad="acCliente" labelWidth="85px" />
|
|
</div>
|
|
</div>
|
|
<div class="row" style="min-height: 3.3em;">
|
|
<div class="col-sm-12">
|
|
<uc1:mod_autocomplete runat="server" ID="acMaterial" contextKey="l" minCharAutocomplete="2" showKey="false" ServicePath='<%# serviceUrl("RawMat") %>' placeholder="Type to Search - Alloy" labelRicercaTrad="acLega" labelWidth="85px" />
|
|
</div>
|
|
</div>
|
|
<div class="row" style="min-height: 3.3em;">
|
|
<div class="col-sm-12">
|
|
<uc1:mod_autocomplete runat="server" ID="acItem" contextKey="a" minCharAutocomplete="2" showKey="false" ServicePath='<%# serviceUrl("Items") %>' placeholder="Type to Search - Items" labelRicercaTrad="acArticolo" labelWidth="85px" />
|
|
</div>
|
|
</div>
|
|
<%--<div class="row" style="min-height: 3.3em;">
|
|
<div class="col-sm-12">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-addon">
|
|
<asp:Label runat="server" ID="lblField"><%: traduci("NumOfferta") %></asp:Label>
|
|
</span>
|
|
<asp:TextBox runat="server" ID="txtNumOff" CssClass="searchinput form-control" AutoPostBack="True" TextMode="SingleLine" AutoCompleteType="Search" />
|
|
<span class="input-group-addon">
|
|
<asp:LinkButton runat="server" ID="lnkResetNumOff" Text="X" type="button" Font-Size="0.8em" />
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>--%>
|
|
<div class="row" style="min-height: 3.3em; font-size: 0.8em;">
|
|
<div class="col-sm-12">
|
|
<uc4:mod_range ID="mod_range1" runat="server" minVal="0" maxVal="5000" />
|
|
</div>
|
|
</div>
|
|
<div class="row" style="min-height: 3.3em;">
|
|
<br />
|
|
<div class="col-sm-6">
|
|
<asp:LinkButton runat="server" ID="lbtSearch" CssClass="btn btn-primary" Width="100%" OnClick="lbtSearch_Click"><%: traduci("Search") %></asp:LinkButton>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<asp:LinkButton runat="server" ID="lbtReset" CssClass="btn btn-warning" Width="100%" OnClick="lbtReset_Click"><%: traduci("Reset") %></asp:LinkButton>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-8">
|
|
<div class="row" style="min-height: 3.1em;">
|
|
<div class="col-sm-3" style="padding: 0px 4px;">
|
|
<asp:LinkButton runat="server" Width="100%" ID="lbOpen" CssClass="btn btn-success" OnClick="lbOpen_Click"><i class="fa fa-search"></i> <%:traduci("Open") %></asp:LinkButton>
|
|
</div>
|
|
<div class="col-sm-2" style="padding: 0px 4px;">
|
|
<asp:LinkButton runat="server" Width="100%" ID="lbDuplicate" CssClass="btn btn-primary" OnClick="lbDuplicate_Click"><i class="fa fa-code-fork"></i> <%:traduci("Duplicate") %></asp:LinkButton>
|
|
</div>
|
|
<div class="col-sm-2" style="padding: 0px 4px;">
|
|
<asp:LinkButton runat="server" Width="100%" ID="lbDelete" CssClass="btn btn-danger" OnClick="lbDelete_Click" OnClientClick="if (!confermaDel()) return false;"><i class="fa fa-trash-o"></i> <%:traduci("Delete") %></asp:LinkButton>
|
|
</div>
|
|
<div class="col-sm-2" style="padding: 0px 4px;" hidden="true">
|
|
<asp:LinkButton runat="server" Width="100%" ID="lbSimulate" CssClass="btn btn-warning" OnClick="lbSimulate_Click"><i class="fa fa-flask"></i> <%:traduci("Simulate") %></asp:LinkButton>
|
|
</div>
|
|
<div class="col-sm-2 col-sm-offset-1" style="padding: 0px 4px;">
|
|
<asp:LinkButton runat="server" Width="100%" ID="lbPrint" CssClass="btn btn-info" OnClick="lbPrint_Click"><i class="fa fa-print"></i> <%:traduci("Print") %></asp:LinkButton>
|
|
</div>
|
|
<div class="col-sm-1" style="padding: 0px 4px;">
|
|
<asp:DropDownList runat="server" ID="ddlTypeDoc" CssClass="btn btn-default dropdown-toggle" Font-Size="X-Small" DataSourceID="odsTipoDoc" DataTextField="label" datal="value" DataValueField="value">
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="table-responsive">
|
|
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataSourceID="odsQuotes" DataKeyNames="QuoteType,CodQuote,QuoteRev" OnSelectedIndexChanged="grView_SelectedIndexChanged" CellPadding="4" ForeColor="#333333" GridLines="None" CssClass="table table-striped table-bordered table-hover table-condensed" AllowPaging="True" AllowSorting="True" OnSorted="grView_Sorted">
|
|
<EmptyDataTemplate>
|
|
<%# traduci("NoRecords") %>
|
|
</EmptyDataTemplate>
|
|
<PagerSettings Mode="NumericFirstLast" />
|
|
<PagerStyle CssClass="paginatore" HorizontalAlign="Center" Font-Bold="true" Wrap="true" Font-Size="1.2em" Width="100%" />
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="">
|
|
<ItemTemplate>
|
|
<uc1:mod_imgPreview runat="server" ID="mod_imgPreview" imgSize="32" CodItem='<%# Eval("CodItem") %>' showLinkProfili="false" />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Offer #" SortExpression="CodQuote">
|
|
<ItemTemplate>
|
|
<b>
|
|
<asp:Label ID="Label8" runat="server" Text='<%# Bind("QuoteType") %>' />|</b><asp:Label ID="Label6" runat="server" Text='<%# Bind("CodQuote") %>' />.<span style="font-size: 0.8em;"><asp:Label ID="Label7" runat="server" Text='<%# Bind("QuoteRev") %>' /></span>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="QS" SortExpression="idxQState" ItemStyle-Wrap="false">
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label5" runat="server" Text='<%# traduci("ST" + Eval("idxQState")) %>'></asp:Label>
|
|
/
|
|
<asp:Label ID="lblRes" runat="server" Text='<%# Bind("OfferResult") %>' Font-Bold="true" />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:BoundField DataField="ClientName" HeaderText="Customer" SortExpression="ClientName" ReadOnly="true" />
|
|
<asp:BoundField DataField="RawMat" HeaderText="Alloy" SortExpression="RawMat" ReadOnly="true" />
|
|
<asp:BoundField DataField="CodItem" HeaderText="Item" SortExpression="CodItem" ReadOnly="true" />
|
|
<asp:BoundField DataField="BatchQty" HeaderText="Qty" SortExpression="BatchQty" ReadOnly="true" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N0}" HtmlEncode="false">
|
|
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
|
</asp:BoundField>
|
|
<asp:TemplateField HeaderText="AlloyCost" SortExpression="RawMatFullCost" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false">
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label1" runat="server" Text='<%# Eval("RawMatFullCost", "{0:C3}") %>' />
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="RockBott" SortExpression="MinPrice" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false">
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label3" runat="server" Text='<%# Eval("MinPrice", "{0:C3}") %>' Visible='<%# (Eval("QuoteType").ToString() == "Q") %>' />
|
|
<asp:Label ID="Label9" runat="server" Text='<%# Eval("MinPrice_sim", "{0:C3}") %>' Visible='<%# (Eval("QuoteType").ToString() != "Q") %>' />
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Price" SortExpression="PriceOff" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false">
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label4" runat="server" Text='<%# Eval("PriceOff", "{0:C3}") %>' CssClass='<%# C2P_Data.utils.priceVsCost(Eval("QuoteType"),Eval("FullCost"),Eval("MinPrice"),Eval("MinPrice_sim"),Eval("PriceOff")) %>' />
|
|
</ItemTemplate>
|
|
<EditItemTemplate>
|
|
<asp:TextBox ID="txtPriceOff" runat="server" Text='<%# Bind("PriceOff") %>' Width="5em" />
|
|
</EditItemTemplate>
|
|
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
|
<ItemTemplate>
|
|
<asp:CheckBox ID="chkSelect" runat="server" CssClass="btn" OnCheckedChanged="btnSel_Click" AutoPostBack="true" ToolTip='<%# traduci("reqTypeFilterOnMultipleSel") %>' />
|
|
</ItemTemplate>
|
|
<HeaderTemplate>
|
|
<asp:CheckBox ID="btnSelAll" runat="server" Checked="false" ToolTip='<%# traduci("btnSelAll") %>'
|
|
OnCheckedChanged="btnSelAll_Click" CssClass="btn" AutoPostBack="true"></asp:CheckBox>
|
|
</HeaderTemplate>
|
|
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
<asp:ObjectDataSource ID="odsQuotes" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getBySearch" TypeName="C2P_Data.DS_QuotesTableAdapters.QuoteFull_QTableAdapter" OnSelecting="odsQuotes_Selecting">
|
|
<SelectParameters>
|
|
<asp:ControlParameter ControlID="acClient" PropertyName="valore" Name="CodClient" DefaultValue="" Type="String" />
|
|
<asp:ControlParameter ControlID="acItem" PropertyName="valore" Name="CodItem" DefaultValue="" Type="String" />
|
|
<asp:ControlParameter ControlID="acMaterial" PropertyName="valore" Name="RawMat" DefaultValue="" Type="String" />
|
|
<asp:ControlParameter ControlID="mod_selPeriodo1" PropertyName="inizio" Name="DataMin" Type="DateTime" DefaultValue="" />
|
|
<asp:ControlParameter ControlID="mod_selPeriodo1" PropertyName="fine" Name="DataMax" Type="DateTime" DefaultValue="" />
|
|
<asp:ControlParameter ControlID="mod_range1" PropertyName="minValSel" Name="qtaMin" Type="Int32" />
|
|
<asp:ControlParameter ControlID="mod_range1" PropertyName="maxValSel" Name="qtaMax" Type="Int32" />
|
|
<asp:ControlParameter ControlID="rblTipo" DefaultValue="*" Name="QuoteType" PropertyName="SelectedValue" Type="String" />
|
|
<asp:ControlParameter ControlID="rblQState" DefaultValue="-1" Name="IdxQState" PropertyName="SelectedValue" Type="Int32" />
|
|
<asp:SessionParameter SessionField="searchVal" Name="search" Type="String" DefaultValue="*" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
<asp:ObjectDataSource ID="odsTipoDoc" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByTableField" TypeName="C2P_Data.DS_UtilityTableAdapters.v_selListValTableAdapter">
|
|
<SelectParameters>
|
|
<asp:Parameter DefaultValue="*" Name="TableName" Type="String" />
|
|
<asp:Parameter DefaultValue="TipoDoc" Name="FieldName" Type="String" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
</div>
|
|
</div>
|
|
<div runat="server" id="numRes" class="row">
|
|
<div class="col-sm-6">
|
|
<asp:Label runat="server" ID="lblResults" CssClass="didascaliaMed"><%: numRecords %></asp:Label>
|
|
</div>
|
|
<div class="col-sm-6 text-right">
|
|
<%: traduci("PageSize") %>
|
|
<asp:TextBox runat="server" ID="txtPageSize" Text="10" AutoPostBack="true" Width="2em" OnTextChanged="txtPageSize_TextChanged" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|