176 lines
13 KiB
Plaintext
176 lines
13 KiB
Plaintext
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_magRic.ascx.cs" Inherits="GIM_site.WebUserControls.mod_magRic" %>
|
|
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
|
<%@ Register Src="~/WebUserControls/mod_tag2Item.ascx" TagPrefix="uc1" TagName="mod_tag2Item" %>
|
|
<%@ Register Src="~/WebUserControls/mod_selCodice.ascx" TagPrefix="uc1" TagName="mod_selCodice" %>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-xs-9" style="font-size: 0.8em; padding: 0px;">
|
|
<div runat="server" id="divNewItem" visible="false">
|
|
<div class="row">
|
|
<div class="col-xs-8">
|
|
<asp:Label runat="server" ID="lblNewDescr"><%: traduci("lblNewDescr") %></asp:Label> |
|
|
<uc1:mod_selCodice runat="server" ID="mod_selCodice" />
|
|
| <i class="fa fa-book"></i><asp:TextBox runat="server" ID="txtNewDescr" Width="30em"></asp:TextBox>
|
|
<asp:DropDownList runat="server" ID="ddlCodLocazioneNew" DataSourceID="odsLocazione" DataTextField="CodLocazione" DataValueField="CodLocazione">
|
|
</asp:DropDownList>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<asp:LinkButton runat="server" ID="lbtAddNew" CssClass="btn btn-success" OnClick="lbtAddNew_Click"><%: traduci("addNewItem") %></asp:LinkButton>
|
|
<asp:Label runat="server" ID="lblError" ForeColor="Red" Text="" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="20" DataKeyNames="idxItem" DataSourceID="ods" OnDataBound="grView_DataBound" OnRowEditing="grView_RowEditing" CssClass="table table-striped" OnSelectedIndexChanged="grView_SelectedIndexChanged">
|
|
<PagerStyle CssClass="active GridPager" />
|
|
<PagerSettings Mode="NumericFirstLast" />
|
|
<SelectedRowStyle CssClass="info" />
|
|
<EmptyDataTemplate>
|
|
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
|
<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>'
|
|
Visible='<%# isWritable() %>' />
|
|
</EmptyDataTemplate>
|
|
<Columns>
|
|
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
|
<EditItemTemplate>
|
|
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update"
|
|
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
|
|
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel"
|
|
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
|
|
</EditItemTemplate>
|
|
<HeaderTemplate>
|
|
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click" />
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
|
|
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit"
|
|
Visible='<%# isWritable() %>' ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>' />
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:TemplateField>
|
|
<asp:BoundField DataField="Famiglia" HeaderText="Famiglia" SortExpression="Famiglia" ControlStyle-Width="8em">
|
|
<ControlStyle Width="8em"></ControlStyle>
|
|
</asp:BoundField>
|
|
<asp:BoundField DataField="Descrizione" HeaderText="Descrizione" SortExpression="Descrizione" ControlStyle-Width="13em">
|
|
<ControlStyle Width="13em"></ControlStyle>
|
|
</asp:BoundField>
|
|
<asp:BoundField DataField="NomeCostruttore" HeaderText="NomeCostruttore" SortExpression="NomeCostruttore" ControlStyle-Width="13em">
|
|
<ControlStyle Width="13em"></ControlStyle>
|
|
</asp:BoundField>
|
|
<asp:BoundField DataField="CodCostruttore" HeaderText="CodCostruttore" SortExpression="CodCostruttore" ControlStyle-Width="13em">
|
|
<ControlStyle Width="13em"></ControlStyle>
|
|
</asp:BoundField>
|
|
<asp:TemplateField HeaderText="CodInterno" SortExpression="CodInterno">
|
|
<EditItemTemplate>
|
|
<%--<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("CodInterno") %>'></asp:TextBox>--%>
|
|
<uc1:mod_selCodice runat="server" ID="mod_selCodice" selValue='<%# Bind("CodInterno") %>' />
|
|
<%--<asp:DropDownList runat="server" ID="ddlCodInterno" DataSourceID="odsCodInternoEdit" DataTextField="value" DataValueField="value" SelectedValue='<%# Bind("CodInterno") %>'></asp:DropDownList>--%>
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label4" runat="server" Text='<%# Bind("CodInterno") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ControlStyle Width="15em" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="QtaMin" SortExpression="QtaMin">
|
|
<EditItemTemplate>
|
|
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("QtaMin") %>'></asp:TextBox>
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label3" runat="server" Text='<%# Eval("QtaMin") %>' CssClass='<%# cssByQtaMinGiacenza(Eval("QtaMin"),Eval("Giacenza")) %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ControlStyle Width="3em" />
|
|
</asp:TemplateField>
|
|
<asp:BoundField DataField="QtaLotto" HeaderText="QtaLotto" SortExpression="QtaLotto" ControlStyle-Width="3em">
|
|
<ControlStyle Width="3em"></ControlStyle>
|
|
</asp:BoundField>
|
|
<asp:BoundField DataField="Valore" HeaderText="Valore" SortExpression="Valore" DataFormatString="{0:C2}" ControlStyle-Width="4em">
|
|
<ControlStyle Width="4em"></ControlStyle>
|
|
</asp:BoundField>
|
|
<asp:TemplateField HeaderText="Giacenza" SortExpression="Giacenza" ControlStyle-Width="3em">
|
|
<EditItemTemplate>
|
|
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Giacenza") %>'></asp:Label>
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Giacenza") %>' ToolTip='<%# Bind("dtLastUpd") %>' CssClass='<%# cssByGiacenza(Eval("Giacenza")) %>'></asp:Label>
|
|
</ItemTemplate>
|
|
|
|
<ControlStyle Width="3em"></ControlStyle>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="CodLocazione" SortExpression="CodLocazione">
|
|
<EditItemTemplate>
|
|
<asp:DropDownList runat="server" ID="ddlCodLocazione" SelectedValue='<%# Bind("CodLocazione") %>' DataSourceID="odsLocazione" DataTextField="CodLocazione" DataValueField="CodLocazione"></asp:DropDownList>
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label2" runat="server" Text='<%# Bind("CodLocazione") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" ControlStyle-Width="13em">
|
|
<ControlStyle Width="13em"></ControlStyle>
|
|
</asp:BoundField>
|
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
|
<HeaderTemplate>
|
|
<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>' Visible='<%# isWritable() %>' />
|
|
</HeaderTemplate>
|
|
<EditItemTemplate>
|
|
<asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update"
|
|
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
|
|
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel"
|
|
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
|
|
Visible='<%# isWritable() %>' ToolTip='<%# traduci("Delete") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina, SteamWare.dimImg.small) %>' />
|
|
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>'
|
|
TargetControlID="imgDelete"></cc1:ConfirmButtonExtender>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini"></asp:Label>
|
|
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="GIM_dataLayer.DS_MagTableAdapters.StatoMagTableAdapter"
|
|
UpdateMethod="updateQuery" DeleteMethod="deleteQuery" OldValuesParameterFormatString="Original_{0}"
|
|
FilterExpression="Famiglia LIKE '%{0}%' OR Descrizione LIKE '%{0}%' OR NomeCostruttore LIKE '%{0}%' OR CodCostruttore LIKE '%{0}%' OR CodInterno LIKE '%{0}%' OR CodLocazione LIKE '%{0}%' OR DescrLocazione LIKE '%{0}%' OR Note LIKE '%{0}%' " InsertMethod="insertQuery" OnUpdating="ods_Updating">
|
|
<UpdateParameters>
|
|
<asp:Parameter Name="Original_idxItem" Type="Int32" />
|
|
<asp:Parameter Name="Famiglia" Type="String" />
|
|
<asp:Parameter Name="Descrizione" Type="String" />
|
|
<asp:Parameter Name="NomeCostruttore" Type="String" />
|
|
<asp:Parameter Name="CodCostruttore" Type="String" />
|
|
<asp:Parameter Name="CodInterno" Type="String" />
|
|
<asp:Parameter Name="QtaMin" Type="Int32" />
|
|
<asp:Parameter Name="QtaLotto" Type="Int32" />
|
|
<asp:Parameter Name="Valore" Type="Decimal" />
|
|
<asp:Parameter Name="CodLocazione" Type="String" />
|
|
<asp:Parameter Name="Note" Type="String"></asp:Parameter>
|
|
</UpdateParameters>
|
|
<FilterParameters>
|
|
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
|
</FilterParameters>
|
|
<DeleteParameters>
|
|
<asp:Parameter Name="Original_idxItem" Type="Int32" />
|
|
</DeleteParameters>
|
|
<InsertParameters>
|
|
<asp:Parameter Name="Descrizione" Type="String" />
|
|
<asp:Parameter Name="NomeCostruttore" Type="String" />
|
|
<asp:Parameter Name="CodCostruttore" Type="String" />
|
|
<asp:Parameter Name="CodInterno" Type="String" />
|
|
<asp:Parameter Name="QtaMin" Type="Int32" />
|
|
<asp:Parameter Name="QtaLotto" Type="Int32" />
|
|
<asp:Parameter Name="Valore" Type="Decimal" />
|
|
<asp:Parameter Name="Giacenza" Type="Int32" />
|
|
<asp:Parameter Name="CodLocazione" Type="String" />
|
|
<asp:Parameter Name="Note" Type="String" />
|
|
</InsertParameters>
|
|
</asp:ObjectDataSource>
|
|
<asp:HiddenField runat="server" ID="hfValoreCercato" />
|
|
<asp:ObjectDataSource runat="server" ID="odsLocazione" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GIM_dataLayer.DS_MagTableAdapters.AnagLocazioniTableAdapter"></asp:ObjectDataSource>
|
|
<asp:ObjectDataSource runat="server" ID="odsCodInternoEdit" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GIM_dataLayer.DS_utilityTableAdapters.v_selCodRicAmmTableAdapter"></asp:ObjectDataSource>
|
|
|
|
<asp:ObjectDataSource runat="server" ID="odsGruppoCod" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GIM_dataLayer.DS_utilityTableAdapters.v_selGrpCodRicAmmTableAdapter"></asp:ObjectDataSource>
|
|
</div>
|
|
<div class="col-xs-3" runat="server" id="divDetails" style="background-color: #d9edf7; padding: 2px; min-height: 525px;" visible="false">
|
|
<uc1:mod_tag2Item runat="server" ID="mod_tag2Item" modoControllo="TAGS" />
|
|
</div>
|
|
</div>
|