Files
2020-09-04 18:55:57 +02:00

90 lines
5.0 KiB
Plaintext

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoTimbr.ascx.cs" Inherits="GPW_Commesse.WebUserControls.mod_elencoTimbr" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<% if (false)
{ %>
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div class="clearDiv dataBlock blockSpac divSx">
<div class="table-success font-weight-bold text-center p-2" style="font-size: 1.2em;">
Timbrature Approvate
</div>
<asp:GridView ID="grView" runat="server" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="dataOra,idxDipendente"
CellPadding="4" GridLines="None" Font-Size="Smaller" Width="100%" OnRowDeleted="grView_RowDeleted"
OnRowUpdated="grView_RowUpdated" CssClass="table table-striped table-condensed table-sm small border-border-success">
<EmptyDataTemplate>
<div style="background-color: #ACACAC;">
Nessun record TIMBRATURA
</div>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblDip" runat="server" Text='<%# cognomeNome(Eval("idxDipendente")) %>' Visible='<%# showUserName %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="data - ora" SortExpression="dataOra" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lblData" runat="server" Text='<%# Eval("dataOra", "{0:MM/dd - HH:mm}") %>' Visible='<%# invBool(showLongDateFormat) %>' />
<asp:Label ID="Label1" runat="server" Text='<%# Eval("dataOra", "{0:yyyy/MM/dd ddd - HH:mm}") %>' Visible='<%# showLongDateFormat %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<div style="margin: auto; text-align: center;">
<asp:Label runat="server" ID="lblHeadIn" Text="IN" />
</div>
</HeaderTemplate>
<ItemTemplate>
<div style="margin: auto; text-align: center;">
<asp:Label ID="lblIn" runat="server" Visible='<%# Eval("entrata") %>'><i class="fa fa-times fa-2x" aria-hidden="true"></i></asp:Label>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<div style="margin: auto; text-align: center;">
<asp:ImageButton runat="server" ID="btnSwapInOut" ToolTip="Scambia In/Out" CommandName="Update" ImageUrl="~/images/InOutArrows_m.png" Visible='<%# userCanDelete(Eval("Approv")) %>' />
<asp:ConfirmButtonExtender ID="cbeSwapInOut" runat="server" ConfirmText="Procedo con scambio Entrata/Uscita della timbratura?"
TargetControlID="btnSwapInOut"></asp:ConfirmButtonExtender>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<div style="margin: auto; text-align: center;">
<asp:Label runat="server" ID="lblHeadOut" Text="OUT" />
</div>
</HeaderTemplate>
<ItemTemplate>
<div style="margin: auto; text-align: center;">
<asp:Label ID="lblOut" runat="server" Visible='<%# invBool(Eval("entrata")) %>'><i class="fa fa-times fa-2x" aria-hidden="true"></i></asp:Label>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton runat="server" ID="lbDelete" Text="Elimina" CommandArgument="Elimina" CommandName="Delete" CssClass="btn btn-danger btn-sm" Visible='<%# userCanDelete(Eval("Approv")) %>'><i class="fa fa-trash" aria-hidden="true"></i></asp:LinkButton>
<asp:ConfirmButtonExtender ID="cbeDelete" runat="server" ConfirmText="Sicuro di voler eliminare la timbratura? non è possibile annullare l'operazione."
TargetControlID="lbDelete"></asp:ConfirmButtonExtender>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByIdxDipPeriodo"
TypeName="GPW_data.DS_ApplicazioneTableAdapters.TimbratureTableAdapter" DeleteMethod="DeleteNonAppr" UpdateMethod="updateSwapInOut">
<DeleteParameters>
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
<asp:Parameter Name="Original_dataOra" Type="DateTime" />
</DeleteParameters>
<SelectParameters>
<asp:SessionParameter SessionField="idxDip_det" Name="idxDipendente" Type="Int32" DefaultValue="0" />
<asp:SessionParameter SessionField="inizioDet" Name="inizio" Type="DateTime" />
<asp:SessionParameter SessionField="fineDet" Name="fine" Type="DateTime" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Original_dataOra" Type="DateTime" />
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
</div>