psassato elenco doc a entityFramework...
This commit is contained in:
Binary file not shown.
@@ -28,17 +28,24 @@
|
||||
<div class="col-xs-2 text-nowrap pRZero">
|
||||
<asp:LinkButton runat="server" ID="lbIdxDoc2" CommandArgument='<%# Eval("idxDoc") %>' CausesValidation="False" CommandName="Select">
|
||||
<asp:Label ID="lblNum" runat="server" Text='<%# Eval("num","<b>{0:000}</b>") %>' />/<asp:Label ID="lblanno" runat="server" Text='<%# Eval("anno") %>' />
|
||||
</asp:LinkButton></div><div class="col-xs-6">
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<asp:LinkButton runat="server" ID="lbSelCli" CommandArgument='<%# Eval("idxCli") %>' OnClick="lbSelCli_Click">
|
||||
<asp:Label ID="lblcodCli" runat="server" Text='<%# Eval("RagSoc","<b>{0}</b>") %>' ToolTip='<%# Eval("RagSoc") %>' />
|
||||
</asp:LinkButton></div><div class="col-xs-2 text-right text-nowrap max20em pLZero pRZero">
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-xs-2 text-right text-nowrap max20em pLZero pRZero">
|
||||
<asp:LinkButton runat="server" ID="lbSelTipo" CommandArgument='<%# Eval("tipo") %>' OnClick="lbSelTipo_Click">
|
||||
<asp:Label ID="lblTipo" runat="server" Text='<%# Eval("tipo") %>' ToolTip='<%# Eval("tipo") %>' />
|
||||
</asp:LinkButton></div><div class="col-xs-1 text-right pLZero">
|
||||
<%--<asp:HyperLink runat="server" ID="lnkPdf" Target="_blank" NavigateUrl='<%# getUrlFatturaPdf(Eval("anno"),Eval("num")) %>'>--%>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-xs-1 text-right pLZero">
|
||||
<asp:HyperLink runat="server" ID="lnkPdf" Target="_blank" NavigateUrl='<%# getUrlFatturaPdf(Eval("idxDoc")) %>'>
|
||||
<i class="fa fa-print fa-2x" aria-hidden="true"></i>
|
||||
</asp:HyperLink></div><div class="col-xs-12 max40em">
|
||||
</asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-xs-12 max40em">
|
||||
<asp:Label ID="lblDescrizione" runat="server" CssClass="docNote " Text='<%# Bind("Descrizione") %>' ToolTip='<%# Bind("Descrizione") %>' />
|
||||
</div>
|
||||
</div>
|
||||
@@ -51,21 +58,24 @@
|
||||
<div class="col-xs-12 text-right">
|
||||
<asp:LinkButton runat="server" ID="lbIdxDoc3" CommandArgument='<%# Eval("idxDoc") %>' CausesValidation="False" CommandName="Select">
|
||||
<asp:Label ID="lblNetto" runat="server" Text='<%# Eval("netto", "<b>{0:C2}</b>") %>' />
|
||||
</asp:LinkButton></div></div><div class="row fontStd text-nowrap">
|
||||
<div class="col-xs-8 pRZero">
|
||||
<uc1:mod_barPlot runat="server" ID="mod_barPlotPag" elencoValori='<%# getBarData(Eval("totPagato"), Eval("totScadenze"), "greenBar", "redBar") %>' resolution="1" Visible='<%# showPagam %>' />
|
||||
<uc1:mod_barPlot runat="server" ID="mod_barPlotCostiAss" elencoValori='<%# getBarData(Eval("CostiAss"), Convert.ToDecimal(Eval("netto"))-Convert.ToDecimal(Eval("CostiAss")), "grayBar", "greenBar") %>' resolution="1" Visible='<%# showCosti %>' />
|
||||
</div>
|
||||
<div class="col-xs-4 pLZero text-right">
|
||||
<asp:Label ID="lblChiuso" runat="server" Text='<%# Eval("chiuso", "{0:dd MMM}") %>' ToolTip='<%# Eval("chiuso", "{0:yyyy.MM.dd}") %>' />
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row fontStd text-nowrap">
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="25%"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getFilt" TypeName="SteamWare.DS_BillingTableAdapters.DocumentiTableAdapter">
|
||||
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="DocumentiFilt" SelectCountMethod="DocumentiFiltCount" TypeName="MedAP_data.MedAPModel" EnablePaging="true">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfIdxCli" DefaultValue="0" Name="idxCli" PropertyName="Value" Type="Int32" />
|
||||
<asp:Parameter DefaultValue="0" Name="startRowIndex" Type="Int32" />
|
||||
<asp:Parameter DefaultValue="10" Name="maximumRows" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<%--<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getFilt" TypeName="SteamWare.DS_BillingTableAdapters.DocumentiTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfAnno" DefaultValue="0" Name="anno" PropertyName="Value" Type="Int32" />
|
||||
<asp:ControlParameter ControlID="hfIdxCli" DefaultValue="0" Name="idxCli" PropertyName="Value" Type="Int32" />
|
||||
@@ -77,7 +87,7 @@
|
||||
<asp:ControlParameter ControlID="hfAperta" DefaultValue="0" Name="aperta" PropertyName="Value" Type="Int32" />
|
||||
<asp:ControlParameter ControlID="hfSearch" DefaultValue="*" Name="search" PropertyName="Value" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</asp:ObjectDataSource>--%>
|
||||
<asp:HiddenField runat="server" ID="hfAnno" Value="0" />
|
||||
<asp:HiddenField runat="server" ID="hfIdxCli" Value="0" />
|
||||
<asp:HiddenField runat="server" ID="hfTipo" Value="*" />
|
||||
|
||||
@@ -15,7 +15,9 @@ namespace MedAP.WebUserControl
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
grView.Sort(sortParam, currSort);
|
||||
#if false
|
||||
grView.Sort(sortParam, currSort);
|
||||
#endif
|
||||
grView.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" id="divPeriodo" class="col-xs-12">
|
||||
<div runat="server" id="divPeriodo" class="col-xs-12" visible="false">
|
||||
<div class="input-group" style="width: 100%; margin: auto; padding-top: 2px; padding-bottom: 2px;" visible="false">
|
||||
<uc1:mod_selPeriodo runat="server" ID="mod_selPeriodo" />
|
||||
</div>
|
||||
|
||||
@@ -1,70 +1,58 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_testata.ascx.cs" Inherits="MedAP.WebUserControls.mod_testata" %>
|
||||
<%if (false)
|
||||
{ %>
|
||||
{ %>
|
||||
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
|
||||
<webopt:BundleReference ID="BundleReference2" runat="server" Path="~/Content/themes/base/css" />
|
||||
<%} %>
|
||||
|
||||
<div class="noShadows">
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li class="navbarSep">
|
||||
<asp:HyperLink runat="server" ID="hlHome" NavigateUrl="~/" CssClass="navbar-brand" ToolTip='<%# SteamWare.memLayer.ML.confReadString("titleApp") %>'> <i class="fa fa-home fa-lg"></i></asp:HyperLink>
|
||||
</li>
|
||||
<li class="active">
|
||||
<asp:LinkButton runat="server" ID="lbnUpdate" Text="---" OnClick="lbnUpdate_Click" ToolTip="Update"><%: nomePag %> <i class="fa-lg <%: cssIconPag %>"></i></asp:LinkButton>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="nav navbar-nav navbar-right">
|
||||
<button type="button" class="navbar-toggle navbar-right" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul id="itemPlaceholderContainer" runat="server" class="nav navbar-nav navbar-right">
|
||||
<asp:Repeater ID="menu" runat="server" DataSourceID="XmlMenu">
|
||||
<ItemTemplate>
|
||||
<li class="dropdown">
|
||||
<a href="." class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<i class='<%# XPath("@description")%>'></i>
|
||||
<%# XPath("@title")%>
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<asp:Repeater ID="voci" runat="server" DataSource='<%# XPathSelect("voce") %>'>
|
||||
<ItemTemplate>
|
||||
<li>
|
||||
<a href='<%# XPath("@url").ToString().Replace("~/","")%>'>
|
||||
<i class='<%# XPath("@description")%>'></i>
|
||||
<%# XPath("@title")%>
|
||||
</a>
|
||||
</li>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</ul>
|
||||
</li>
|
||||
</ItemTemplate>
|
||||
<SeparatorTemplate>
|
||||
</SeparatorTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:XmlDataSource ID="XmlMenu" runat="server" EnableCaching="false"></asp:XmlDataSource>
|
||||
<%--<li>
|
||||
<asp:TextBox ID="txtSearch" runat="server" CssClass="form-control input-sm search-query" placeholder="[S]earch" AutoPostBack="true" OnTextChanged="txtSearch_TextChanged" TextMode="Search" AccessKey="s" />
|
||||
</li>--%>
|
||||
</ul>
|
||||
</div>
|
||||
<!--/.nav-collapse -->
|
||||
<%--<div class="subnavbar" style="color: #999;">
|
||||
<div class="navbar-left">
|
||||
postazione: <%: SteamWare.memLayer.ML.StringSessionObj("postazione_name") %>
|
||||
</div>
|
||||
<div class="navbar-right">
|
||||
<asp:HyperLink runat="server" ID="hlLang" NavigateUrl="~/chLang"> <i class="fa fa-flag-checkered"></i> <%: string.Format("{0} - [{1}]", SteamWare.user_std.UtSn.CognomeNome, SteamWare.user_std.UtSn.lingua) %></asp:HyperLink>
|
||||
</div>
|
||||
</div>--%>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li class="navbarSep">
|
||||
<asp:HyperLink runat="server" ID="hlHome" NavigateUrl="~/" CssClass="navbar-brand" ToolTip='<%# SteamWare.memLayer.ML.confReadString("titleApp") %>'> <i class="fa fa-home fa-lg"></i></asp:HyperLink>
|
||||
</li>
|
||||
<li class="active">
|
||||
<asp:LinkButton runat="server" ID="lbnUpdate" Text="---" OnClick="lbnUpdate_Click" ToolTip="Update"><%: nomePag %> <i class="fa-lg <%: cssIconPag %>"></i></asp:LinkButton>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="nav navbar-nav navbar-right">
|
||||
<button type="button" class="navbar-toggle navbar-right" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul id="itemPlaceholderContainer" runat="server" class="nav navbar-nav navbar-right">
|
||||
<asp:Repeater ID="menu" runat="server" DataSourceID="XmlMenu">
|
||||
<ItemTemplate>
|
||||
<li class="dropdown">
|
||||
<a href="." class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<i class='<%# XPath("@description")%>'></i>
|
||||
<%# XPath("@title")%>
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<asp:Repeater ID="voci" runat="server" DataSource='<%# XPathSelect("voce") %>'>
|
||||
<ItemTemplate>
|
||||
<li>
|
||||
<a href='<%# XPath("@url").ToString().Replace("~/","")%>'>
|
||||
<i class='<%# XPath("@description")%>'></i>
|
||||
<%# XPath("@title")%>
|
||||
</a>
|
||||
</li>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</ul>
|
||||
</li>
|
||||
</ItemTemplate>
|
||||
<SeparatorTemplate>
|
||||
</SeparatorTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:XmlDataSource ID="XmlMenu" runat="server" EnableCaching="false"></asp:XmlDataSource>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2
-2
@@ -19,7 +19,7 @@
|
||||
<a href="DocArchive" class="shortcut">
|
||||
<i class="fa fa-book shortcut-icon"></i><span class="shortcut-label">Documenti/Fatture</span>
|
||||
</a>
|
||||
<a href="Pagamenti" class="shortcut">
|
||||
<%--<a href="Pagamenti" class="shortcut">
|
||||
<i class="fa fa-money shortcut-icon"></i><span class="shortcut-label">Pagamenti</span>
|
||||
</a>
|
||||
<a href="CostAss" class="shortcut">
|
||||
@@ -30,7 +30,7 @@
|
||||
</a>
|
||||
<a href="Clients" class="shortcut">
|
||||
<i class="fa fa-suitcase shortcut-icon"></i><span class="shortcut-label">Anag. Clienti</span>
|
||||
</a>
|
||||
</a>--%>
|
||||
<a href="VAT" class="shortcut">
|
||||
<i class="fa fa-ticket shortcut-icon"></i><span class="shortcut-label">Anag. IVA</span>
|
||||
</a>
|
||||
|
||||
Generated
+5
-5
@@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -114,7 +114,7 @@ namespace MedAP_data
|
||||
// refresh EF context
|
||||
((IObjectContextAdapter)ctx).ObjectContext.Refresh(RefreshMode.StoreWins, ctx.Clienti);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region funzioni Documenti
|
||||
@@ -169,6 +169,47 @@ namespace MedAP_data
|
||||
return query.Count();
|
||||
}
|
||||
/// <summary>
|
||||
/// elenco filtrato da parametro ricerca
|
||||
/// </summary>
|
||||
/// <param name="idxCli"></param>
|
||||
/// <param name="startRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<Documenti> DocumentiFilt(int idxCli, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Documenti> query;
|
||||
if (idxCli > 0)
|
||||
{
|
||||
query = ctx.Documenti.Where(s => s.idxCli == idxCli);
|
||||
}
|
||||
else
|
||||
{
|
||||
query = ctx.Documenti;
|
||||
}
|
||||
var result = from r in query.OrderByDescending(s => s.anno).ThenByDescending(s => s.num).Skip(startRowIndex).Take(maximumRows) select r;
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// elenco filtrato da parametro ricerca
|
||||
/// </summary>
|
||||
/// <param name="idxCli"></param>
|
||||
/// <param name="startRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static int DocumentiFiltCount(int idxCli, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Documenti> query;
|
||||
if (idxCli > 0)
|
||||
{
|
||||
query = ctx.Documenti.Where(s => s.idxCli == idxCli);
|
||||
}
|
||||
else
|
||||
{
|
||||
query = ctx.Documenti;
|
||||
}
|
||||
return query.Count();
|
||||
}
|
||||
/// <summary>
|
||||
/// Restituisce DOCUMENTO specifico
|
||||
/// </summary>
|
||||
/// <param name="idxDoc"></param>
|
||||
@@ -363,7 +404,7 @@ namespace MedAP_data
|
||||
{
|
||||
var result = from r in ctx.RowTemplate.OrderBy(s => s.Descrizione) select r;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user