From 7bc4eca2fdb802c84ac04732ca042b2102c8f760 Mon Sep 17 00:00:00 2001 From: samuele Date: Tue, 10 Feb 2009 10:08:35 +0000 Subject: [PATCH] - corretto errore calcolo "modulo" della divisione - corretto periodo mostrato con selettore periodo git-svn-id: https://keyhammer.ath.cx/svn/WebGIM/trunk@85 3e04ef4b-3b25-4b6c-be27-bb5389ca777b --- WebSites/WebGIM/App_Code/WebGimUtils.cs | 4 ++-- WebSites/WebGIM/mod_menuBottom.ascx | 2 +- WebSites/WebGIM/mod_periodoAnalisi.ascx | 6 +++--- WebSites/WebGIM/mod_periodoAnalisi.ascx.cs | 9 +++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/WebSites/WebGIM/App_Code/WebGimUtils.cs b/WebSites/WebGIM/App_Code/WebGimUtils.cs index 0b42ba1..fda93ff 100644 --- a/WebSites/WebGIM/App_Code/WebGimUtils.cs +++ b/WebSites/WebGIM/App_Code/WebGimUtils.cs @@ -33,8 +33,8 @@ public class WebGimUtils int ggSett = (int)periodo.inizio.DayOfWeek; for (int i = 0; i < numGgRimanenti; i++) { - // il primo giorno è pari al giorno iniziale... - answ = answ + (double)tabOre[i + ggSett].apertura; + // il primo giorno è pari al giorno iniziale... e poi calcolo il "modulo" a 7 (con "%") + answ = answ + (double)tabOre[(i + ggSett)%7].apertura; } // cerco eventuali festività che cadano nel periodo e le tolgo foreach (DS_applicazione.CalendFesteFerieRow riga in tabCalFF) diff --git a/WebSites/WebGIM/mod_menuBottom.ascx b/WebSites/WebGIM/mod_menuBottom.ascx index f6cd813..afdffe1 100644 --- a/WebSites/WebGIM/mod_menuBottom.ascx +++ b/WebSites/WebGIM/mod_menuBottom.ascx @@ -1,4 +1,4 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeFile="mod_menuBottom.ascx.cs" Inherits="mod_menuBottom" %> -76 - +84 - diff --git a/WebSites/WebGIM/mod_periodoAnalisi.ascx b/WebSites/WebGIM/mod_periodoAnalisi.ascx index 76fcec0..62a49a3 100644 --- a/WebSites/WebGIM/mod_periodoAnalisi.ascx +++ b/WebSites/WebGIM/mod_periodoAnalisi.ascx @@ -2,17 +2,17 @@ Inherits="mod_periodoAnalisi" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
-
+
-
+
-
+