diff --git a/Data/ActionUserControl.cs b/Data/ActionUserControl.cs
index 14bd9d8..ca05680 100644
--- a/Data/ActionUserControl.cs
+++ b/Data/ActionUserControl.cs
@@ -85,6 +85,22 @@ namespace Data
}
}
///
+ /// Record della richiesta SPECIFICATA
+ ///
+ ///
+ ///
+ protected DS_app.ElencolRichRow ER_spec(int idxRich)
+ {
+ DS_app.ElencolRichRow answ = null;
+ try
+ {
+ answ = DtProxy.man.taElRich.getByKey(idxRich)[0];
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
/// Restituisce il record dati del fornitore richiesto
///
///
@@ -112,7 +128,7 @@ namespace Data
///
/// Nuovo stato da assegnare alla richiesta (se -9999 = NON FA NULLA)
/// Necessario fare redirect/reload pagina?
- public void eseguiAzioneIdxich(int idxRich, string oggetto, string bodyTpl, string codAzione, int idxStato, bool doRedirect, bool notifyAmm, bool notifyB2BC)
+ public void eseguiAzioneIdxRich(int idxRich, string oggetto, string bodyTpl, string codAzione, int idxStato, bool doRedirect, bool notifyAmm, bool notifyB2BC)
{
var riga = DtProxy.man.taElRich.getByKey(idxRich)[0];
saveDataSendEMail(oggetto, bodyTpl, codAzione, idxStato, doRedirect, notifyAmm, notifyB2BC, riga);
@@ -428,7 +444,8 @@ namespace Data
/// idxRichiesta
public void doAmmTask(string codAzione, int idxStato, int idxRich)
{
- var riga = ER_curr;
+ // recupero dati della richiesta SPECIFICATA
+ var riga = ER_spec(idxRich);
if (riga != null)
{
// recupero fornitore...
@@ -446,7 +463,7 @@ namespace Data
"Il condominio interessato è {0}, pregasi contattare {1} al numero {2}.
" +
"La richiesta indicata è la seguente:
{3}
" +
"Seguire il link seguente per maggiori informazioni.";
- eseguiAzioneIdxich(idxRich, oggetto, bodyTpl, codAzione, idxStato, true, true, true);
+ eseguiAzioneIdxRich(idxRich, oggetto, bodyTpl, codAzione, idxStato, true, true, true);
}
}
}
diff --git a/Jenkinsfile b/Jenkinsfile
index 8e84ab2..5c4e40f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,7 +17,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=177']) {
+ withEnv(['NEXT_BUILD_NUMBER=181']) {
// env.versionNumber = VersionNumber(versionNumberString : '1.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '1.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'SOSCONDOMINI'
diff --git a/PUB/WebUserContols/mod_ER_all.ascx b/PUB/WebUserContols/mod_ER_all.ascx
index cc37254..68015d7 100644
--- a/PUB/WebUserContols/mod_ER_all.ascx
+++ b/PUB/WebUserContols/mod_ER_all.ascx
@@ -1,16 +1,28 @@
-<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_ER_all.ascx.cs" Inherits="PUB.WebUserContols.mod_ER_all" %>
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_ER_all.ascx.cs" Inherits="PUB.WebUserContols.mod_ER_all" %>
<%@ Register Src="~/WebUserContols/mod_ER_grid.ascx" TagPrefix="uc1" TagName="mod_ER_grid" %>
+<%@ Register Src="~/WebUserContols/mod_ER_insNew.ascx" TagPrefix="uc1" TagName="mod_ER_insNew" %>
<%@ Register Src="~/WebUserContols/mod_ER_selCondominio.ascx" TagPrefix="uc1" TagName="mod_ER_selCondominio" %>
-
diff --git a/PUB/WebUserContols/mod_ER_all.ascx.cs b/PUB/WebUserContols/mod_ER_all.ascx.cs
index 719f986..368770f 100644
--- a/PUB/WebUserContols/mod_ER_all.ascx.cs
+++ b/PUB/WebUserContols/mod_ER_all.ascx.cs
@@ -1,4 +1,6 @@
-using System;
+using Data;
+using SteamWare;
+using System;
using System.Web.UI;
namespace PUB.WebUserContols
@@ -16,6 +18,20 @@ namespace PUB.WebUserContols
mod_ER_selCondominio.eh_selected += Mod_ER_selCondominio_eh_selected;
}
+ ///
+ /// modalità edit corrente
+ ///
+ public ER_EditMode currMode
+ {
+ get
+ {
+ return (ER_EditMode)memLayer.ML.objSessionObj("ER_EditMode");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("ER_EditMode", value);
+ }
+ }
private void Mod_ER_selCondominio_eh_selected(object sender, EventArgs e)
{
saveSelections();
@@ -37,7 +53,38 @@ namespace PUB.WebUserContols
private void saveSelections()
{
+ divAddNew.Visible = (mod_ER_selCondominio.condSelected != "0" && currMode == ER_EditMode.mAmministratore);
mod_ER_grid.idxCond = mod_ER_selCondominio.condSelected;
+ mod_ER_insNew.idxCond = mod_ER_selCondominio.condSelected;
}
+ protected void lbtAddNew_Click(object sender, EventArgs e)
+ {
+ // ABILITO SOLO in modalità amministratore...
+ if (currMode == ER_EditMode.mAmministratore)
+ {
+ toggleAddNew();
+ }
+ }
+
+ private void toggleAddNew()
+ {
+ if (divInsNew.Visible)
+ {
+ lbtAddNew.Text = "Apri nuova »";
+ }
+ else
+ {
+ lbtAddNew.Text = "⇄ CHIUDI";
+ }
+ divInsNew.Visible = !divInsNew.Visible;
+ divElenco.Visible = !divInsNew.Visible;
+ if (divInsNew.Visible)
+ {
+ // aggiorno
+ mod_ER_insNew.doUpdate();
+ saveSelections();
+ }
+ }
+
}
}
\ No newline at end of file
diff --git a/PUB/WebUserContols/mod_ER_all.ascx.designer.cs b/PUB/WebUserContols/mod_ER_all.ascx.designer.cs
index 88de414..07d2466 100644
--- a/PUB/WebUserContols/mod_ER_all.ascx.designer.cs
+++ b/PUB/WebUserContols/mod_ER_all.ascx.designer.cs
@@ -21,6 +21,51 @@ namespace PUB.WebUserContols {
///
protected global::PUB.WebUserContols.mod_ER_selCondominio mod_ER_selCondominio;
+ ///
+ /// Controllo divAddNew.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAddNew;
+
+ ///
+ /// Controllo lbtAddNew.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lbtAddNew;
+
+ ///
+ /// Controllo divInsNew.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divInsNew;
+
+ ///
+ /// Controllo mod_ER_insNew.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::PUB.WebUserContols.mod_ER_insNew mod_ER_insNew;
+
+ ///
+ /// Controllo divElenco.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divElenco;
+
///
/// Controllo mod_ER_grid.
///
diff --git a/PUB/WebUserContols/mod_ER_conclusi.ascx b/PUB/WebUserContols/mod_ER_conclusi.ascx
index 13f900e..702e932 100644
--- a/PUB/WebUserContols/mod_ER_conclusi.ascx
+++ b/PUB/WebUserContols/mod_ER_conclusi.ascx
@@ -9,6 +9,5 @@
diff --git a/PUB/WebUserContols/mod_ER_inCorso.ascx b/PUB/WebUserContols/mod_ER_inCorso.ascx
index c4a3a28..78d8f2d 100644
--- a/PUB/WebUserContols/mod_ER_inCorso.ascx
+++ b/PUB/WebUserContols/mod_ER_inCorso.ascx
@@ -11,6 +11,5 @@
diff --git a/PUB/WebUserContols/mod_ER_insNew.ascx.cs b/PUB/WebUserContols/mod_ER_insNew.ascx.cs
index 57d6786..34fae01 100644
--- a/PUB/WebUserContols/mod_ER_insNew.ascx.cs
+++ b/PUB/WebUserContols/mod_ER_insNew.ascx.cs
@@ -104,35 +104,23 @@ namespace PUB.WebUserContols
}
catch
{ }
- // sposto in azione...
-#if false
- // invio email notifica al fornitore...
- string destinatario = "";
- try
- {
- destinatario = DtProxy.man.taAF.getByKey(idxForn)[0].indirizzo_email;
- }
- catch
- {
- destinatario = memLayer.ML.CRS("_adminEmail");
- }
- string oggetto = "Nuova richiesta intervento da b2bcondomini.it";
- string bodyTpl =
- "ASSEGNAZIONE INTERVENTO
" +
- "Buongiorno
" +
- "Ti è stata assegnata una nuova richiesta di intervento da b2bcondomini.it.
" +
- "Il condominio interessato è {0}, pregasi contattare {1} al numero {2}.
" +
- "La richiesta indicata è la seguente:
{3}
" +
- "Seguire il link seguente per maggiori informazioni.";
- string corpo = string.Format(bodyTpl, idxCond, txtContatto.Text, txtTelefono.Text, txtMessaggio.Text);
- // invio!
- utils.inviaEmail(destinatario, oggetto, corpo, 3); //!!!HARD CODED a 3 tutto
-#endif
// registro evento...
doAmmTask("Create", 10, idxRichiesta);
#if false
- Response.Redirect(devicesAuthProxy.pagCorrente);
+ Response.Redirect(currPage);
#endif
}
+#if false
+ ///
+ /// Pagina corrente x redirect
+ ///
+ string currPage
+ {
+ get
+ {
+ return HttpContext.Current.Request.Url.PathAndQuery;
+ }
+ }
+#endif
}
}
\ No newline at end of file
diff --git a/PUB/WebUserContols/mod_ER_preventivi.ascx b/PUB/WebUserContols/mod_ER_preventivi.ascx
index 6f72182..bde8325 100644
--- a/PUB/WebUserContols/mod_ER_preventivi.ascx
+++ b/PUB/WebUserContols/mod_ER_preventivi.ascx
@@ -11,6 +11,5 @@
diff --git a/PUB/WebUserContols/mod_ER_richieste.ascx b/PUB/WebUserContols/mod_ER_richieste.ascx
index 0b89156..f549e84 100644
--- a/PUB/WebUserContols/mod_ER_richieste.ascx
+++ b/PUB/WebUserContols/mod_ER_richieste.ascx
@@ -6,21 +6,21 @@
diff --git a/PUB/WebUserContols/mod_ER_richieste.ascx.cs b/PUB/WebUserContols/mod_ER_richieste.ascx.cs
index 5c2f66a..5a312f8 100644
--- a/PUB/WebUserContols/mod_ER_richieste.ascx.cs
+++ b/PUB/WebUserContols/mod_ER_richieste.ascx.cs
@@ -53,7 +53,7 @@ namespace PUB.WebUserContols
private void saveSelections()
{
- lbtAddNew.Visible = (mod_ER_selCondominio.condSelected != "0");
+ divAddNew.Visible = (mod_ER_selCondominio.condSelected != "0" && currMode == ER_EditMode.mAmministratore);
mod_ER_grid.idxCond = mod_ER_selCondominio.condSelected;
mod_ER_insNew.idxCond = mod_ER_selCondominio.condSelected;
}
@@ -87,14 +87,5 @@ namespace PUB.WebUserContols
}
}
- protected void lbtResetCond_Click(object sender, EventArgs e)
- {
- lbtAddNew.Text = "Apri nuova »";
- lbtAddNew.Visible = false;
- divInsNew.Visible = false;
- divElenco.Visible = true;
- mod_ER_selCondominio.condSelected = "0";
- saveSelections();
- }
}
}
\ No newline at end of file
diff --git a/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs b/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs
index 28d9121..be51ef6 100644
--- a/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs
+++ b/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs
@@ -21,6 +21,15 @@ namespace PUB.WebUserContols {
///
protected global::PUB.WebUserContols.mod_ER_selCondominio mod_ER_selCondominio;
+ ///
+ /// Controllo divAddNew.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAddNew;
+
///
/// Controllo lbtAddNew.
///
diff --git a/PUB/WebUserContols/mod_ER_sospesi.ascx b/PUB/WebUserContols/mod_ER_sospesi.ascx
index 31c9bd1..642c025 100644
--- a/PUB/WebUserContols/mod_ER_sospesi.ascx
+++ b/PUB/WebUserContols/mod_ER_sospesi.ascx
@@ -9,7 +9,6 @@
diff --git a/PUB/WebUserContols/mod_ER_stFatture.ascx b/PUB/WebUserContols/mod_ER_stFatture.ascx
index e0eda5b..e79db45 100644
--- a/PUB/WebUserContols/mod_ER_stFatture.ascx
+++ b/PUB/WebUserContols/mod_ER_stFatture.ascx
@@ -9,6 +9,5 @@