Iniziata aggiunta funzioni liste prelievo
git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@194 365432ac-a1b5-4ffd-bb28-6d3099d32164
@@ -74,13 +74,6 @@
|
||||
<Compile Include="Default.aspx.designer.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="mod_taskUdc.ascx.cs">
|
||||
<DependentUpon>mod_taskUdc.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="mod_taskUdc.ascx.designer.cs">
|
||||
<DependentUpon>mod_taskUdc.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UDC.aspx.cs">
|
||||
<DependentUpon>UDC.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -130,6 +123,13 @@
|
||||
<Compile Include="WebUserControls\mod_menuTop.ascx.designer.cs">
|
||||
<DependentUpon>mod_menuTop.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_periodoAnalisi.ascx.cs">
|
||||
<DependentUpon>mod_periodoAnalisi.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_periodoAnalisi.ascx.designer.cs">
|
||||
<DependentUpon>mod_periodoAnalisi.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_search.ascx.cs">
|
||||
<DependentUpon>mod_search.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -181,7 +181,32 @@
|
||||
<ItemGroup>
|
||||
<Content Include="ActiveTask.aspx" />
|
||||
<Content Include="Default.aspx" />
|
||||
<Content Include="mod_taskUdc.ascx" />
|
||||
<Content Include="images\apply_l.png" />
|
||||
<Content Include="images\apply_m.png" />
|
||||
<Content Include="images\apply_s.png" />
|
||||
<Content Include="images\cancel_l.png" />
|
||||
<Content Include="images\cancel_m.png" />
|
||||
<Content Include="images\cancel_s.png" />
|
||||
<Content Include="images\circle_s_0.png" />
|
||||
<Content Include="images\circle_s_1.png" />
|
||||
<Content Include="images\circle_s_2.png" />
|
||||
<Content Include="images\circle_s_3.png" />
|
||||
<Content Include="images\circle_s_4.png" />
|
||||
<Content Include="images\lista_01-PreFus_l.png" />
|
||||
<Content Include="images\lista_01-PreFus_m.png" />
|
||||
<Content Include="images\lista_01-PreFus_s.png" />
|
||||
<Content Include="images\lista_02-PreCli_l.png" />
|
||||
<Content Include="images\lista_02-PreCli_m.png" />
|
||||
<Content Include="images\lista_02-PreCli_s.png" />
|
||||
<Content Include="images\lista_02-TerFus_l.png" />
|
||||
<Content Include="images\lista_02-TerFus_m.png" />
|
||||
<Content Include="images\lista_02-TerFus_s.png" />
|
||||
<Content Include="images\lista_03-TerWip_l.png" />
|
||||
<Content Include="images\lista_03-TerWip_m.png" />
|
||||
<Content Include="images\lista_03-TerWip_s.png" />
|
||||
<Content Include="images\view_l.png" />
|
||||
<Content Include="images\view_m.png" />
|
||||
<Content Include="images\view_s.png" />
|
||||
<Content Include="UDC.aspx" />
|
||||
<Content Include="WebUserControls\mod_barcode.ascx" />
|
||||
<Content Include="WebUserControls\mod_currentTask.ascx" />
|
||||
@@ -189,6 +214,7 @@
|
||||
<Content Include="WebUserControls\mod_home.ascx" />
|
||||
<Content Include="WebUserControls\mod_listePrelievo.ascx" />
|
||||
<Content Include="WebUserControls\mod_menuTop.ascx" />
|
||||
<Content Include="WebUserControls\mod_periodoAnalisi.ascx" />
|
||||
<Content Include="WebUserControls\mod_search.ascx" />
|
||||
<Content Include="WS\AutoCompletamento.asmx" />
|
||||
<Content Include="Barcode.aspx" />
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Compact.Master" AutoEventWireup="true" CodeBehind="ListePrelievo.aspx.cs" Inherits="GMW_Term.ListePrelievo" %>
|
||||
<%--<%@ Register src="WebUserControls/mod_userBar.ascx" tagname="mod_userBar" tagprefix="uc1" %>--%>
|
||||
<%@ Register src="WebUserControls/mod_listePrelievo.ascx" tagname="mod_listePrelievo" tagprefix="uc2" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
|
||||
<%--<uc1:mod_userBar ID="mod_userBar1" runat="server" />--%>
|
||||
<uc2:mod_listePrelievo ID="mod_listePrelievo1" runat="server" />
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -27,7 +27,11 @@
|
||||
}
|
||||
#smallTable
|
||||
{
|
||||
font-size: 10pt;
|
||||
font-size: 9pt;
|
||||
}
|
||||
#smallGrid
|
||||
{
|
||||
font-size: 8pt;
|
||||
}
|
||||
.quadro1, .quadro2
|
||||
{
|
||||
@@ -63,3 +67,43 @@
|
||||
text-align: center;
|
||||
color: Black;
|
||||
}
|
||||
.ctrHeaderPager
|
||||
{
|
||||
background-color: #b8b8b8;
|
||||
font-weight: bold;
|
||||
color: White;
|
||||
}
|
||||
.ctrRowStyle
|
||||
{
|
||||
vertical-align: top;
|
||||
background-color: #EFF3FB;
|
||||
}
|
||||
.ctrAltRowStyle
|
||||
{
|
||||
vertical-align: top;
|
||||
background-color: White;
|
||||
}
|
||||
.ctrRowStyleRight
|
||||
{
|
||||
background-color: #EFF3FB;
|
||||
text-align: right;
|
||||
}
|
||||
.ctrAltRowStyleRight
|
||||
{
|
||||
background-color: White;
|
||||
text-align: right;
|
||||
}
|
||||
.ctrInsRowStyle
|
||||
{
|
||||
background-color: #b8b8b8;
|
||||
}
|
||||
.ctrEditRowStyle
|
||||
{
|
||||
background-color: #D1DDF1;
|
||||
}
|
||||
.ctrSelRowStyle
|
||||
{
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
background-color: #D1DDF1;
|
||||
}
|
||||
|
||||
@@ -1,161 +1,111 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_listePrelievo.ascx.cs"
|
||||
Inherits="GMW_Term.WebUserControls.mod_listePrelievo" %>
|
||||
<asp:ScriptManager ID="ScriptManager1" runat="server">
|
||||
</asp:ScriptManager>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc1" %>
|
||||
<div id="contenuto" style="text-align: center;">
|
||||
<div id="InputTitle">
|
||||
<asp:Label ID="lblInput" runat="server" Text="Liste Prelievo"/></div>
|
||||
<asp:UpdatePanel ID="updPanel1" runat="server">
|
||||
<ContentTemplate>
|
||||
<div id="Data" style="padding-bottom: 10px;">
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- <asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
|
||||
DataKeyNames="CodLista" DataSourceID="ods" OnRowUpdating="grView_RowUpdating">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
<SelectedRowStyle CssClass="ctrSelRowStyle" />
|
||||
<FooterStyle CssClass="ctrFooter" />
|
||||
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<EmptyDataRowStyle CssClass="ctrRowStyle" />
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click"
|
||||
Visible="true" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select"
|
||||
ToolTip='<%# traduci("Select") %>'/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TipoLista" SortExpression="CodTipoLista" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Image runat="server" ID="imgCodTipoLista"
|
||||
ToolTip="aaa" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="CodLista" SortExpression="CodLista">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblCodLista" runat="server" Text='<%# Eval("CodLista") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="data" SortExpression="DataCreaz">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDataCreaz" runat="server" Text='<%# Eval("DataCreaz") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Particolare" SortExpression="Particolare">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("Particolare") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Prel/Tot" SortExpression="prelevato" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPrelevati" runat="server" Text='<%# Eval("Prelevato","{0:0}") %>' />
|
||||
<asp:Label ID="lblTotale" runat="server" Text='<%# Eval("QtaTot","/ {0:0}") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Stato" SortExpression="CodStatoLista" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Image runat="server" ID="imgCodStatoLista"
|
||||
ToolTip="aa" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Label runat="server" ID="lblAttiva" Text="A" ToolTip='<%# traduci("AttivaListaPrelievo") %>' />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgAttivaListaPrelievo" runat="server" CausesValidation="False"
|
||||
CommandName="Update" CommandArgument="creaIniziaListaPrelievo" ToolTip='<%# traduci("AttivaListaPrelievo") %>'
|
||||
Visible='<%# attivaEnabled(Eval("CodStatoLista")) %>' ImageUrl="~/images/apply_s.png"
|
||||
OnClick="imgAttivaLista_Click" />
|
||||
<cc1:ConfirmButtonExtender ID="cbeAttiva" runat="server" ConfirmText='<%# traduci("confermaAttivaLista")%>'
|
||||
TargetControlID="imgAttivaListaPrelievo" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Label runat="server" ID="lblInizia" Text="I" ToolTip='<%# traduci("IniziaListaPrelievo") %>' />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgIniziaListaPrelievo" runat="server" CausesValidation="False"
|
||||
CommandName="Update" CommandArgument="creaIniziaListaPrelievo" ToolTip='<%# traduci("IniziaListaPrelievo") %>'
|
||||
Visible='<%# iniziaEnabled(Eval("CodStatoLista")) %>' ImageUrl="~/images/apply_s.png"
|
||||
OnClick="imgIniziaLista_Click" />
|
||||
<cc1:ConfirmButtonExtender ID="cbeInizia" runat="server" ConfirmText='<%# traduci("confermaIniziaLista")%>'
|
||||
TargetControlID="imgIniziaListaPrelievo" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Label runat="server" ID="lblCompleta" Text="C" ToolTip='<%# traduci("CompletaListaPrelievo") %>' />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgCompletaListaPrelievo" runat="server" CausesValidation="False"
|
||||
CommandName="Update" CommandArgument="completaListaPrelievo" ToolTip='<%# traduci("CompletaListaPrelievo") %>'
|
||||
Visible='<%# completaEnabled(Eval("CodStatoLista")) %>' ImageUrl="~/images/apply_s.png"
|
||||
OnClick="imgCompletaLista_Click" />
|
||||
<cc1:ConfirmButtonExtender ID="cbeCompleta" runat="server" ConfirmText='<%# traduci("confermaCompletaLista")%>'
|
||||
TargetControlID="imgCompletaListaPrelievo" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Label runat="server" ID="lblScarica" Text="S" ToolTip='<%# traduci("ScaricaListaPrelievo") %>' />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgScaricaListaPrelievo" runat="server" CausesValidation="False"
|
||||
CommandName="Update" CommandArgument="ScaricaListaPrelievo" ToolTip='<%# traduci("ScaricaListaPrelievo") %>'
|
||||
Visible='<%# ScaricaEnabled(Eval("CodStatoLista")) %>' ImageUrl="~/images/apply_s.png"
|
||||
OnClick="imgScaricaLista_Click" />
|
||||
<cc1:ConfirmButtonExtender ID="cbeScarica" runat="server" ConfirmText='<%# traduci("confermaScaricaLista")%>'
|
||||
TargetControlID="imgScaricaListaPrelievo" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
|
||||
CommandArgument='<%# Eval("CodStatoLista") %>' ToolTip='<%# traduci("Delete") %>'
|
||||
Visible='<%# delEnabled(Eval("CodStatoLista")) %>' />
|
||||
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>'
|
||||
TargetControlID="imgDelete">
|
||||
</cc1:ConfirmButtonExtender>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>--%>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
|
||||
<asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="getByFilt" TypeName="GMW_data.DS_magazzinoTableAdapters.ElencoListePrelievoTableAdapter"
|
||||
FilterExpression="CodLista LIKE '%{0}%' OR Particolare LIKE '%{0}%' OR DescParticolare LIKE '%{0}%'"
|
||||
DeleteMethod="DeleteQuery" >
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
||||
</FilterParameters>
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_CodLista" Type="String" />
|
||||
</DeleteParameters>
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter Name="DataFrom" SessionField="_inizio" Type="DateTime" />
|
||||
<asp:SessionParameter Name="DataTo" SessionField="_fine" Type="DateTime" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:GridView ID="GridView1" runat="server" DataSourceID="ods">
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<div id="Button">
|
||||
<asp:Label ID="lblInput" runat="server" Text="Liste Prelievo" /></div>
|
||||
<div class="filtro_1" style="white-space: nowrap; height: 28px; padding: 2px;">
|
||||
<uc1:mod_periodoAnalisi ID="mod_periodoAnalisi1" runat="server" />
|
||||
</div>
|
||||
<div id="smallGrid">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
|
||||
DataKeyNames="CodLista" DataSourceID="ods" OnRowUpdating="grView_RowUpdating">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
<SelectedRowStyle CssClass="ctrSelRowStyle" />
|
||||
<FooterStyle CssClass="ctrFooter" />
|
||||
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<EmptyDataRowStyle CssClass="ctrRowStyle" />
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="TipoLista" SortExpression="CodTipoLista" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Image runat="server" ID="imgCodTipoLista" ImageUrl='<%# pathImgTipo(Eval("CodTipoLista")) %>'
|
||||
ToolTip='<%# tooltipTipo(Eval("CodTipoLista")) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Destinatario" SortExpression="Destinatario">
|
||||
<ItemTemplate>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<b>
|
||||
<asp:Label ID="lblDestinatario" runat="server" Text='<%# Eval("Destinatario") %>' />
|
||||
</b>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:Label ID="lblPrelevati" runat="server" Text='<%# Eval("Prelevato","{0:0}") %>' />
|
||||
<asp:Label ID="lblTotale" runat="server" Text='<%# Eval("QtaTot","/ {0:0}") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: left;">
|
||||
<asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("Particolare") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:TemplateField HeaderText="CodLista" SortExpression="CodLista">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblCodLista" runat="server" Text='<%# Eval("CodLista") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Stato" SortExpression="CodStatoLista" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Image runat="server" ID="imgCodStatoLista" ImageUrl='<%# pathImgStato(Eval("CodStatoLista")) %>'
|
||||
ToolTip='<%# tooltipStato(Eval("CodStatoLista")) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Label runat="server" ID="lblInizia" Text="I" ToolTip='<%# traduci("IniziaListaPrelievo") %>' />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgIniziaListaPrelievo" runat="server" CausesValidation="False"
|
||||
CommandName="Update" CommandArgument="creaIniziaListaPrelievo" ToolTip='<%# traduci("IniziaListaPrelievo") %>'
|
||||
Visible='<%# iniziaEnabled(Eval("CodStatoLista")) %>' ImageUrl="~/images/apply_s.png"
|
||||
OnClick="imgIniziaLista_Click" />
|
||||
<%--<cc1:ConfirmButtonExtender ID="cbeInizia" runat="server" ConfirmText='<%# traduci("confermaIniziaLista")%>'
|
||||
TargetControlID="imgIniziaListaPrelievo" />--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Label runat="server" ID="lblCompleta" Text="C" ToolTip='<%# traduci("CompletaListaPrelievo") %>' />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgCompletaListaPrelievo" runat="server" CausesValidation="False"
|
||||
CommandName="Update" CommandArgument="completaListaPrelievo" ToolTip='<%# traduci("CompletaListaPrelievo") %>'
|
||||
Visible='<%# completaEnabled(Eval("CodStatoLista")) %>' ImageUrl="~/images/apply_s.png"
|
||||
OnClick="imgCompletaLista_Click" />
|
||||
<%--<cc1:ConfirmButtonExtender ID="cbeCompleta" runat="server" ConfirmText='<%# traduci("confermaCompletaLista")%>'
|
||||
TargetControlID="imgCompletaListaPrelievo" />--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
|
||||
<asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="getByFilt" TypeName="GMW_data.DS_magazzinoTableAdapters.ElencoListePrelievoTableAdapter"
|
||||
OnInserting="recuperaFooter" FilterExpression=" (CodLista LIKE '%{0}%' OR Particolare LIKE '%{0}%' OR DescParticolare LIKE '%{0}%') AND ((CodStatoLista > 0) AND (CodStatoLista < 4)) "
|
||||
OnInserted="ods_Updated" OnUpdated="ods_Updated" DeleteMethod="DeleteQuery" OnDeleted="ods_Updated">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
||||
</FilterParameters>
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_CodLista" Type="String" />
|
||||
</DeleteParameters>
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter Name="DataFrom" SessionField="_inizio" Type="DateTime" />
|
||||
<asp:SessionParameter Name="DataTo" SessionField="_fine" Type="DateTime" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<div id="Button">
|
||||
<asp:Button ID="btn1" runat="server" Text="Button" />
|
||||
<asp:Button ID="btn2" runat="server" Text="Button" />
|
||||
</div>
|
||||
|
||||
@@ -1,33 +1,591 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Data;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using GMW_data;
|
||||
|
||||
namespace GMW_Term.WebUserControls
|
||||
{
|
||||
public partial class mod_listePrelievo : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
#region area da NON modificare
|
||||
|
||||
}
|
||||
#region area protected
|
||||
|
||||
protected string _idxGridView;
|
||||
protected string _idxGridViewExt;
|
||||
protected string _tabCache;
|
||||
protected bool _showNewBtn = false;
|
||||
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// wrapper traduzione termini
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// imposta errore non cancellabilità per record correlati
|
||||
/// </summary>
|
||||
protected void setNoDeletableErrorMessage()
|
||||
{
|
||||
// mostro avviso di non cancellabilità...
|
||||
lblWarning.Text = traduci("notDeletable_hasChild");
|
||||
lblWarning.Visible = true;
|
||||
grView.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// esegue cancellazioen record
|
||||
/// </summary>
|
||||
protected void doDelete()
|
||||
{
|
||||
// posso cancellare...
|
||||
lblWarning.Visible = false;
|
||||
ods.Delete();
|
||||
}
|
||||
/// <summary>
|
||||
/// Valida la cancellazione per i dati mostrati dal gridView
|
||||
/// richiede sia preventivamentedichiarato _idxGridView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected virtual void validaDelete(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
int idx = Convert.ToInt32(e.InputParameters[string.Format("Original_{0}", _idxGridView)]);
|
||||
if (objIsNotRelated(idx))
|
||||
{
|
||||
// annullo cancellazione...
|
||||
e.Cancel = true;
|
||||
// seleziono record... metto in session valore idx e poi ridisegno...
|
||||
SteamWare.memLayer.ML.setSessionVal(_idxGridView, idx);
|
||||
setNoDeletableErrorMessage();
|
||||
}
|
||||
else
|
||||
{
|
||||
doDelete();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// recupera i dati di un nuovo record contenuti nel footer di un gridView;
|
||||
/// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
//recupero la riga footer...
|
||||
DataColumnCollection colonne = colonneObj();
|
||||
string nomeCol;
|
||||
string tipoColonna = "";
|
||||
foreach (DataColumn colonna in colonne)
|
||||
{
|
||||
nomeCol = colonna.ColumnName;
|
||||
// cerco un textbox o quello che sia...
|
||||
if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "textBox";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "dropDownList";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "checkBox";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "selAjax";
|
||||
}
|
||||
// in base al tipo salvo negli inputparameters dell'ODS
|
||||
switch (tipoColonna)
|
||||
{
|
||||
case "textBox":
|
||||
e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
|
||||
break;
|
||||
case "dropDownList":
|
||||
e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
|
||||
break;
|
||||
case "checkBox":
|
||||
e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tipoColonna = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// inserisce nuovo valore da footer
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lblIns_click(object sender, EventArgs e)
|
||||
{
|
||||
// click su inserimento, chiamo il metodo insert dell'ObjectDataSource
|
||||
ods.Insert();
|
||||
SteamWare.memLayer.ML.emptyCacheVal(_tabCache);
|
||||
}
|
||||
/// <summary>
|
||||
/// annulla inserimento nuovo valore da footer
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lblCanc_click(object sender, EventArgs e)
|
||||
{
|
||||
// annullo inserimento: nascondo footer, bind controlli...
|
||||
grView.FooterRow.Visible = false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// gestione evento richeista nuovo valore (mostra footer, ...)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
// reset selezione...
|
||||
resetSelezione();
|
||||
// mostro il footer oppure la riga dei dettagli x nuovo...
|
||||
if (grView.FooterRow != null)
|
||||
{
|
||||
grView.FooterRow.Visible = true;
|
||||
}
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_nuovoValore != null)
|
||||
{
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// reset della selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
//resetSelezione();
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_resetSelezione;
|
||||
public event EventHandler eh_nuovoValore;
|
||||
public event EventHandler eh_selValore;
|
||||
|
||||
#endregion
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// definisce visibilità btnNew
|
||||
/// </summary>
|
||||
public bool showNewBtn
|
||||
{
|
||||
get
|
||||
{
|
||||
return _showNewBtn;
|
||||
}
|
||||
set
|
||||
{
|
||||
_showNewBtn = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua update del modulo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region area codice variabile
|
||||
|
||||
/// <summary>
|
||||
/// verifica complessiva non esistenza record child
|
||||
/// </summary>
|
||||
/// <param name="idxObj"></param>
|
||||
/// <returns></returns>
|
||||
protected bool objIsNotRelated(object idxObj)
|
||||
{
|
||||
bool answ = true;
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// elenco colonne del datagrid
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected DataColumnCollection colonneObj()
|
||||
{
|
||||
DS_magazzino.ElencoListePrelievoDataTable tabella = new DS_magazzino.ElencoListePrelievoDataTable();
|
||||
DataColumnCollection colonne = tabella.Columns;
|
||||
return colonne;
|
||||
}
|
||||
/// <summary>
|
||||
/// inizializzazione valori di default
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
_idxGridView = "CodLista";
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_periodoAnalisi1.setPeriodoFree();
|
||||
}
|
||||
// registro evento update
|
||||
mod_periodoAnalisi1.eh_doUpdate += new EventHandler(mod_periodoAnalisi1_eh_doUpdate);
|
||||
aggiornaControlliDataGL();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna controlli datagrid e numero righe in pagina
|
||||
/// </summary>
|
||||
protected void aggiornaControlliDataGL()
|
||||
{
|
||||
grView.PageSize = 4;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorno x update selettore date
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_periodoAnalisi1_eh_doUpdate(object sender, EventArgs e)
|
||||
{
|
||||
// aggiorno controllo corrente!
|
||||
updateOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// svuoto da cache post update
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno visualizzazione
|
||||
/// </summary>
|
||||
private void updateOds()
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// determina se sia abilitato il pulsante x attivare una lista di prelievo
|
||||
/// </summary>
|
||||
/// <param name="statoIniziata"></param>
|
||||
/// <returns></returns>
|
||||
public bool attivaEnabled(object codStato)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = ((int)codStato == (int)statoLista.bozza);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// determina se sia abilitato il pulsante x iniziare una lista di prelievo
|
||||
/// </summary>
|
||||
/// <param name="statoIniziata"></param>
|
||||
/// <returns></returns>
|
||||
public bool iniziaEnabled(object codStato)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = ((int)codStato == (int)statoLista.generata);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// determina se sia abilitato il pulsante x completare una lista di prelievo
|
||||
/// </summary>
|
||||
/// <param name="statoIniziata"></param>
|
||||
/// <returns></returns>
|
||||
public bool completaEnabled(object codStato)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = ((int)codStato == (int)statoLista.iniziata);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// determina se sia abilitato il pulsante x approvare e scaricare una lista di prelievo
|
||||
/// </summary>
|
||||
/// <param name="statoIniziata"></param>
|
||||
/// <returns></returns>
|
||||
public bool ScaricaEnabled(object codStato)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = ((int)codStato == (int)statoLista.completata);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gestione cambio selezione valore
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView));
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
lblWarning.Visible = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è iniziare attivare prelievo...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgAttivaLista_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "attivaListaPrelievo");
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è iniziare lista prelievo...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgIniziaLista_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "iniziaListaPrelievo");
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è completare lista prelievo...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgCompletaLista_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "completaListaPrelievo");
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è completare lista prelievo...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgScaricaLista_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "scaricaListaPrelievo");
|
||||
}
|
||||
/// <summary>
|
||||
/// in caso di aggiornamento verifico se sia salvato un comando inizia o completa lista prelievo...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowUpdating(object sender, GridViewUpdateEventArgs e)
|
||||
{
|
||||
// carico l'idx dell'oggetto
|
||||
string codLista = e.Keys["CodLista"].ToString();
|
||||
// quale comando?
|
||||
string _comando = "";
|
||||
if (SteamWare.memLayer.ML.isInSessionObject("nextObjCommand"))
|
||||
{
|
||||
_comando = SteamWare.memLayer.ML.StringSessionObj("nextObjCommand");
|
||||
SteamWare.memLayer.ML.emptySessionVal("nextObjCommand");
|
||||
}
|
||||
string CodSoggetto = MagClass.magazzino.CodSoggCurrUser;
|
||||
switch (_comando)
|
||||
{
|
||||
case "attivaListaPrelievo":
|
||||
GMW_data.MagClass.magazzino.attivaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
|
||||
updateOds();
|
||||
grView.EditIndex = -1;
|
||||
grView.DataBind();
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_nuovoValore != null)
|
||||
{
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
// blocco update!
|
||||
e.Cancel = true;
|
||||
break;
|
||||
case "iniziaListaPrelievo":
|
||||
GMW_data.MagClass.magazzino.iniziaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
|
||||
updateOds();
|
||||
grView.EditIndex = -1;
|
||||
grView.DataBind();
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_nuovoValore != null)
|
||||
{
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
// blocco update!
|
||||
e.Cancel = true;
|
||||
break;
|
||||
case "completaListaPrelievo":
|
||||
GMW_data.MagClass.magazzino.completaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
|
||||
updateOds();
|
||||
grView.EditIndex = -1;
|
||||
grView.DataBind();
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_nuovoValore != null)
|
||||
{
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
// blocco update!
|
||||
e.Cancel = true;
|
||||
break;
|
||||
case "scaricaListaPrelievo":
|
||||
GMW_data.MagClass.magazzino.scaricaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
|
||||
updateOds();
|
||||
grView.EditIndex = -1;
|
||||
grView.DataBind();
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_nuovoValore != null)
|
||||
{
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
// blocco update!
|
||||
e.Cancel = true;
|
||||
break;
|
||||
default:
|
||||
// faccio update!
|
||||
break;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// chiamato post modifica valore check/selezione nel selettore filtro stato
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void eh_selectedStato(object sender, EventArgs e)
|
||||
{
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// ssitema visualizzazione dal filtraggi
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
{
|
||||
#if false
|
||||
ods.FilterParameters.Clear();
|
||||
ods.FilterExpression = "(CodLista LIKE '%{0}%' OR Particolare LIKE '%{0}%' OR DescParticolare LIKE '%{0}%')";
|
||||
// parametro ricerca attuale
|
||||
SessionParameter parametroFiltro = new SessionParameter();
|
||||
parametroFiltro.SessionField = "valoreCercato";
|
||||
parametroFiltro.Name = "ricerca";
|
||||
parametroFiltro.DefaultValue = "*";
|
||||
ods.FilterParameters.Add(parametroFiltro);
|
||||
|
||||
#endif
|
||||
// chiamo procedura che aggiorna ods principale
|
||||
grView.SelectedIndex = -1;
|
||||
updateOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// chiamato post modifica valore check/selezione nel selettore filtro tipo
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void eh_selectedTipo(object sender, EventArgs e)
|
||||
{
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce URL immagine del codice da mostrare x stato lista
|
||||
/// </summary>
|
||||
/// <param name="codStato"></param>
|
||||
/// <returns></returns>
|
||||
public string pathImgStato(object codStato)
|
||||
{
|
||||
return string.Format("~/images/circle_s_{0}.png", codStato);
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce tooltip da mostrare x STATO lista
|
||||
/// </summary>
|
||||
/// <param name="codStato"></param>
|
||||
/// <returns></returns>
|
||||
public string tooltipStato(object codice)
|
||||
{
|
||||
return traduci(string.Format("StatoLista_{0}", codice));
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce URL immagine del codice da mostrare x TIPO lista
|
||||
/// </summary>
|
||||
/// <param name="codStato"></param>
|
||||
/// <returns></returns>
|
||||
public string pathImgTipo(object codice)
|
||||
{
|
||||
return string.Format("~/images/lista_{0}_s.png", codice);
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce tooltip da mostrare x TIPO lista
|
||||
/// </summary>
|
||||
/// <param name="codStato"></param>
|
||||
/// <returns></returns>
|
||||
public string tooltipTipo(object codice)
|
||||
{
|
||||
return traduci(codice.ToString());
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -13,15 +13,6 @@ namespace GMW_Term.WebUserControls {
|
||||
|
||||
public partial class mod_listePrelievo {
|
||||
|
||||
/// <summary>
|
||||
/// ScriptManager1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.ScriptManager ScriptManager1;
|
||||
|
||||
/// <summary>
|
||||
/// lblInput control.
|
||||
/// </summary>
|
||||
@@ -32,13 +23,22 @@ namespace GMW_Term.WebUserControls {
|
||||
protected global::System.Web.UI.WebControls.Label lblInput;
|
||||
|
||||
/// <summary>
|
||||
/// updPanel1 control.
|
||||
/// mod_periodoAnalisi1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel updPanel1;
|
||||
protected global::mod_periodoAnalisi mod_periodoAnalisi1;
|
||||
|
||||
/// <summary>
|
||||
/// grView control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumRec control.
|
||||
@@ -67,15 +67,6 @@ namespace GMW_Term.WebUserControls {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
|
||||
|
||||
/// <summary>
|
||||
/// GridView1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView GridView1;
|
||||
|
||||
/// <summary>
|
||||
/// btn1 control.
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_periodoAnalisi" CodeBehind="mod_periodoAnalisi.ascx.cs" %>
|
||||
<%--<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>--%>
|
||||
<div id="smallTable">
|
||||
<div style="float: left;">
|
||||
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
|
||||
DataSourceID="odsPeriodi" DataTextField="label" DataValueField="value" Font-Size="Smaller">
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource ID="odsPeriodi" runat="server" OldValuesParameterFormatString="original_{0}"
|
||||
SelectMethod="getByConditio" TypeName="GMW_data.DS_utilityTableAdapters.v_selPeriodiTradTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="IT" Name="conditio" SessionField="lingua" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<div style="float: left; padding-right: 1px;">
|
||||
<asp:TextBox ID="txtInizio" TabIndex="1" runat="server" Width="55px" MaxLength="10"
|
||||
Font-Size="Smaller" AutoPostBack="True" OnTextChanged="txtInizio_TextChanged"></asp:TextBox>
|
||||
<%--<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtInizio"
|
||||
FirstDayOfWeek="Monday" Format="dd/MM/yyyy">
|
||||
</cc1:CalendarExtender>--%>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="!!!"
|
||||
ControlToValidate="txtInizio" Display="Dynamic" />
|
||||
</div>
|
||||
<div style="float: left; padding-right: 1px;">
|
||||
<asp:TextBox ID="txtFine" TabIndex="2" runat="server" Width="55px" MaxLength="10"
|
||||
Font-Size="Smaller" AutoPostBack="True" OnTextChanged="txtFine_TextChanged"></asp:TextBox>
|
||||
<%--<cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtFine"
|
||||
FirstDayOfWeek="Monday" Format="dd/MM/yyyy">
|
||||
</cc1:CalendarExtender>--%>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="!!!"
|
||||
ControlToValidate="txtFine" Display="Dynamic" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,204 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using SteamWare;
|
||||
|
||||
public partial class mod_periodoAnalisi : System.Web.UI.UserControl
|
||||
{
|
||||
#region area protected
|
||||
|
||||
protected intervalloDate _intervallo;
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
setIntervallo();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gestione del selettore rapido dell'intervallo temporale...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
intervalloDate _intervallo = new intervalloDate();
|
||||
// verifico cosa sia cambiato ed imposto date...
|
||||
datario _datario = new datario();
|
||||
switch (DropDownList1.SelectedValue)
|
||||
{
|
||||
case "1_today":
|
||||
_intervallo = _datario.giornata(DateTime.Now);
|
||||
break;
|
||||
case "2_yesterday":
|
||||
_intervallo = _datario.giornata(DateTime.Now.AddDays(-1));
|
||||
break;
|
||||
case "3_last_7":
|
||||
_intervallo = _datario.ultimiGiorni(DateTime.Now, 7);
|
||||
break;
|
||||
case "4_this_week":
|
||||
_intervallo = _datario.questaSett(DateTime.Now);
|
||||
break;
|
||||
case "5_last_30":
|
||||
_intervallo = _datario.ultimiGiorni(DateTime.Now, 30);
|
||||
break;
|
||||
case "6_this_month":
|
||||
_intervallo = _datario.questoMese(DateTime.Now);
|
||||
break;
|
||||
case "7_last_month":
|
||||
_intervallo = _datario.estremiMese(DateTime.Now.AddMonths(-1));
|
||||
break;
|
||||
case "8_this_year":
|
||||
_intervallo = _datario.estremiAnno(DateTime.Now);
|
||||
break;
|
||||
case "9_last_year":
|
||||
_intervallo = _datario.estremiAnno(DateTime.Now.AddYears(-1));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
intervalloAnalisi = _intervallo;
|
||||
aggiornaDateMostrate();
|
||||
}
|
||||
|
||||
private void aggiornaDateMostrate()
|
||||
{
|
||||
txtInizio.Text = intervalloAnalisi.inizio.ToShortDateString();
|
||||
txtFine.Text = intervalloAnalisi.fine.AddDays(-1).ToShortDateString(); // mostro 1 gg in meno xché termina alle 00:00...
|
||||
reportUpdate();
|
||||
}
|
||||
|
||||
private void setIntervallo()
|
||||
{
|
||||
intervalloDate _intervallo;
|
||||
try
|
||||
{
|
||||
_intervallo = (intervalloDate)Session["_intervallo"];
|
||||
}
|
||||
catch
|
||||
{
|
||||
_intervallo = new intervalloDate();
|
||||
_intervallo.fine = DateTime.Now.Subtract(DateTime.Now.TimeOfDay).AddDays(1);
|
||||
_intervallo.inizio = _intervallo.fine.AddMonths(-1);
|
||||
Session["_intervallo"] = _intervallo;
|
||||
Session["_inizio"] = _intervallo.inizio;
|
||||
Session["_fine"] = _intervallo.fine;
|
||||
}
|
||||
txtInizio.Text = _intervallo.inizio.ToShortDateString();
|
||||
txtFine.Text = _intervallo.fine.ToShortDateString();
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
txtInizio.ToolTip = traduci("inizioPeriodo");
|
||||
txtFine.ToolTip = traduci("finePeriodo");
|
||||
}
|
||||
}
|
||||
protected void txtInizio_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// imposto il selettore a discesa...
|
||||
DropDownList1.SelectedIndex = 0;
|
||||
// se campo vuoto imposto oggi...
|
||||
if (txtInizio.Text == "")
|
||||
{
|
||||
txtInizio.Text = DateTime.Now.ToShortDateString();
|
||||
}
|
||||
else
|
||||
{
|
||||
txtInizio.Text = Convert.ToDateTime(txtInizio.Text).ToShortDateString();
|
||||
}
|
||||
// aggiorno dati in session...
|
||||
aggiornaPeriodo();
|
||||
}
|
||||
|
||||
private void aggiornaPeriodo()
|
||||
{
|
||||
_intervallo = new intervalloDate();
|
||||
_intervallo.inizio = Convert.ToDateTime(txtInizio.Text);
|
||||
_intervallo.fine = ((DateTime)Convert.ToDateTime(txtFine.Text)).Date.AddDays(1);
|
||||
//_intervallo.fine = ((DateTime)Convert.ToDateTime(txtFine.Text)).Date.AddDays(1).AddMinutes(-1);
|
||||
intervalloAnalisi = _intervallo;
|
||||
reportUpdate();
|
||||
|
||||
}
|
||||
protected void txtFine_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// imposto il selettore a discesa...
|
||||
DropDownList1.SelectedIndex = 0;
|
||||
// se campo vuoto imposto oggi...
|
||||
if (txtFine.Text == "")
|
||||
{
|
||||
txtFine.Text = DateTime.Now.AddDays(1).ToShortDateString();
|
||||
}
|
||||
else
|
||||
{
|
||||
txtFine.Text = Convert.ToDateTime(txtFine.Text).ToShortDateString();
|
||||
}
|
||||
// aggiorno dati in session...
|
||||
aggiornaPeriodo();
|
||||
}
|
||||
|
||||
protected void reportUpdate()
|
||||
{
|
||||
// alzo l'evento d update/inserimento e ricarico cache...
|
||||
if (eh_doUpdate != null)
|
||||
{
|
||||
eh_doUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
public intervalloDate intervalloAnalisi
|
||||
{
|
||||
get
|
||||
{
|
||||
return (intervalloDate)Session["_intervallo"];
|
||||
}
|
||||
set
|
||||
{
|
||||
intervalloDate interv = value;
|
||||
Session["_intervallo"] = interv;
|
||||
Session["_inizio"] = interv.inizio;
|
||||
Session["_fine"] = interv.fine;
|
||||
}
|
||||
}
|
||||
|
||||
public void doUpdate()
|
||||
{
|
||||
aggiornaDateMostrate();
|
||||
}
|
||||
|
||||
public void setPeriodoFree()
|
||||
{
|
||||
DropDownList1.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_doUpdate;
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
public partial class mod_periodoAnalisi {
|
||||
|
||||
/// <summary>
|
||||
/// DropDownList1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList DropDownList1;
|
||||
|
||||
/// <summary>
|
||||
/// odsPeriodi control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsPeriodi;
|
||||
|
||||
/// <summary>
|
||||
/// txtInizio control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtInizio;
|
||||
|
||||
/// <summary>
|
||||
/// RequiredFieldValidator1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
|
||||
|
||||
/// <summary>
|
||||
/// txtFine control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtFine;
|
||||
|
||||
/// <summary>
|
||||
/// RequiredFieldValidator2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 773 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 784 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 797 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 984 B |
|
After Width: | Height: | Size: 670 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 699 B |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |