Files
GPW/GPW_Commesse/WebUserControls/mod_commAttivitaDesk.ascx
T

254 lines
17 KiB
Plaintext

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_commAttivitaDesk.ascx.cs" Inherits="GPW_Commesse.WebUserControls.mod_commAttivitaDesk" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="mod_dateTime.ascx" TagName="mod_dateTime" TagPrefix="uc1" %>
<%@ Register Src="mod_autocomplete.ascx" TagPrefix="uc2" TagName="mod_autocomplete" %>
<% if (false)
{ %>
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<asp:Panel runat="server" ID="pnlHeader" class="dataBlockHeader" Style="height: 2.5em; text-align: center; margin: auto; font-size: 12pt;">
<asp:Label runat="server" ID="lblTitle" Font-Size="1.5em" />
<div class="divDx" style="display: block;">
<%--<asp:ImageButton ID="imgBtnNew" runat="server" ToolTip="Nuovo" CausesValidation="False" OnClick="btnNew_Click" ImageUrl="~/images/new_m.png" />--%>
<asp:LinkButton runat="server" ID="lnkNew" CausesValidation="False" ToolTip='<%# traduci("AddNew") %>' OnClick="lnkNew_Click"><i class="fa fa-plus-square fa-2x" aria-hidden="true"></i></asp:LinkButton>
</div>
</asp:Panel>
<div class="dataBlockReset" style="padding: 4px 0px 4px 0px;">
<asp:GridView ID="grView" runat="server" DataSourceID="odsRA" AutoGenerateColumns="False" OnRowDeleted="grView_RowDeleted"
OnRowCommand="grView_RowCommand" DataKeyNames="idxRA" OnRowDataBound="grView_RowDataBound" OnRowEditing="grView_RowEditing"
ShowHeader="false" Width="100%" OnRowUpdated="grView_RowUpdated">
<AlternatingRowStyle CssClass="alternatingRowStyle" />
<EditRowStyle CssClass="editRowStyle" />
<FooterStyle CssClass="footerRowStyle" />
<HeaderStyle CssClass="headerStyle" ForeColor="White" />
<PagerStyle CssClass="pagerStyle" ForeColor="White" />
<RowStyle CssClass="rowStyle" />
<SelectedRowStyle CssClass="selectedRowStyle" ForeColor="#333333" />
<SortedAscendingCellStyle CssClass="sortAscCell" />
<SortedAscendingHeaderStyle CssClass="sortAscHead" />
<SortedDescendingCellStyle CssClass="sortDescCell" />
<SortedDescendingHeaderStyle CssClass="sortDescHead" />
<EmptyDataTemplate>
<div style="background-color: #ACACAC;">
Nessun record COMMESSA
</div>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lnkClona" CausesValidation="False" CommandArgument='<%# Eval("idxRA") %>' CommandName="Update" ToolTip='<%# traduci("Duplica") %>' Visible='<%# enableFull %>' OnClick="lnkClona_Click"><i class="fa fa-magic fa-3x" aria-hidden="true"></i></asp:LinkButton>
<%--<asp:ImageButton ID="imgClona" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxRA") %>' CommandName="Update" ToolTip='<%# traduci("Duplica") %>' ImageUrl="~/images/clonaObj_l.png" OnClick="imgClona_Click" Visible='<%# enableFull %>' />--%>
</ItemTemplate>
<EditItemTemplate>
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
<HeaderTemplate>
</HeaderTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Record Commesse">
<ItemTemplate>
<div>
<asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>'
CssClass="noLink" Enabled='<%# enableFull %>'>
<div style="padding: 4px 4px 1px 4px; min-width: 326px;">
<div class="divSx">
<div style="font-size: 10pt; color: Black;">
<b>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("RagSociale") %>' /></b>|
<asp:Label ID="Label2" runat="server" Text='<%# Eval("nomeProj") %>' ForeColor="GrayText" Font-Size="8pt" />
</div>
<div style="font-size: 8pt;">
<asp:Label ID="Label10" runat="server" Text='<%# Eval("nomeFase") %>' ForeColor="Green" />
</div>
</div>
<div class="divDx" style="text-align: right; white-space: nowrap; right: 0px; top: 0px;">
<div class="ui-corner-all" style="font-size: 8pt; background: #EEE; border: 1px solid #333; color: #333; padding: .1em;">
<asp:Label ID="Label11" runat="server" Text='<%# Eval("inizio","{0:HH:mm}") %>' />
-
<asp:Label ID="Label12" runat="server" Text='<%# Eval("fine","{0:HH:mm}") %>' />
</div>
<div style="font-size: 11pt; color: #333; padding: .1em;">
<b>
<asp:Label ID="Label13" runat="server" Text='<%# formatDurata(Eval("oreTot")) %>' /></b> h
</div>
</div>
</div>
<div class="clearDiv" style="font-size: 8pt; padding: 1px 4px 4px 4px; color: #333;">
<div style="font-size: 8pt;">
<asp:Label ID="Label9" runat="server" Text='<%# Eval("descrizione").ToString().Replace(Environment.NewLine,"<br />").Replace("\n","<br />") %>' />
</div>
</div>
</asp:LinkButton>
</div>
</ItemTemplate>
<EditItemTemplate>
<div style="padding: 4px 0px 0px 4px; width: 326px;">
<div>
<div class="divSx">
<div>
<label for="ddlProgetto" style="font-size: x-small;">
Progetto
</label>
<br />
<asp:DropDownList ID="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" Font-Size="8pt" Width="22em">
</asp:DropDownList>
</div>
<div>
<label for="ddlFase" style="font-size: x-small;">
Fase
</label>
<br />
<asp:DropDownList ID="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value" Font-Size="8pt"
OnDataBound="ddlFase_DataBound" Width="22em">
</asp:DropDownList>
</div>
</div>
<div class="divSx" style="padding-left: 4px;">
<label for="txtSearchFase" style="font-size: x-small;">
<-- Search</label>
<br />
<asp:TextBox runat="server" ID="txtSearchFase" AutoPostBack="true" Width="80px" Font-Size="8pt" OnTextChanged="txtSearchFase_TextChanged" TextMode="MultiLine" />
<%--<br />
<uc2:mod_autocomplete runat="server" ID="acSearchFase" minCharAutocomplete="2" showKey="false" ServicePath="~/Services/WS_data.asmx/ElencoFasi" placeholder="Search" labelRicerca="search" labelWidth="45px" />--%>
</div>
</div>
<div>
<div class="divSx">
<uc1:mod_dateTime ID="dtInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
</div>
<div class="divDx">
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
</div>
<div class="divCenter">
&nbsp;
</div>
</div>
<br />
descrizione:
<asp:TextBox ID="txtDescrizione" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="6em" Width="24em" />
<div class="divCenter" style="height: 36px;">
<div class="divSx third" style="padding: 2px 4px 2px 4px; margin: auto; text-align: center; height: 20px;">
<asp:Button runat="server" ID="btnInsert" Text="Aggiorna" CssClass="btnVerde ui-corner-all shadowBox btnNew" CommandName="Update"
CausesValidation="true" />
</div>
<div class="divDx third" style="padding: 2px 4px 2px 4px; margin: auto; text-align: center; height: 20px;">
<asp:Button runat="server" ID="btnInsertCancel" Text="Annulla" CssClass="btnRosso ui-corner-all shadowBox btnChiudi" CommandName="Cancel" />
</div>
</div>
</div>
</EditItemTemplate>
<FooterTemplate>
<div style="padding: 4px 0px 0px 4px; width: 326px;">
<div>
<div class="divSx">
<div>
<label for="ddlProgetto" style="font-size: x-small;">
Progetto
</label>
<br />
<asp:DropDownList ID="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" Font-Size="8pt" Width="22em">
</asp:DropDownList>
</div>
<div>
<label for="ddlFase" style="font-size: x-small;">
Fase
</label>
<br />
<asp:DropDownList ID="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value" Font-Size="8pt"
OnDataBound="ddlFase_DataBound" Width="22em">
</asp:DropDownList>
</div>
</div>
<div class="divSx" style="padding-left: 4px;">
<label for="txtSearchFase" style="font-size: x-small;">
<-- Search</label>
<br />
<asp:TextBox runat="server" ID="txtSearchFase" AutoPostBack="true" Width="80px" Font-Size="8pt" OnTextChanged="txtSearchFase_TextChanged" TextMode="MultiLine" />
</div>
</div>
<div class="clearDiv">
<div class="divSx">
<uc1:mod_dateTime ID="dtInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
</div>
<div class="divDx">
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
</div>
<div class="divCenter">
&nbsp;
</div>
</div>
<br />
descrizione:
<asp:TextBox ID="txtDescrizione" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="6em" Width="24em" />
<div class="divCenter" style="height: 36px;">
<div class="divSx third" style="padding: 2px 4px 2px 4px; margin: auto; text-align: center; height: 20px;">
<asp:Button runat="server" ID="btnInsert" Text="Salva" CssClass="btnVerde ui-corner-all shadowBox btnNew" CommandName="Insert"
CausesValidation="true" />
</div>
<div class="divDx third" style="padding: 2px 4px 2px 4px; margin: auto; text-align: center; height: 20px;">
<asp:Button runat="server" ID="btnInsertCancel" Text="Annulla" CssClass="btnRosso ui-corner-all shadowBox btnChiudi" CommandName="Cancel" />
</div>
</div>
</div>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<%--<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxRA") %>' CommandName="Delete"
ImageUrl="~/images/elimina_l.png" ToolTip='<%# traduci("Delete") %>' Visible='<%# enableFull %>' />
<asp:ConfirmButtonExtender ID="cbeImg" runat="server" ConfirmText='<%# traduci("confermaDel")%>' TargetControlID="imgDelete"></asp:ConfirmButtonExtender>--%>
<asp:LinkButton runat="server" ID="lnkDelete" CausesValidation="False" CommandArgument='<%# Eval("idxRA") %>' CommandName="Delete" ToolTip='<%# traduci("Delete") %>' Visible='<%# enableFull %>'><i class="fa fa-trash fa-3x" aria-hidden="true"></i></asp:LinkButton><asp:ConfirmButtonExtender ID="cbeLnk" runat="server" ConfirmText='<%# traduci("confermaDel")%>' TargetControlID="lnkDelete"></asp:ConfirmButtonExtender>
</ItemTemplate>
<EditItemTemplate>
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsRA" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_ApplicazioneTableAdapters.regAttDayExplTableAdapter"
DeleteMethod="deleteQuery" InsertMethod="insertQuery" OnInserted="odsRA_Inserted" UpdateMethod="updateQuery" OnUpdating="odsRA_Updating">
<DeleteParameters>
<asp:Parameter Name="Original_idxRA" Type="Int32" />
</DeleteParameters>
<SelectParameters>
<asp:SessionParameter Name="idxDipendente" SessionField="idxDipCurr" Type="Int32" />
<asp:SessionParameter Name="dataRif" SessionField="dataRif" Type="DateTime" />
</SelectParameters>
<InsertParameters>
<asp:SessionParameter DefaultValue="0" Name="idxDipendente" SessionField="idxDipendente" Type="Int32" />
<asp:Parameter Name="idxFase" Type="Int32" />
<asp:Parameter Name="inizio" Type="DateTime" />
<asp:Parameter Name="fine" Type="DateTime" />
<asp:Parameter Name="descrizione" Type="String" />
<asp:Parameter Name="importo" Type="Decimal" DefaultValue="0" />
</InsertParameters>
<UpdateParameters>
<asp:SessionParameter DefaultValue="0" Name="idxDipendente" SessionField="idxDipendente" Type="Int32" />
<asp:Parameter Name="idxFase" Type="Int32" />
<asp:Parameter Name="inizio" Type="DateTime" />
<asp:Parameter Name="fine" Type="DateTime" />
<asp:Parameter Name="descrizione" Type="String" />
<asp:Parameter Name="importo" Type="Decimal" DefaultValue="0" />
<asp:Parameter Name="Original_idxRA" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsProgetto" runat="server" SelectMethod="getGrouped" TypeName="GPW_data.DS_UtilityTableAdapters.v_selProgettiTableAdapter">
<SelectParameters>
<asp:Parameter DefaultValue="true" Name="soloAttivi" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsFase" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByConditio"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selFasiOptTableAdapter">
<SelectParameters>
<asp:SessionParameter SessionField="idxProjSel" DefaultValue="0" Name="conditio" Type="Int32" />
<asp:Parameter DefaultValue="false" Name="soloAttivi" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
</div>