Files
gpw_testci/GPW/WebUserControls/mod_adminDipendenti.ascx
2021-03-26 17:17:28 +01:00

270 lines
18 KiB
Plaintext

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_adminDipendenti.ascx.cs" Inherits="GPW.WebUserControls.mod_adminDipendenti" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<% if (false)
{ %>
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div class="fontPiccolo">
<asp:GridView ID="grView" runat="server" AllowSorting="True" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4"
DataKeyNames="idxDipendente" DataSourceID="ods" ForeColor="#333333" GridLines="None" Width="100%" OnDataBound="grView_DataBound">
<AlternatingRowStyle BackColor="White" />
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F5F7FB" />
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
<SortedDescendingCellStyle BackColor="#E9EBEF" />
<SortedDescendingHeaderStyle BackColor="#4870BE" />
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>'
ImageUrl="~/images/view_s.png" />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>'
ImageUrl="~/images/edit_s.png" />
</ItemTemplate>
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update" ToolTip='<%# traduci("Update")%>'
ImageUrl="~/images/apply_s.png" />
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>'
ImageUrl="~/images/cancel_s.png" />
</EditItemTemplate>
<FooterTemplate>
<asp:ImageButton ID="imgInsert" runat="server" CausesValidation="False" CommandName="Insert" ToolTip='<%# traduci("Insert") %>'
ImageUrl="~/images/new_s.png" OnClick="lblIns_click" />
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>'
ImageUrl="~/images/cancel_s.png" />
</FooterTemplate>
<HeaderTemplate>
<asp:ImageButton ID="imgBtnReset" runat="server" ToolTip='<%# traduci("Reset") %>' CausesValidation="False" OnClick="btnReset_Click"
ImageUrl="~/images/reload_l.png" Visible="true" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="Cognome" SortExpression="Cognome">
<ItemTemplate>
<asp:Label ID="lblCognome" runat="server" Text='<%# Eval("Cognome") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCognome" runat="server" Text='<%# Bind("Cognome") %>' Width="8em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtCognome" runat="server" Text='<%# Bind("Cognome") %>' Width="8em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="Nome" SortExpression="Nome">
<ItemTemplate>
<asp:Label ID="lblNome" runat="server" Text='<%# Eval("Nome") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtNome" runat="server" Text='<%# Bind("Nome") %>' Width="8em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtNome" runat="server" Text='<%# Bind("Nome") %>' Width="8em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="matricola" SortExpression="matricola">
<ItemTemplate>
<asp:Label ID="lblmatricola" runat="server" Text='<%# Eval("matricola") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtmatricola" runat="server" Text='<%# Bind("matricola") %>' Width="3em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtmatricola" runat="server" Text='<%# Bind("matricola") %>' Width="3em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="codOrario" SortExpression="codOrario">
<ItemTemplate>
<asp:Label ID="lblcodOrario" runat="server" Text='<%# Eval("codOrario") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList runat="server" ID="dlCodOrario" SelectedValue='<%# Bind("codOrario") %>' DataSourceID="odsOrario" DataTextField="label"
DataValueField="value" />
</EditItemTemplate>
<FooterTemplate>
<asp:DropDownList runat="server" ID="dlCodOrario" SelectedValue='<%# Bind("codOrario") %>' DataSourceID="odsOrario" DataTextField="label"
DataValueField="value" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="dominio" SortExpression="dominio">
<ItemTemplate>
<asp:Label ID="lbldominio" runat="server" Text='<%# Eval("dominio") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtdominio" runat="server" Text='<%# Bind("dominio") %>' Width="8em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtdominio" runat="server" Text='<%# Bind("dominio") %>' Width="8em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="utente" SortExpression="utente">
<ItemTemplate>
<asp:Label ID="lblutente" runat="server" Text='<%# Eval("utente") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtutente" runat="server" Text='<%# Bind("utente") %>' Width="8em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtutente" runat="server" Text='<%# Bind("utente") %>' Width="8em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="email" SortExpression="email">
<ItemTemplate>
<asp:Label ID="lblemail" runat="server" Text='<%# Eval("email") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtemail" runat="server" Text='<%# Bind("email") %>' Width="12em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtemail" runat="server" Text='<%# Bind("email") %>' Width="12em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="CF" SortExpression="CF">
<ItemTemplate>
<asp:Label ID="lblCF" runat="server" Text='<%# Eval("CF") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCF" runat="server" Text='<%# Bind("CF") %>' Width="10em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtCF" runat="server" Text='<%# Bind("CF") %>' Width="10em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="dataNascita" SortExpression="dataNascita">
<ItemTemplate>
<asp:Label ID="lbldataNascita" runat="server" Text='<%# Eval("dataNascita","{0:dd/MM/yy}") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtdataNascita" runat="server" Text='<%# Bind("dataNascita","{0:yyyy/MM/dd}") %>' Width="6em" />
<asp:CalendarExtender runat="server" FirstDayOfWeek="Monday" ID="ceDataNascita" TargetControlID="txtdataNascita" Format="yyyy/MM/dd" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtdataNascita" runat="server" Text='<%# Bind("dataNascita","{0:yyyy/MM/dd}") %>' Width="6em" />
<asp:CalendarExtender runat="server" FirstDayOfWeek="Monday" ID="ceDataNascita" TargetControlID="txtdataNascita" Format="yyyy/MM/dd" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="luogoNascita" SortExpression="luogoNascita">
<ItemTemplate>
<asp:Label ID="lblluogoNascita" runat="server" Text='<%# Eval("luogoNascita") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtluogoNascita" runat="server" Text='<%# Bind("luogoNascita") %>' Width="8em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtluogoNascita" runat="server" Text='<%# Bind("luogoNascita") %>' Width="8em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="provNascita" SortExpression="provNascita">
<ItemTemplate>
<asp:Label ID="lblprovNascita" runat="server" Text='<%# Eval("provNascita") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtprovNascita" runat="server" Text='<%# Bind("provNascita") %>' Width="2em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtprovNascita" runat="server" Text='<%# Bind("provNascita") %>' Width="2em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="nazNascita" SortExpression="nazNascita">
<ItemTemplate>
<asp:Label ID="lblnazNascita" runat="server" Text='<%# Eval("nazNascita") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtnazNascita" runat="server" Text='<%# Bind("nazNascita") %>' Width="2em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtnazNascita" runat="server" Text='<%# Bind("nazNascita") %>' Width="2em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="attivo" SortExpression="attivo">
<ItemTemplate>
<asp:CheckBox ID="chkattivo" runat="server" Checked='<%# Eval("attivo") %>' Enabled="false" />
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="chkattivo" runat="server" Checked='<%# Bind("attivo") %>' />
</EditItemTemplate>
<FooterTemplate>
<asp:CheckBox ID="chkattivo" runat="server" Checked='<%# Bind("attivo") %>' />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxDipendente") %>' CommandName="Delete"
ImageUrl="~/images/elimina_s.png" ToolTip='<%# traduci("Delete") %>' Visible='<%# delEnabled(Eval("idxDipendente")) %>' />
<asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>' TargetControlID="imgDelete">
</asp:ConfirmButtonExtender>
</ItemTemplate>
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update" ImageUrl="~/images/apply_s.png"
ToolTip='<%# traduci("Update")%>' />
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ImageUrl="~/images/cancel_s.png"
ToolTip='<%# traduci("Cancel") %>' />
</EditItemTemplate>
<FooterTemplate>
<asp:ImageButton ID="imgInsert2" runat="server" CausesValidation="False" CommandName="Insert" ImageUrl="~/images/new_s.png"
OnClick="lblIns_click" ToolTip='<%# traduci("Insert") %>' />
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ImageUrl="~/images/cancel_s.png"
ToolTip='<%# traduci("Cancel") %>' />
</FooterTemplate>
<HeaderTemplate>
<asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Text='<%# traduci("New") %>' Visible='<%# chkLicOk %>' CssClass="btnNew" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
<SortedAscendingCellStyle BackColor="#F5F7FB"></SortedAscendingCellStyle>
<SortedAscendingHeaderStyle BackColor="#6D95E1"></SortedAscendingHeaderStyle>
<SortedDescendingCellStyle BackColor="#E9EBEF"></SortedDescendingCellStyle>
<SortedDescendingHeaderStyle BackColor="#4870BE"></SortedDescendingHeaderStyle>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OnInserting="recuperaFooter" DeleteMethod="deleteQuery" InsertMethod="insertQuery"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_ApplicazioneTableAdapters.DipendentiTableAdapter"
UpdateMethod="updateQuery" FilterExpression=" (Cognome like '%{0}%') OR (Nome like '%{0}%') OR (CF like '%{0}%') OR (matricola like '%{0}%') OR (email like '%{0}%') "
OnUpdating="ods_Updating">
<FilterParameters>
<asp:SessionParameter SessionField="valoreCercato" Type="String" />
</FilterParameters>
<DeleteParameters>
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="matricola" Type="String" />
<asp:Parameter Name="CF" Type="String" />
<asp:Parameter Name="Cognome" Type="String" />
<asp:Parameter Name="Nome" Type="String" />
<asp:Parameter Name="dataNascita" Type="DateTime" />
<asp:Parameter Name="luogoNascita" Type="String" />
<asp:Parameter Name="provNascita" Type="String" />
<asp:Parameter Name="nazNascita" Type="String" />
<asp:Parameter Name="email" Type="String" />
<asp:Parameter Name="dominio" Type="String" />
<asp:Parameter Name="utente" Type="String" />
<asp:Parameter Name="codOrario" Type="String" />
<asp:Parameter Name="attivo" Type="Boolean" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="matricola" Type="String"></asp:Parameter>
<asp:Parameter Name="CF" Type="String" />
<asp:Parameter Name="Cognome" Type="String" />
<asp:Parameter Name="Nome" Type="String" />
<asp:Parameter Name="dataNascita" Type="DateTime" />
<asp:Parameter Name="luogoNascita" Type="String" />
<asp:Parameter Name="provNascita" Type="String" />
<asp:Parameter Name="nazNascita" Type="String" />
<asp:Parameter Name="email" Type="String" />
<asp:Parameter Name="dominio" Type="String" />
<asp:Parameter Name="utente" Type="String" />
<asp:Parameter Name="codOrario" Type="String" />
<asp:Parameter Name="attivo" Type="Boolean" />
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
</div>
<asp:ObjectDataSource ID="odsOrario" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selCodOrarioTableAdapter"></asp:ObjectDataSource>