cambio modalità passaggiod ate inizio/fine
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -194,6 +194,7 @@
|
||||
<Content Include="Print.aspx" />
|
||||
<Content Include="Projects.aspx" />
|
||||
<Content Include="Properties\PublishProfiles\DEMO-OVH.pubxml.user" />
|
||||
<Content Include="Rendiconti.aspx" />
|
||||
<Content Include="Scripts\bootstrap-toggle.js" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.woff2" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.woff" />
|
||||
@@ -367,6 +368,13 @@
|
||||
<Compile Include="Projects.aspx.designer.cs">
|
||||
<DependentUpon>Projects.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Rendiconti.aspx.cs">
|
||||
<DependentUpon>Rendiconti.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Rendiconti.aspx.designer.cs">
|
||||
<DependentUpon>Rendiconti.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SitePrint.Master.cs">
|
||||
<DependentUpon>SitePrint.Master</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
+9
-2
@@ -16,17 +16,24 @@ namespace MedAP
|
||||
string tipoDoc = memLayer.ML.QSS("tipoDoc");
|
||||
string titolo = "";
|
||||
// se vuoto --> fattura
|
||||
tipoDoc= tipoDoc=="" ? "FATT" : tipoDoc;
|
||||
tipoDoc = tipoDoc == "" ? "FATT" : tipoDoc;
|
||||
switch (tipoDoc)
|
||||
{
|
||||
case "GIORN":
|
||||
titolo = "GIORNALIERO";
|
||||
mod_giornaliero.Visible = true;
|
||||
mod_fattura.Visible = false;
|
||||
mod_giornaliero.showDetail = true;
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// controllo se hoh ho parametro inizio/fine metto anno corrente...
|
||||
mod_giornaliero.inizio = memLayer.ML.QSD("start");
|
||||
mod_giornaliero.fine = memLayer.ML.QSD("end");
|
||||
}
|
||||
break;
|
||||
case "FATT":
|
||||
default:
|
||||
titolo= memLayer.ML.QSS("idxDoc");
|
||||
titolo = memLayer.ML.QSS("idxDoc");
|
||||
mod_giornaliero.Visible = false;
|
||||
mod_fattura.Visible = true;
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Rendiconti.aspx.cs" Inherits="MedAP.Rendiconti" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControl/mod_giornaliero.ascx" TagPrefix="uc1" TagName="mod_giornaliero" %>
|
||||
<%@ Register Src="~/WebUserControl/mod_selPeriodo.ascx" TagPrefix="uc1" TagName="mod_selPeriodo" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="col-xs-12 text-center">
|
||||
<h1>RENDICONTI (Fatture)</h1>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<uc1:mod_selPeriodo runat="server" ID="mod_selPeriodo" autoUpdate="true" />
|
||||
</div>
|
||||
<div class="panel-body bg-default fontSmall">
|
||||
<uc1:mod_giornaliero runat="server" ID="mod_giornaliero" />
|
||||
</div>
|
||||
<div runat="server">
|
||||
apre PRINT
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MedAP
|
||||
{
|
||||
public partial class Rendiconti : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
mod_giornaliero.showDetail = false;
|
||||
mod_selPeriodo.eh_doUpdate += Mod_selPeriodo_eh_doUpdate;
|
||||
aggiornaDate();
|
||||
}
|
||||
|
||||
private void aggiornaDate()
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// controllo se hoh ho parametro inizio/fine metto anno corrente...
|
||||
mod_giornaliero.inizio = mod_selPeriodo.inizio;
|
||||
mod_giornaliero.fine = mod_selPeriodo.fine;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorno valori passati al modulo...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Mod_selPeriodo_eh_doUpdate(object sender, EventArgs e)
|
||||
{
|
||||
aggiornaDate();
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+33
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MedAP {
|
||||
|
||||
|
||||
public partial class Rendiconti {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_selPeriodo.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MedAP.WebUserControls.mod_selPeriodo mod_selPeriodo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_giornaliero.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MedAP.WebUserControl.mod_giornaliero mod_giornaliero;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_giornaliero.ascx.cs" Inherits="MedAP.WebUserControl.mod_giornaliero" %>
|
||||
|
||||
<div class="row">
|
||||
<div class="row" runat="server" id="divHead">
|
||||
<div class="col-xs-8 text-left">
|
||||
<div class="row">
|
||||
<h1>Registro Fatture Emesse</h1>
|
||||
<p class="small"><%: SteamWare.memLayer.ML.cdv("FATT_P2") %> - <%: SteamWare.memLayer.ML.cdv("FATT_P3") %> | <%: SteamWare.memLayer.ML.cdv("FATT_P4") %></p>
|
||||
<p class="small"><%: SteamWare.memLayer.ML.cdv("FATT_P2") %> - <%: SteamWare.memLayer.ML.cdv("FATT_P3") %> | <%: SteamWare.memLayer.ML.cdv("FATT_P4") %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right text-info">
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body bg-default fontStd">
|
||||
<div class="panel-body bg-default fontStd" runat="server" id="mainDet" visible='<%# showDetail %>'>
|
||||
<asp:HiddenField runat="server" ID="hfAnno" Value='<%# Eval("anno") %>' />
|
||||
<asp:HiddenField runat="server" ID="hfMese" Value='<%# Eval("mese") %>' />
|
||||
<asp:Repeater runat="server" ID="repDay" DataSourceID="odsDay">
|
||||
@@ -70,8 +70,7 @@
|
||||
<%# Eval("tipo") %>
|
||||
</div>
|
||||
<div class="col-xs-2 text-left">
|
||||
<b><%# Eval("num") %></b>/<%# Eval("anno") %>
|
||||
</div>
|
||||
<b><%# Eval("num") %></b>/<%# Eval("anno") %></div>
|
||||
<div class="col-xs-6 text-left">
|
||||
<b><%# Eval("RagSoc") %></b>
|
||||
</div>
|
||||
@@ -152,6 +151,13 @@
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:ObjectDataSource runat="server" ID="odsMonth" SelectMethod="ResocontoMensile" TypeName="MedAP_data.MedAPModel" OldValuesParameterFormatString="original_{0}" />
|
||||
<asp:ObjectDataSource runat="server" ID="odsMonth" SelectMethod="ResocontoMensile" TypeName="MedAP_data.MedAPModel" OldValuesParameterFormatString="original_{0}">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfInizio" DefaultValue="" Name="inizio" PropertyName="Value" Type="DateTime" />
|
||||
<asp:ControlParameter ControlID="hfFine" DefaultValue="" Name="fine" PropertyName="Value" Type="DateTime" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfInizio" />
|
||||
<asp:HiddenField runat="server" ID="hfFine" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
@@ -9,9 +10,60 @@ namespace MedAP.WebUserControl
|
||||
{
|
||||
public partial class mod_giornaliero : System.Web.UI.UserControl
|
||||
{
|
||||
protected bool _showDetail = false;
|
||||
/// <summary>
|
||||
/// definisce se mostrare dettaglio giornaliero
|
||||
/// </summary>
|
||||
public bool showDetail
|
||||
{
|
||||
get
|
||||
{
|
||||
return _showDetail;
|
||||
}
|
||||
set
|
||||
{
|
||||
_showDetail = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Inizio periodo da visualizzare
|
||||
/// </summary>
|
||||
public DateTime inizio
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Today;
|
||||
DateTime.TryParse(hfInizio.Value, out answ);
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfInizio.Value = value.ToShortDateString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Fine periodo da visualizzare
|
||||
/// </summary>
|
||||
public DateTime fine
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Today;
|
||||
DateTime.TryParse(hfFine.Value, out answ);
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfFine.Value = value.ToShortDateString();
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
// dati chiamata come
|
||||
// Print?tipoDoc=GIORN&start=2018-01-01&end=2018-02-28
|
||||
|
||||
divHead.Visible = showDetail;
|
||||
}
|
||||
|
||||
public string meseFromInt(object _num)
|
||||
|
||||
@@ -12,6 +12,15 @@ namespace MedAP.WebUserControl {
|
||||
|
||||
public partial class mod_giornaliero {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divHead.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divHead;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo repMonth.
|
||||
/// </summary>
|
||||
@@ -29,5 +38,23 @@ namespace MedAP.WebUserControl {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsMonth;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfInizio.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfInizio;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfFine.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfFine;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -649,6 +649,16 @@ namespace MedAP_data
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<ResMens> ResocontoMensile(DateTime inizio, DateTime fine)
|
||||
{
|
||||
// se fossero nulli prendo anno corrente...
|
||||
if (inizio == null || inizio.Ticks == 0)
|
||||
{
|
||||
DateTime oggi = DateTime.Today;
|
||||
inizio = oggi.AddDays(1 - oggi.DayOfYear);
|
||||
}
|
||||
if (fine == null || fine.Ticks == 0)
|
||||
{
|
||||
fine = inizio.AddYears(1);
|
||||
}
|
||||
// chiano stored!
|
||||
var answ = ctx.stp_ResMensFilt(inizio, fine);
|
||||
// cast...
|
||||
@@ -683,19 +693,15 @@ namespace MedAP_data
|
||||
/// <summary>
|
||||
/// elenco filtrato da parametro ricerca
|
||||
/// </summary>
|
||||
/// <param name="inizio"></param>
|
||||
/// <param name="fine"></param>
|
||||
/// <param name="anno"></param>
|
||||
/// <param name="mese"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<ResGiorn> ResocontoGiornalieroMonth(int anno, int mese)
|
||||
{
|
||||
DateTime inizio, fine;
|
||||
inizio = Convert.ToDateTime(string.Format("{0}-{1}-01", anno, mese));
|
||||
fine = inizio.AddMonths(1);
|
||||
// chiano stored!
|
||||
var answ = ctx.stp_ResGiornFilt(inizio, fine);
|
||||
// cast...
|
||||
var outAnsw = (IEnumerable<ResGiorn>)answ;
|
||||
return outAnsw;
|
||||
return ResocontoGiornaliero(inizio, fine);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user