diff --git a/CMS_SC/ElencoSchede.aspx.cs b/CMS_SC/ElencoSchede.aspx.cs
index 2ae7614..a4ec707 100644
--- a/CMS_SC/ElencoSchede.aspx.cs
+++ b/CMS_SC/ElencoSchede.aspx.cs
@@ -56,7 +56,7 @@ namespace CMS_SC
if (addVisib)
{
mod_dossier.idxDossier = mod_elencoDossiers.idxDossier;
- mod_dossier.fixNote();
+ mod_dossier.fixControls();
mod_dossier.showNoteBtn(false);
}
}
diff --git a/CMS_SC/WebUserControls/mod_dossier.ascx b/CMS_SC/WebUserControls/mod_dossier.ascx
index 37d2b73..0cebb86 100644
--- a/CMS_SC/WebUserControls/mod_dossier.ascx
+++ b/CMS_SC/WebUserControls/mod_dossier.ascx
@@ -1,28 +1,47 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_dossier.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_dossier" %>
-
-
Edit Dossier
-
-
-
-
-
-
+
+
Edit Dossier
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CMS_SC/WebUserControls/mod_dossier.ascx.cs b/CMS_SC/WebUserControls/mod_dossier.ascx.cs
index 7152357..b98f466 100644
--- a/CMS_SC/WebUserControls/mod_dossier.ascx.cs
+++ b/CMS_SC/WebUserControls/mod_dossier.ascx.cs
@@ -4,85 +4,142 @@ using System;
namespace CMS_SC.WebUserControls
{
- public partial class mod_dossier : System.Web.UI.UserControl
+ public partial class mod_dossier : SteamWare.UserControl
+ {
+ protected override void OnInit(EventArgs e)
{
- ///
- /// evento valore selezionato
- ///
- public event EventHandler eh_valUpdated;
- protected void raiseEvent()
- {
- // sollevo evento nuovo valore...
- if (eh_valUpdated != null)
- {
- eh_valUpdated(this, new EventArgs());
- }
- }
- protected void Page_Load(object sender, EventArgs e)
- {
-
- }
- public int idxDossier
- {
- get
- {
- return memLayer.ML.IntSessionObj("idxDossierEdit");
- }
- set
- {
- memLayer.ML.setSessionVal("idxDossierEdit", value);
- }
- }
- ///
- /// carica campo note e mostra editing...
- ///
- public void fixNote()
- {
- if (idxDossier > 0)
- {
- DS_Applicazione.ElencoDossierRow riga = DtProxy.man.taED.getByDossier(idxDossier)[0];
- txtNote.Text = riga.Note;
- ddlFase.SelectedValue = riga.Stato;
- }
- }
- ///
- /// mostra btn salvataggio / annullamento
- ///
- ///
- ///
- protected void txtNote_TextChanged(object sender, EventArgs e)
- {
- // mostra button salvataggio/annulla
- showNoteBtn(true);
- }
-
- public void showNoteBtn(bool showSaveCancel)
- {
- lbtResetNote.Visible = showSaveCancel;
- lbtSalvaNote.Visible = showSaveCancel;
- }
-
- protected void lbtResetNote_Click(object sender, EventArgs e)
- {
- fixNote();
- showNoteBtn(false);
- }
- protected void lbtSalvaNote_Click(object sender, EventArgs e)
- {
- // salvo
- if (idxDossier > 0)
- {
- DtProxy.man.taED.updateNote(idxDossier, ddlFase.SelectedValue, txtNote.Text.Trim());
- }
- // ricarico
- fixNote();
- showNoteBtn(false);
- raiseEvent();
- }
- protected void ddlFase_SelectedIndexChanged(object sender, EventArgs e)
- {
- // mostra button salvataggio/annulla
- showNoteBtn(true);
- }
+ base.OnInit(e);
+ if (!Page.IsPostBack)
+ {
+ editFaseRev = false;
+ fixControls();
+ }
}
+ ///
+ /// evento valore selezionato
+ ///
+ public event EventHandler eh_valUpdated;
+ protected void raiseEvent()
+ {
+ // sollevo evento nuovo valore...
+ if (eh_valUpdated != null)
+ {
+ eh_valUpdated(this, new EventArgs());
+ }
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ public int idxDossier
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj("idxDossierEdit");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("idxDossierEdit", value);
+ }
+ }
+ public bool editFaseRev
+ {
+ get
+ {
+ return memLayer.ML.BoolSessionObj("editFaseRev");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("editFaseRev", value);
+ }
+ }
+ ///
+ /// Aggiorna controllo con update del campo note e eventualmente permettendo editing...
+ ///
+ public void fixControls()
+ {
+ if (idxDossier > 0)
+ {
+ DS_Applicazione.ElencoDossierRow riga = DtProxy.man.taED.getByDossier(idxDossier)[0];
+ txtNote.Text = riga.Note;
+ ddlFase.SelectedValue = riga.Stato;
+ lblRevAct.Text = riga.Stato; //!!!FARE!!!
+ ddlFase.Enabled = editFaseRev;
+ icnCancel.Visible = editFaseRev;
+ icnEdit.Visible = !editFaseRev;
+ lbtNewRev.Visible = editFaseRev;
+ lblRevAct.Visible = !editFaseRev;
+ }
+ }
+ ///
+ /// mostra btn salvataggio / annullamento
+ ///
+ ///
+ ///
+ protected void txtNote_TextChanged(object sender, EventArgs e)
+ {
+ // mostra button salvataggio/annulla
+ showNoteBtn(true);
+ }
+
+ public void showNoteBtn(bool showSaveCancel)
+ {
+ lbtResetNote.Visible = showSaveCancel;
+ lbtSalvaNote.Visible = showSaveCancel;
+ }
+
+ protected void lbtResetNote_Click(object sender, EventArgs e)
+ {
+ fixControls();
+ showNoteBtn(false);
+ }
+ protected void lbtSalvaNote_Click(object sender, EventArgs e)
+ {
+ // salvo
+ if (idxDossier > 0)
+ {
+ DtProxy.man.taED.updateNote(idxDossier, ddlFase.SelectedValue, txtNote.Text.Trim());
+ }
+ // ricarico
+ fixControls();
+ showNoteBtn(false);
+ raiseEvent();
+ }
+ protected void ddlFase_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // mostra button salvataggio/annulla
+ showNoteBtn(true);
+ }
+ ///
+ /// Abilita modalità editing FASE / REVISIONE
+ ///
+ ///
+ ///
+ protected void lbtEnable_Click(object sender, EventArgs e)
+ {
+ editFaseRev = !editFaseRev;
+ fixControls();
+ }
+ ///
+ /// Crea una nuova revisione
+ ///
+ ///
+ ///
+ protected void lbtNewRev_Click(object sender, EventArgs e)
+ {
+ // SE HO le note... sennò errore...
+ if (txtNote.Text.Trim() != "")
+ {
+ // crea una nuova revisione salvando le note e DUPLICANDO tutti i valori alla NUOVA revisione...
+
+ // FARE con stored...
+ lblWarn.Visible = false;
+ }
+ else
+ {
+ lblWarn.Visible = true;
+ lblWarn.Text = traduci("ERR-NoteMandatory");
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/CMS_SC/WebUserControls/mod_dossier.ascx.designer.cs b/CMS_SC/WebUserControls/mod_dossier.ascx.designer.cs
index 76b0955..1da43e4 100644
--- a/CMS_SC/WebUserControls/mod_dossier.ascx.designer.cs
+++ b/CMS_SC/WebUserControls/mod_dossier.ascx.designer.cs
@@ -12,6 +12,33 @@ namespace CMS_SC.WebUserControls {
public partial class mod_dossier {
+ ///
+ /// Controllo lbtEnable.
+ ///
+ ///
+ /// 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 lbtEnable;
+
+ ///
+ /// Controllo icnEdit.
+ ///
+ ///
+ /// 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 icnEdit;
+
+ ///
+ /// Controllo icnCancel.
+ ///
+ ///
+ /// 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 icnCancel;
+
///
/// Controllo ddlFase.
///
@@ -30,6 +57,24 @@ namespace CMS_SC.WebUserControls {
///
protected global::System.Web.UI.WebControls.ObjectDataSource odsFase;
+ ///
+ /// Controllo lblRevAct.
+ ///
+ ///
+ /// 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.Label lblRevAct;
+
+ ///
+ /// Controllo lbtNewRev.
+ ///
+ ///
+ /// 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 lbtNewRev;
+
///
/// Controllo txtNote.
///
@@ -48,6 +93,15 @@ namespace CMS_SC.WebUserControls {
///
protected global::System.Web.UI.WebControls.LinkButton lbtSalvaNote;
+ ///
+ /// Controllo lblWarn.
+ ///
+ ///
+ /// 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.Label lblWarn;
+
///
/// Controllo lbtResetNote.
///
diff --git a/CMS_SC/WebUserControls/mod_testata.ascx b/CMS_SC/WebUserControls/mod_testata.ascx
index 50952ac..8a08f90 100644
--- a/CMS_SC/WebUserControls/mod_testata.ascx
+++ b/CMS_SC/WebUserControls/mod_testata.ascx
@@ -10,7 +10,21 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CMS_SC/WebUserControls/mod_testata.ascx.cs b/CMS_SC/WebUserControls/mod_testata.ascx.cs
index bf3a084..1f61097 100644
--- a/CMS_SC/WebUserControls/mod_testata.ascx.cs
+++ b/CMS_SC/WebUserControls/mod_testata.ascx.cs
@@ -482,5 +482,10 @@ namespace CMS_SC.WebUserControls
memLayer.ML.setSessionVal("searchVal", value);
}
}
+
+ protected void lbReset_Click(object sender, EventArgs e)
+ {
+ searchVal = "";
+ }
}
}
\ No newline at end of file
diff --git a/CMS_SC/WebUserControls/mod_testata.ascx.designer.cs b/CMS_SC/WebUserControls/mod_testata.ascx.designer.cs
index d5169df..7feb135 100644
--- a/CMS_SC/WebUserControls/mod_testata.ascx.designer.cs
+++ b/CMS_SC/WebUserControls/mod_testata.ascx.designer.cs
@@ -30,6 +30,15 @@ namespace CMS_SC.WebUserControls {
///
protected global::System.Web.UI.HtmlControls.HtmlImage imgLogo;
+ ///
+ /// Controllo lbSearch.
+ ///
+ ///
+ /// 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 lbSearch;
+
///
/// Controllo txtSearch.
///
@@ -39,6 +48,15 @@ namespace CMS_SC.WebUserControls {
///
protected global::System.Web.UI.WebControls.TextBox txtSearch;
+ ///
+ /// Controllo lbReset.
+ ///
+ ///
+ /// 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 lbReset;
+
///
/// Controllo updtRicerca.
///