diff --git a/WebSites/WebGIM/Bin/SteamWare.dll b/WebSites/WebGIM/Bin/SteamWare.dll
index a160207..590b7a4 100644
Binary files a/WebSites/WebGIM/Bin/SteamWare.dll and b/WebSites/WebGIM/Bin/SteamWare.dll differ
diff --git a/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config b/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config
index ae1a703..3b982db 100644
--- a/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config
+++ b/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config
@@ -58,5 +58,5 @@
-
+
\ No newline at end of file
diff --git a/WebSites/WebGIM/mod_famiglieMacchine.ascx.cs.bak b/WebSites/WebGIM/mod_famiglieMacchine.ascx.cs.bak
deleted file mode 100644
index 37d5625..0000000
--- a/WebSites/WebGIM/mod_famiglieMacchine.ascx.cs.bak
+++ /dev/null
@@ -1,101 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using SteamWare;
-
-public partial class mod_famiglieMacchine : System.Web.UI.UserControl
-{
- protected void Page_Load(object sender, EventArgs e)
- {
- mod_elFamMacch1.eh_selezioneValore += new EventHandler(mod_elFamMacch1_eh_selezioneValore);
- mod_elFamMacch1.eh_resetSelezione += new EventHandler(mod_elFamMacch1_eh_resetSelezione);
- mod_elMacch2Fam1.eh_delValore += new EventHandler(mod_elMacch2Fam1_eh_delValore);
- traduciObj();
- }
-
- private void traduciObj()
- {
- btnShowAdd.Text = traduci("showAddMacchine");
- btnAddMacchine.Text = traduci("AddMacchine2Fam");
- lblMacchineInteressate.Text = traduci("lblMacchineInteressate");
- }
- ///
- /// wrapper traduzione
- ///
- ///
- ///
- public string traduci(object lemma)
- {
- return user_std.UtSn.Traduci(lemma.ToString());
- }
- void mod_elMacch2Fam1_eh_delValore(object sender, EventArgs e)
- {
- mod_elFamMacch1.doUpdate();
- }
-
- void mod_elFamMacch1_eh_resetSelezione(object sender, EventArgs e)
- {
- mod_elMacch2Fam1.Visible = false;
- }
-
- void mod_elFamMacch1_eh_selezioneValore(object sender, EventArgs e)
- {
- mod_elMacch2Fam1.idxFamMacchSel = mod_elFamMacch1.idxFamMacc_sel;
- mod_elMacch2Fam1.Visible = true;
- }
- protected void btnAddMacchine_Click(object sender, EventArgs e)
- {
- // controllo se si possa salvare
- if ((mod_elFamMacch1.idxFamMacc_sel != -1) && (listMacchine.SelectedIndex != -1))
- {
- lblWarning.Visible = false;
- // ciclo ed inserisco le macchine selezionate
- foreach (ListItem riga in listMacchine.Items)
- {
- // se è selezionata creo riga anche x lei...
- if (riga.Selected)
- {
- associaMacchinaFamiglia(Convert.ToInt32(riga.Value), mod_elFamMacch1.idxFamMacc_sel);
- }
- }
- mod_elMacch2Fam1.doUpdate();
- }
- else
- {
- lblWarning.Visible = true;
- lblWarning.Text = traduci("pregoSelMacchFamMacch");
- }
- }
- ///
- /// associa la macchina indicata alla famiglia
- ///
- ///
- ///
- private bool associaMacchinaFamiglia(int idxMacchina, int idxFamMacc)
- {
- bool answ = false;
- try
- {
- TA_app.obj.taMacc2Fam.InsertQuery(idxMacchina, idxFamMacc);
- answ = true;
- }
- catch
- { }
- return answ;
- }
- protected void btnShowAdd_Click(object sender, EventArgs e)
- {
- pnlSceltaMacchine.Visible = !pnlSceltaMacchine.Visible;
- if (pnlSceltaMacchine.Visible)
- {
- btnShowAdd.Text = user_std.UtSn.Traduci("hideAddMacchine");
- }
- else
- {
- btnShowAdd.Text = user_std.UtSn.Traduci("showAddMacchine");
- }
-
- }
-}
diff --git a/WebSites/WebGIM/mod_gestCausali.ascx b/WebSites/WebGIM/mod_gestCausali.ascx
index afbe1b7..c2dcca9 100644
--- a/WebSites/WebGIM/mod_gestCausali.ascx
+++ b/WebSites/WebGIM/mod_gestCausali.ascx
@@ -1,12 +1,12 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="mod_gestCausali.ascx.cs"
Inherits="mod_gestCausali" %>
<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
-<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
@@ -46,7 +46,8 @@
ReadOnly="True" />
-
+
diff --git a/WebSites/WebGIM/mod_macchine.ascx b/WebSites/WebGIM/mod_macchine.ascx
index 186e81c..b355c0d 100644
--- a/WebSites/WebGIM/mod_macchine.ascx
+++ b/WebSites/WebGIM/mod_macchine.ascx
@@ -2,6 +2,11 @@
Inherits="mod_macchine" %>
<%@ Register Src="mod_selettore_ajax.ascx" TagName="mod_selettore_ajax" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
+<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc2" %>
+
+
+
- <%--
- --%>
diff --git a/WebSites/WebGIM/mod_macchine.ascx.cs b/WebSites/WebGIM/mod_macchine.ascx.cs
index 790d0ac..95226a2 100644
--- a/WebSites/WebGIM/mod_macchine.ascx.cs
+++ b/WebSites/WebGIM/mod_macchine.ascx.cs
@@ -331,6 +331,11 @@ public partial class mod_macchine : ApplicationUserControl
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
+ mod_filtroImpianti.eh_selValore += new EventHandler(mod_filtroImpianti_eh_selValore);
+ if (!Page.IsPostBack)
+ {
+ mod_filtroImpianti.ods = odsImpianti;
+ }
_idxGridView = "idxmacchina";
// determino quale grView a seconda del tipo visibilità colonne...
if (_dispLessCol)
@@ -345,16 +350,41 @@ public partial class mod_macchine : ApplicationUserControl
}
updateOdsDaFiltro();
}
+
+ ///
+ /// aggiorna visualizzazioni varie
+ ///
+ private void aggiornaAll()
+ {
+ // imposto visibilità filtro in base a tipo controllo
+ if (vistaModulo == tipoVistaMod.selezione)
+ {
+ mod_filtroImpianti.Visible = false;
+ }
+ else
+ {
+ mod_filtroImpianti.Visible = true;
+ }
+ }
+
+ void mod_filtroImpianti_eh_selValore(object sender, EventArgs e)
+ {
+ if (mod_filtroImpianti.valoreInt != 0)
+ {
+ // salvo il valore selezionato...
+ idxImpiantoSel = mod_filtroImpianti.valoreInt;
+ }
+ doUpdate();
+ }
///
/// verifica e sistema il filtro dell'ods...
///
private void updateOdsDaFiltro()
{
string filterExpr = " (codMacchina LIKE '%{0}%' OR nomeMacchina LIKE '%{0}%' OR modello LIKE '%{0}%' OR matricola LIKE '%{0}%' OR descrImpianto LIKE '%{0}%') ";
- if (vistaModulo == tipoVistaMod.selezione)
+ if (vistaModulo == tipoVistaMod.selezione || (mod_filtroImpianti.Visible && mod_filtroImpianti.valore != "*"))
{
filterExpr += " AND idxImpianto = {1} ";
-
}
ods.FilterExpression = filterExpr;
}
@@ -475,8 +505,10 @@ public partial class mod_macchine : ApplicationUserControl
set
{
lblImpianto.Text = value.ToString();
+ aggiornaAll();
}
}
+
///
/// definisce se mostrare meno colonne (per funzione MOVE delle macchine tra diversi impianti)
///
@@ -502,7 +534,7 @@ public partial class mod_macchine : ApplicationUserControl
}
}
///
- /// restituisce idx della amcchina selezionata nel grVIew versione "short"
+ /// restituisce idx della macchina selezionata nel grVIew versione "short"
///
public int idxMacchinaSel
{