prima release con redirect pagina x creazione nuovi eventi!!!
This commit is contained in:
Binary file not shown.
@@ -8,6 +8,7 @@
|
||||
<add key="remoteCliUrl" value="http://webscr.steamware.net/Rigamonti/Upload/Client" />
|
||||
<add key="debugMode" value="false" />
|
||||
<add key="logFull" value="false" />
|
||||
<add key ="svuotaMatrOp" value="true"/>
|
||||
<!--connessione su un MDB di cui esiste un DSN-->
|
||||
<!--<add key="connString" value="Dsn=DB_Sigla32;Initial Catalog=TESDOCUM;" />-->
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<add key="remoteCliUrl" value="http://webscr.steamware.net/Rigamonti/Upload/Client" />
|
||||
<add key="debugMode" value="false" />
|
||||
<add key="logFull" value="false" />
|
||||
<add key ="svuotaMatrOp" value="true"/>
|
||||
<!--connessione su un MDB di cui esiste un DSN-->
|
||||
<!--<add key="connString" value="Dsn=DB_Sigla32;Initial Catalog=TESDOCUM;" />-->
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
|
||||
@@ -17,7 +17,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
|
||||
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>True</EnableMSDeployBackup>
|
||||
<UserName>steamwarewin\administrator</UserName>
|
||||
<UserName>steamw\administrator</UserName>
|
||||
<_SavePWD>True</_SavePWD>
|
||||
<PublishDatabaseSettings>
|
||||
<Objects xmlns="">
|
||||
@@ -53,6 +53,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
|
||||
</ObjectGroup>
|
||||
</Objects>
|
||||
</PublishDatabaseSettings>
|
||||
<ADUsesOwinOrOpenIdConnect>False</ADUsesOwinOrOpenIdConnect>
|
||||
<PrecompileBeforePublish>True</PrecompileBeforePublish>
|
||||
<EnableUpdateable>True</EnableUpdateable>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
|
||||
@@ -6,6 +6,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAWrMOGKZ5+kG5PChtPELSKAAAAAACAAAAAAADZgAAwAAAABAAAADQqGyYdt8WVYiVevOHwQtrAAAAAASAAACgAAAAEAAAADa0EE6ZGibAVouh3p25mB4YAAAAM64tMTOGJ0cuNUUqtsZ6MStSH4RpeVk5FAAAALyd/yM2g5QR/onffXHWuHMCs+5/</EncryptedPassword>
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA7gr2JUxpGk+kgETgdPCX3gAAAAACAAAAAAADZgAAwAAAABAAAAAcaNv8rWW21TzVz3OKj8mnAAAAAASAAACgAAAAEAAAAHItJ+1D4HCNvqgCJspNTsEYAAAAUyPc3cR2ToKbCtgrZjIBLAg3zdpVrG0bFAAAANcahGf6d97F5Y5s2y/xPrj2qcEa</EncryptedPassword>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -65,6 +65,7 @@
|
||||
</system.Web>
|
||||
-->
|
||||
<system.web>
|
||||
<globalization culture="it-it"/>
|
||||
<compilation debug="true" targetFramework="4.5">
|
||||
<assemblies>
|
||||
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>WinLab-Rigamonti</NameOfLastUsedPublishProfile>
|
||||
<NameOfLastUsedPublishProfile>IIS02</NameOfLastUsedPublishProfile>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<div class="ui-block-b" style="text-align:center; margin: auto;">
|
||||
<div class="flLeft" style="font-size: 0.80em; width: 60%;">
|
||||
<asp:TextBox runat="server" ID="txtCerca" placeholder="Ricerca OC/DC" AutoPostBack="true" OnTextChanged="txtCerca_TextChanged" />
|
||||
<asp:RequiredFieldValidator runat="server" ID="rfvDoc" ControlToValidate="txtCerca" ErrorMessage="!!!" ForeColor="Red" />
|
||||
</div>
|
||||
<div class="flLeft" style="font-size: 0.80em; width: 40%;">
|
||||
<asp:DropDownList runat="server" ID="ddlAnno" DataSourceID="odsAnno" DataTextField="label" DataValueField="value" AutoPostBack="True" OnSelectedIndexChanged="ddlAnno_SelectedIndexChanged" Font-Size="0.9em"></asp:DropDownList>
|
||||
|
||||
@@ -30,15 +30,6 @@ namespace WebSCR.WebUserControls {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtCerca;
|
||||
|
||||
/// <summary>
|
||||
/// rfvDoc 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 rfvDoc;
|
||||
|
||||
/// <summary>
|
||||
/// ddlAnno control.
|
||||
/// </summary>
|
||||
|
||||
@@ -6,7 +6,11 @@
|
||||
<script type="text/javascript">
|
||||
function eventClick(e) {
|
||||
//alert('Event with id ' + e.id() + ' was selected.');
|
||||
document.location = '<%= SteamWare.devicesAuthProxy.pagCorrente %>?CodCliente=<%= this.CodCliente %>&Indir=<%= this.Indir %>&Data=<%= this.Data %>&IdxImpegno=' + e.id();
|
||||
document.location = '<%= SteamWare.devicesAuthProxy.pagCorrente %>?Action=EDIT&CodCliente=<%= this.CodCliente %>&Indir=<%= this.Indir %>&Data=<%= this.Data %>&IdxImpegno=' + e.id();
|
||||
}
|
||||
function newRange(start,end) {
|
||||
//alert('Event with id ' + e.id() + ' was selected.');
|
||||
document.location = '<%= SteamWare.devicesAuthProxy.pagCorrente %>?Action=NEW&Data=<%= this.Data %>&codSquadra=<%= this.codSquadra %>&currDoc=<%= this.currDoc %>&matrOp=<%= this.matrOp %>&start=' + start + '&end=' + end;
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -29,17 +33,16 @@
|
||||
BusinessEndsHour="22"
|
||||
ShowEventStartEnd="True"
|
||||
CellHeight="15"
|
||||
TimeRangeSelectedHandling="CallBack"
|
||||
TimeRangeSelectedHandling="JavaScript"
|
||||
EventMoveHandling="CallBack"
|
||||
EventClickHandling="JavaScript"
|
||||
EventClickJavaScript="eventClick(e)"
|
||||
Theme="calendar_white"
|
||||
OnBeforeEventRender="DayPilotCalendar1_BeforeEventRender"
|
||||
OnEventClick="DayPilotCalendar1_EventClick"
|
||||
Width="95%"
|
||||
HourFontSize="6"
|
||||
DayFontSize="8pt"
|
||||
EventFontSize="7pt" Days="5"></DayPilot:DayPilotCalendar>
|
||||
EventFontSize="7pt" Days="5" OnEventClick="DayPilotCalendar1_EventClick" OnEventMove="DayPilotCalendar1_EventMove" OnTimeRangeSelected="DayPilotCalendar1_TimeRangeSelected" TimeRangeSelectedJavaScript="newRange(start,end)"></DayPilot:DayPilotCalendar>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByDate" TypeName="WebSCR_data.DS_ApplicazioneTableAdapters.v_ImpegniCalTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="lblData" Name="Data" PropertyName="Text" Type="DateTime" />
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace WebSCR.WebUserControls
|
||||
{
|
||||
return memLayer.ML.QSS(nome);
|
||||
}
|
||||
void DayPilotCalendar1_EventMove(object sender, DayPilot.Web.Ui.Events.EventMoveEventArgs e)
|
||||
protected void DayPilotCalendar1_EventMove(object sender, DayPilot.Web.Ui.Events.EventMoveEventArgs e)
|
||||
{
|
||||
// sposto evento!
|
||||
DtProxy.man.taImp.updStart(Convert.ToInt32(e.Id), e.NewStart);
|
||||
@@ -122,12 +122,8 @@ namespace WebSCR.WebUserControls
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void DayPilotCalendar1_TimeRangeSelected(object sender, DayPilot.Web.Ui.Events.TimeRangeSelectedEventArgs e)
|
||||
protected void DayPilotCalendar1_TimeRangeSelected(object sender, DayPilot.Web.Ui.Events.TimeRangeSelectedEventArgs e)
|
||||
{
|
||||
// se ho 1 sola squadra selezionata...
|
||||
//if(rblSquadre.SelectedIndex >= 0)
|
||||
//if (mod_selSquadre.selected.Count == 1)
|
||||
|
||||
// verifico di avere la squadra selezionata...
|
||||
if (memLayer.ML.StringSessionObj("elencoSquadre").Length > 0)
|
||||
{
|
||||
@@ -150,10 +146,12 @@ namespace WebSCR.WebUserControls
|
||||
memLayer.ML.emptySessionVal("currDoc");
|
||||
// rimuovo matrOp
|
||||
memLayer.ML.emptySessionVal("matrOp");
|
||||
// segno refresh FULL necessario
|
||||
needRefresh = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
errMessGiorn = "Prego indicare coducmento OC/DC per procedere";
|
||||
errMessGiorn = "Prego indicare documento OC/DC per procedere";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -167,6 +165,20 @@ namespace WebSCR.WebUserControls
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta refresh COMPLETO della pagina
|
||||
/// </summary>
|
||||
public bool needRefresh
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.BoolSessionObj("needRefresh");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("needRefresh", value);
|
||||
}
|
||||
}
|
||||
|
||||
public void doUpdate()
|
||||
{
|
||||
@@ -224,11 +236,33 @@ namespace WebSCR.WebUserControls
|
||||
{ }
|
||||
}
|
||||
|
||||
public string matrOp
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("matrOp");
|
||||
}
|
||||
}
|
||||
public string currDoc
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currDoc");
|
||||
}
|
||||
}
|
||||
public string codSquadra
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("elencoSquadre").Split(',')[0].ToString();
|
||||
}
|
||||
}
|
||||
protected void DayPilotCalendar1_EventClick(object sender, DayPilot.Web.Ui.Events.EventClickEventArgs e)
|
||||
{
|
||||
#if false
|
||||
Response.Redirect(string.Format("{0}?CodCliente={1}&Indir={2}&Data={3:yyyy-MM-dd}&IdxImpegno={4}", devicesAuthProxy.pagCorrente, qsVal("CodCliente"), qsVal("Indir"), qsVal("Data"), e.Id));
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,62 +10,79 @@
|
||||
<%@ Register Src="~/WebUserControls/mod_fileImpegno.ascx" TagPrefix="uc1" TagName="mod_fileImpegno" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_fileUpload.ascx" TagPrefix="uc1" TagName="mod_fileUpload" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_compSquadra.ascx" TagPrefix="uc1" TagName="mod_compSquadra" %>
|
||||
<script type="text/javascript">
|
||||
function bindEvents() {
|
||||
$("#<%=upnTestata.ClientID%>").trigger("create");
|
||||
}
|
||||
|
||||
<div class="ui-grid-b ui-mini noShadows">
|
||||
<div class="ui-block-a ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
|
||||
<div class="tStrong">Ricerca per Documento</div>
|
||||
<uc1:mod_filtroZona runat="server" ID="mod_filtroZona" />
|
||||
</div>
|
||||
<div class="ui-block-b ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
|
||||
<div class="tStrong">Matr. Operatore</div>
|
||||
<div style="width: 80%; margin: auto;">
|
||||
<asp:TextBox runat="server" ID="txtMatrOp" AutoPostBack="true" OnTextChanged="txtMatrOp_TextChanged" />
|
||||
<asp:RequiredFieldValidator runat="server" ID="rfvDoc" ControlToValidate="txtMatrOp" ErrorMessage="!!!" ForeColor="Red" />
|
||||
bindEvents();
|
||||
|
||||
//Re-bind for callbacks
|
||||
var prm = Sys.WebForms.PageRequestManager.getInstance();
|
||||
prm.add_endRequest(function () {
|
||||
bindEvents();
|
||||
});
|
||||
</script>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="upnTestata" UpdateMode="Always">
|
||||
<ContentTemplate>
|
||||
<div class="ui-grid-b ui-mini noShadows">
|
||||
<div class="ui-block-a ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
|
||||
<div class="tStrong">Ricerca per Documento</div>
|
||||
<uc1:mod_filtroZona runat="server" ID="mod_filtroZona" />
|
||||
</div>
|
||||
<div class="ui-block-b ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
|
||||
<div class="tStrong">Matr. Operatore</div>
|
||||
<div style="width: 80%; margin: auto;">
|
||||
<asp:TextBox runat="server" ID="txtMatrOp" AutoPostBack="true" OnTextChanged="txtMatrOp_TextChanged" />
|
||||
<asp:Label runat="server" ID="lblWarning" ForeColor="Red"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-c ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
|
||||
<div class="tStrong">Ricerca per Periodo</div>
|
||||
<uc1:mod_filtroPeriodo runat="server" ID="mod_filtroPeriodo" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-c ui-corner-all" style="text-align: center; margin: auto; font-size: 0.9em; border: 1px solid #CDCDCD; min-height: 80px; background-color: #EAEAFF;">
|
||||
<div class="tStrong">Ricerca per Periodo</div>
|
||||
<uc1:mod_filtroPeriodo runat="server" ID="mod_filtroPeriodo" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-mini" style="width: 100%; margin: -2px -4px; text-align: center;">
|
||||
<div style="width: 90%; float: left; text-align: center; margin: auto;">
|
||||
<uc1:mod_selSquadre runat="server" ID="mod_selSquadre" />
|
||||
</div>
|
||||
<div style="width: 10%; float: right; text-align: center; margin: auto; min-width: 80px;">
|
||||
<asp:LinkButton runat="server" ID="lbLess" OnClick="lbLess_Click"><i class="fa fa-minus-square fa-2x"></i></asp:LinkButton>
|
||||
|
||||
<div class="ui-mini" style="width: 100%; margin: -2px -4px; text-align: center;">
|
||||
<div style="width: 90%; float: left; text-align: center; margin: auto;">
|
||||
<uc1:mod_selSquadre runat="server" ID="mod_selSquadre" />
|
||||
</div>
|
||||
<div style="width: 10%; float: right; text-align: center; margin: auto; min-width: 80px;">
|
||||
<asp:LinkButton runat="server" ID="lbLess" OnClick="lbLess_Click"><i class="fa fa-minus-square fa-2x"></i></asp:LinkButton>
|
||||
|
||||
<asp:LinkButton runat="server" ID="lbMore" OnClick="lbMore_Click"><i class="fa fa-plus-square fa-2x"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-mini noShadows" style="width: 100%;">
|
||||
<div style="min-width: 85px; width: 20%; float: left;">
|
||||
<uc1:mod_dispPeriodo runat="server" ID="mod_dispPeriodo" />
|
||||
</div>
|
||||
<div style="width: 80%; float: right;">
|
||||
<uc1:mod_giornata runat="server" ID="mod_giornata" />
|
||||
<div style="width: 100%;">
|
||||
<div style="width: 75%; float: left;">
|
||||
<div data-role="listview" data-inset="true">
|
||||
<div class="ui-field-contain">
|
||||
<uc1:mod_impegno runat="server" ID="mod_impegno" />
|
||||
</div>
|
||||
<div class="ui-body">
|
||||
<uc1:mod_dettInt runat="server" ID="mod_dettInt" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 25%; float: right;">
|
||||
<div data-role="listview" data-inset="true">
|
||||
<div class="ui-body">
|
||||
<uc1:mod_compSquadra runat="server" ID="mod_compSquadra" />
|
||||
</div>
|
||||
<div class="ui-mini noShadows" style="width: 100%;">
|
||||
<div style="min-width: 85px; width: 20%; float: left;">
|
||||
<uc1:mod_dispPeriodo runat="server" ID="mod_dispPeriodo" />
|
||||
</div>
|
||||
<div style="width: 80%; float: right;">
|
||||
<uc1:mod_giornata runat="server" ID="mod_giornata" />
|
||||
<div style="width: 100%;">
|
||||
<div style="width: 75%; float: left;">
|
||||
<div data-role="listview" data-inset="true">
|
||||
<div class="ui-field-contain">
|
||||
<uc1:mod_impegno runat="server" ID="mod_impegno" />
|
||||
</div>
|
||||
<div class="ui-body">
|
||||
<uc1:mod_dettInt runat="server" ID="mod_dettInt" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-body">
|
||||
<uc1:mod_fileImpegno runat="server" ID="mod_fileImpegno" />
|
||||
<uc1:mod_fileUpload runat="server" ID="mod_fileUpload" enableMod="false" />
|
||||
<div style="width: 25%; float: right;">
|
||||
<div data-role="listview" data-inset="true">
|
||||
<div class="ui-body">
|
||||
<uc1:mod_compSquadra runat="server" ID="mod_compSquadra" />
|
||||
</div>
|
||||
<div class="ui-body">
|
||||
<uc1:mod_fileImpegno runat="server" ID="mod_fileImpegno" />
|
||||
<uc1:mod_fileUpload runat="server" ID="mod_fileUpload" enableMod="false" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -25,6 +25,11 @@ namespace WebSCR.WebUserControls
|
||||
mod_filtroPeriodo.numGG = memLayer.ML.confReadInt("numGgDef");
|
||||
// reimposto selezione squadre...
|
||||
mod_selSquadre.selezionaDaSession();
|
||||
// se c'è imposto matricola...
|
||||
if (matrOp != "")
|
||||
{
|
||||
txtMatrOp.Text = matrOp;
|
||||
}
|
||||
refreshDetail();
|
||||
}
|
||||
mod_filtroZona.eh_selIndir += mod_filtroZona_eh_selIndir;
|
||||
@@ -56,7 +61,6 @@ namespace WebSCR.WebUserControls
|
||||
catch
|
||||
{ }
|
||||
Response.Redirect(string.Format("{0}?Data={1:yyyy-MM-dd}", devicesAuthProxy.pagCorrente, adesso));
|
||||
//refreshDetail();
|
||||
}
|
||||
/// <summary>
|
||||
/// recupera valore querystring
|
||||
@@ -85,6 +89,48 @@ namespace WebSCR.WebUserControls
|
||||
mod_fileImpegno.Visible = false;
|
||||
mod_fileUpload.Visible = false;
|
||||
mod_compSquadra.Visible = false;
|
||||
|
||||
|
||||
|
||||
// 2016.01.20 controllo tipo azione: new/edit/...
|
||||
if (qsVal("Action") == "NEW")
|
||||
{
|
||||
// creo NUOVO impegno
|
||||
creaImpegno();
|
||||
|
||||
// ricarico!!!
|
||||
Response.Redirect(devicesAuthProxy.pagCorrente);
|
||||
}
|
||||
else if (qsVal("Action") == "EDIT")
|
||||
{
|
||||
// controllo
|
||||
if (qsVal("Data") != "")
|
||||
{
|
||||
if (qsVal("IdxImpegno") != "")
|
||||
{
|
||||
// salvo parametri in sessione
|
||||
saveSessParam();
|
||||
|
||||
mod_impegno.Visible = true;
|
||||
mod_dettInt.Visible = true;
|
||||
mod_fileImpegno.Visible = true;
|
||||
mod_fileUpload.Visible = true;
|
||||
mod_compSquadra.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mod_giornata.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// mostro giornata
|
||||
mod_giornata.Visible = true;
|
||||
}
|
||||
|
||||
|
||||
#if false
|
||||
if (qsVal("Data") != "")
|
||||
{
|
||||
if (qsVal("IdxImpegno") != "")
|
||||
@@ -102,6 +148,152 @@ namespace WebSCR.WebUserControls
|
||||
{
|
||||
mod_giornata.Visible = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// anno selezionato
|
||||
/// </summary>
|
||||
public int yearSel
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = DateTime.Now.Year;
|
||||
if (memLayer.ML.isInSessionObject("yearSel"))
|
||||
{
|
||||
answ = memLayer.ML.IntSessionObj("yearSel");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
public string codSquadra
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("elencoSquadre").Split(',')[0].ToString();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
public string matrOp
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("matrOp");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
public string currDoc
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("currDoc");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// genera un nuovo impegno (oppure mostra warning...)
|
||||
/// </summary>
|
||||
private void creaImpegno()
|
||||
{
|
||||
string errMessGiorn = "";
|
||||
if (codSquadra != "")
|
||||
{
|
||||
// verifico di avere MatrOP selezionata
|
||||
if (matrOp != "")
|
||||
{
|
||||
// verifico di avere DOC selezionato...
|
||||
if (currDoc != "")
|
||||
{
|
||||
DateTime inizio = DateTime.Now;
|
||||
DateTime adesso = inizio;
|
||||
try
|
||||
{
|
||||
inizio = Convert.ToDateTime(qsVal("start"));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (inizio != adesso)
|
||||
{
|
||||
|
||||
#if false
|
||||
// recupero OC se in sessione...
|
||||
string doc = memLayer.ML.StringSessionObj("currDoc");
|
||||
// tolto doc default a zero...
|
||||
//if (doc == "") doc = "OC00000000";
|
||||
// prendo la squadra selezionata
|
||||
//string squadra = mod_selSquadre.selected[0].ToString();
|
||||
string squadra = memLayer.ML.StringSessionObj("elencoSquadre").Split(',')[0].ToString();
|
||||
// selezionato periodo, salvo evento inizio...
|
||||
DtProxy.man.taImp.insertQuery(inizio, "INDIC", squadra, doc, yearSel);
|
||||
#endif
|
||||
// selezionato periodo, salvo evento inizio...
|
||||
DtProxy.man.taImp.insertQuery(inizio, "INDIC", codSquadra, currDoc, yearSel);
|
||||
// consumo il doc selezionato e quindi rimuovo da sessione...
|
||||
memLayer.ML.emptySessionVal("currDoc");
|
||||
if (memLayer.ML.confReadBool("svuotaMatrOp"))
|
||||
{
|
||||
// rimuovo matrOp
|
||||
memLayer.ML.emptySessionVal("matrOp");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errMessGiorn = "Prego indicare inizio attività per procedere";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errMessGiorn = "Prego indicare documento OC/DC per procedere";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errMessGiorn = "Prego indicare Matricola Operatore per procedere";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errMessGiorn = "Prego selezionare UNA squadra per procedere";
|
||||
}
|
||||
lblWarning.Text = errMessGiorn;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// reset dati documento e matricola (se richiesto)
|
||||
/// </summary>
|
||||
private void resetDocMatr()
|
||||
{
|
||||
if (needRefresh)
|
||||
{
|
||||
// se è vuoto doc resetto...
|
||||
if (!memLayer.ML.isInSessionObject("currDoc"))
|
||||
{
|
||||
mod_filtroZona.doUpdate();
|
||||
}
|
||||
|
||||
// update matrOp...
|
||||
txtMatrOp.Text = memLayer.ML.StringSessionObj("matrOp");
|
||||
needRefresh = false;
|
||||
//txtMatrOp.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,6 +335,7 @@ namespace WebSCR.WebUserControls
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// nuovo record impegno...
|
||||
/// </summary>
|
||||
@@ -160,6 +353,7 @@ namespace WebSCR.WebUserControls
|
||||
void mod_filtroZona_eh_selIndir(object sender, EventArgs e)
|
||||
{
|
||||
refreshDetail();
|
||||
mod_giornata.doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// refresh detail
|
||||
@@ -188,17 +382,26 @@ namespace WebSCR.WebUserControls
|
||||
mod_impegno.doUpdate();
|
||||
mod_dettInt.doUpdate();
|
||||
|
||||
// se è vuoto doc resetto...
|
||||
if (!memLayer.ML.isInSessionObject("currDoc"))
|
||||
{
|
||||
mod_filtroZona.doUpdate();
|
||||
}
|
||||
|
||||
// update matrOp...
|
||||
txtMatrOp.Text = memLayer.ML.StringSessionObj("matrOp");
|
||||
txtMatrOp.DataBind();
|
||||
#if false
|
||||
// check reset data
|
||||
resetDocMatr();
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// richiesta refresh COMPLETO della pagina
|
||||
/// </summary>
|
||||
public bool needRefresh
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.BoolSessionObj("needRefresh");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("needRefresh", value);
|
||||
}
|
||||
}
|
||||
protected void lbLess_Click(object sender, EventArgs e)
|
||||
{
|
||||
int days = mod_giornata.day2show;
|
||||
@@ -230,27 +433,22 @@ namespace WebSCR.WebUserControls
|
||||
if (txtMatrOp.Text.Trim() != "")
|
||||
{
|
||||
memLayer.ML.setSessionVal("matrOp", txtMatrOp.Text.Trim());
|
||||
mod_giornata.doUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
memLayer.ML.emptySessionVal("matrOp");
|
||||
}
|
||||
}
|
||||
#if false
|
||||
/// <summary>
|
||||
/// matricola oepratore selezionata
|
||||
/// </summary>
|
||||
protected string matrOp
|
||||
|
||||
protected override void OnUnload(EventArgs e)
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("matrOp");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("matrOp", value);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
base.OnUnload(e);
|
||||
|
||||
// check reset data
|
||||
resetDocMatr();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+11
-2
@@ -12,6 +12,15 @@ namespace WebSCR.WebUserControls {
|
||||
|
||||
public partial class mod_pianificazione {
|
||||
|
||||
/// <summary>
|
||||
/// upnTestata 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 upnTestata;
|
||||
|
||||
/// <summary>
|
||||
/// mod_filtroZona control.
|
||||
/// </summary>
|
||||
@@ -31,13 +40,13 @@ namespace WebSCR.WebUserControls {
|
||||
protected global::System.Web.UI.WebControls.TextBox txtMatrOp;
|
||||
|
||||
/// <summary>
|
||||
/// rfvDoc control.
|
||||
/// lblWarning 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 rfvDoc;
|
||||
protected global::System.Web.UI.WebControls.Label lblWarning;
|
||||
|
||||
/// <summary>
|
||||
/// mod_filtroPeriodo control.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -65,6 +65,7 @@
|
||||
</system.Web>
|
||||
-->
|
||||
<system.web>
|
||||
<globalization culture="it-it"/>
|
||||
<compilation debug="true" targetFramework="4.5">
|
||||
<assemblies>
|
||||
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user