177 lines
11 KiB
Plaintext
177 lines
11 KiB
Plaintext
<%@ Control Language="C#" AutoEventWireup="true"
|
|
Inherits="mod_impianti" Codebehind="mod_impianti.ascx.cs" %>
|
|
<%@ Register Src="~/WebUserControls/mod_selettore_ajax.ascx" TagName="mod_selettore_ajax" TagPrefix="uc1" %>
|
|
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
|
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="10" CssClass="table table-striped" Width="100%" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound" DataKeyNames="idxImpianto" DataSourceID="ods" OnRowDataBound="grView_RowDataBound" OnRowUpdating="grView_RowUpdating">
|
|
<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">
|
|
<HeaderTemplate>
|
|
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click" />
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<div id="divLeft">
|
|
<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"
|
|
ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>'
|
|
Visible='<%# isEditable(Eval("idxImpianto")) %>' />
|
|
</div>
|
|
</ItemTemplate>
|
|
<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) %>' />
|
|
<asp:ImageButton ID="imgClona" runat="server" CausesValidation="False" ToolTip='<%# traduci("clonaRecord") %>'
|
|
ImageUrl='<%# imgPath(SteamWare.tipoImg.clona , SteamWare.dimImg.small) %>' CommandArgument="clonaObj"
|
|
CommandName="Update" OnClick="imgClona_Click" />
|
|
</EditItemTemplate>
|
|
<FooterTemplate>
|
|
<asp:ImageButton ID="imgInsert" runat="server" CausesValidation="False" CommandName="Insert"
|
|
ToolTip='<%# traduci("Insert") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.nuovo , SteamWare.dimImg.small) %>'
|
|
OnClick="lblIns_click" />
|
|
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel"
|
|
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla , SteamWare.dimImg.small) %>' />
|
|
</FooterTemplate>
|
|
</asp:TemplateField>
|
|
<asp:BoundField DataField="idxImpianto" HeaderText="idxImpianto" Visible="false"
|
|
InsertVisible="False" ReadOnly="True" SortExpression="idxImpianto" />
|
|
<asp:TemplateField HeaderText="codImpianto" SortExpression="codImpianto">
|
|
<FooterTemplate>
|
|
<asp:TextBox ID="txtcodImpianto" runat="server" Text='<%# Bind("codImpianto") %>'
|
|
Width="8em" />
|
|
</FooterTemplate>
|
|
<EditItemTemplate>
|
|
<asp:TextBox ID="txtcodImpianto" runat="server" Text='<%# Bind("codImpianto") %>'
|
|
Width="8em" />
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label3" runat="server" Text='<%# Bind("codImpianto") %>' />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="nomeImpianto" SortExpression="nomeImpianto">
|
|
<FooterTemplate>
|
|
<asp:TextBox ID="txtnomeImpianto" runat="server" Text='<%# Bind("nomeImpianto") %>'
|
|
Width="20em" />
|
|
</FooterTemplate>
|
|
<EditItemTemplate>
|
|
<asp:TextBox ID="txtnomeImpianto" runat="server" Text='<%# Bind("nomeImpianto") %>'
|
|
Width="20em" />
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label4" runat="server" Text='<%# Bind("nomeImpianto") %>' />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="tipoImpianto" SortExpression="tipoImpianto">
|
|
<FooterTemplate>
|
|
<asp:TextBox ID="txttipoImpianto" runat="server" Text='<%# Bind("tipoImpianto") %>' />
|
|
</FooterTemplate>
|
|
<EditItemTemplate>
|
|
<asp:TextBox ID="txttipoImpianto" runat="server" Text='<%# Bind("tipoImpianto") %>' />
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label5" runat="server" Text='<%# Bind("tipoImpianto") %>' />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="funzDal" SortExpression="funzDal">
|
|
<FooterTemplate>
|
|
<asp:TextBox ID="cal_funzDal" runat="server" Text='<%# Bind("funzDal","{0:yyyy/MM/dd}") %>'
|
|
Width="6em" />
|
|
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" FirstDayOfWeek="Monday"
|
|
TargetControlID="cal_funzDal" Format="yyyy/MM/dd">
|
|
</cc1:CalendarExtender>
|
|
</FooterTemplate>
|
|
<EditItemTemplate>
|
|
<asp:TextBox ID="cal_funzDal" runat="server" Text='<%# Bind("funzDal","{0:yyyy/MM/dd}") %>'
|
|
Width="6em" />
|
|
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" FirstDayOfWeek="Monday"
|
|
TargetControlID="cal_funzDal" Format="yyyy/MM/dd">
|
|
</cc1:CalendarExtender>
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label1" runat="server" Text='<%# Bind("funzDal","{0:yyyy/MM/dd}") %>' />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="funzAl" SortExpression="funzAl">
|
|
<FooterTemplate>
|
|
<asp:TextBox ID="cal_funzAl" runat="server" Text='<%# Bind("funzAl","{0:yyyy/MM/dd}") %>'
|
|
Width="6em" />
|
|
<cc1:CalendarExtender ID="CalendarExtender2" runat="server" FirstDayOfWeek="Monday"
|
|
TargetControlID="cal_funzAl" Format="yyyy/MM/dd">
|
|
</cc1:CalendarExtender>
|
|
</FooterTemplate>
|
|
<EditItemTemplate>
|
|
<asp:TextBox ID="cal_funzAl" runat="server" Text='<%# Bind("funzAl","{0:yyyy/MM/dd}") %>'
|
|
Width="6em" />
|
|
<cc1:CalendarExtender ID="CalendarExtender2" runat="server" FirstDayOfWeek="Monday"
|
|
TargetControlID="cal_funzAl" Format="yyyy/MM/dd">
|
|
</cc1:CalendarExtender>
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label2" runat="server" Text='<%# Bind("funzAl","{0:yyyy/MM/dd}") %>' />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
|
<HeaderTemplate>
|
|
<asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Text='<%# traduci("New") %>' Visible='<%# isWritable() %>' />
|
|
</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
|
|
CommandArgument='<%# Eval("idxImpianto") %>' ToolTip='<%# traduci("Delete") %>'
|
|
Visible='<%# isDeletable(Eval("idxImpianto")) %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina , SteamWare.dimImg.small) %>' />
|
|
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>'
|
|
TargetControlID="imgDelete">
|
|
</cc1:ConfirmButtonExtender>
|
|
</ItemTemplate>
|
|
<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>
|
|
<FooterTemplate>
|
|
<asp:ImageButton ID="imgInsert2" runat="server" CausesValidation="False" CommandName="Insert"
|
|
ToolTip='<%# traduci("Insert") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.nuovo , SteamWare.dimImg.small) %>'
|
|
OnClick="lblIns_click" />
|
|
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel"
|
|
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla , SteamWare.dimImg.small) %>' />
|
|
</FooterTemplate>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
<asp:ObjectDataSource ID="ods" runat="server" DeleteMethod="DeleteQuery" InsertMethod="Insert"
|
|
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GIM_dataLayer.DS_applicazioneTableAdapters.AnagImpiantiTableAdapter"
|
|
OnInserting="recuperaFooter" FilterExpression=" codImpianto LIKE '%{0}%' OR nomeImpianto LIKE '%{0}%' OR tipoImpianto LIKE '%{0}%' "
|
|
UpdateMethod="Update" OnInserted="ods_Updated" OnUpdated="ods_Updated">
|
|
<FilterParameters>
|
|
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
|
</FilterParameters>
|
|
<DeleteParameters>
|
|
<asp:Parameter Name="Original_idxImpianto" Type="Int32" />
|
|
</DeleteParameters>
|
|
<UpdateParameters>
|
|
<asp:Parameter Name="codImpianto" Type="String" />
|
|
<asp:Parameter Name="nomeImpianto" Type="String" />
|
|
<asp:Parameter Name="tipoImpianto" Type="String" />
|
|
<asp:Parameter Name="funzDal" Type="DateTime" />
|
|
<asp:Parameter Name="funzAl" Type="DateTime" />
|
|
<asp:Parameter Name="Original_idxImpianto" Type="Int32" />
|
|
</UpdateParameters>
|
|
<InsertParameters>
|
|
<asp:Parameter Name="codImpianto" Type="String" />
|
|
<asp:Parameter Name="nomeImpianto" Type="String" />
|
|
<asp:Parameter Name="tipoImpianto" Type="String" />
|
|
<asp:Parameter Name="funzDal" Type="DateTime" />
|
|
<asp:Parameter Name="funzAl" Type="DateTime" />
|
|
</InsertParameters>
|
|
</asp:ObjectDataSource>
|
|
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
|
|
<asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" /> |