diff --git a/GMW_Term/WebUserControls/mod_searchRes.ascx b/GMW_Term/WebUserControls/mod_searchRes.ascx
index 972503d6..38bce5c2 100644
--- a/GMW_Term/WebUserControls/mod_searchRes.ascx
+++ b/GMW_Term/WebUserControls/mod_searchRes.ascx
@@ -4,22 +4,23 @@
<% } %>
- <%----%>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
@@ -27,52 +28,16 @@
/
-
-
-
-
-
-
-
- Nessun Risultato
-
+
+
+
+
-
-
-
diff --git a/GMW_Term/WebUserControls/mod_searchRes.ascx.cs b/GMW_Term/WebUserControls/mod_searchRes.ascx.cs
index 7b66bd03..41a319f1 100644
--- a/GMW_Term/WebUserControls/mod_searchRes.ascx.cs
+++ b/GMW_Term/WebUserControls/mod_searchRes.ascx.cs
@@ -30,7 +30,10 @@ namespace GMW_Term.WebUserControls
if (!Page.IsPostBack)
{
idxBlocco = -1;
- lsViewMag.SelectedIndex = 0;
+#if false
+ lsViewMag.SelectedIndex = 0;
+#endif
+ grViewMag.SelectedIndex = 0;
}
showData();
registraScripts();
@@ -55,9 +58,9 @@ namespace GMW_Term.WebUserControls
else
key = e.keyCode;
if(key == 38)
- document.getElementById('{ctlName}_dtPager_ctl01_btnUpMag').click();
+ document.getElementById('{ctlName}_btnUpMag').click();
if(key == 40)
- document.getElementById('{ctlName}_dtPager_ctl01_btnDownMag').click();
+ document.getElementById('{ctlName}_btnDownMag').click();
}
document.onkeydown=move;
";
@@ -139,8 +142,20 @@ namespace GMW_Term.WebUserControls
///
protected void lsView_SelectedIndexChanged(object sender, EventArgs e)
{
+#if false
//lblRes.Text = lsView.SelectedDataKey["IdxBlocco"].ToString(); // ok!
idxBlocco = Convert.ToInt32(lsViewMag.SelectedDataKey["IdxBlocco"].ToString());
+ showData();
+#endif
+ }
+ ///
+ /// cambio index
+ ///
+ ///
+ ///
+ protected void grViewMag_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ idxBlocco = Convert.ToInt32(grViewMag.SelectedDataKey["IdxBlocco"].ToString());
showData();
}
///
@@ -150,27 +165,20 @@ namespace GMW_Term.WebUserControls
///
protected void btnUpMag_Click(object sender, ImageClickEventArgs e)
{
- int i = lsViewMag.SelectedIndex;
+ int i = grViewMag.SelectedIndex;
// condizione 1: sono entro la pagina
if (i > 0)
{
- lsViewMag.SelectedIndex = lsViewMag.SelectedIndex - 1;
+ grViewMag.SelectedIndex = grViewMag.SelectedIndex - 1;
}
else
{
// condizione 2: ho altre pagine precedenti
- int newIndex = dtPager.StartRowIndex - dtPager.PageSize;
- if (newIndex >= 0)
+ if (grViewMag.PageIndex > 0)
{
- // avanzo pagina
- CommandEventArgs commandEventArgs = new CommandEventArgs("Previous", "");
- NextPreviousPagerField nextPreviousPagerField = dtPager.Fields[0] as NextPreviousPagerField;
- if (nextPreviousPagerField != null)
- {
- nextPreviousPagerField.HandleEvent(commandEventArgs);
- }
+ grViewMag.PageIndex = grViewMag.PageIndex - 1;
// seleziono prima riga
- lsViewMag.SelectedIndex = dtPager.PageSize - 1;
+ grViewMag.SelectedIndex = grViewMag.PageSize - 1;
}
}
}
@@ -181,27 +189,20 @@ namespace GMW_Term.WebUserControls
///
protected void btnDownMag_Click(object sender, ImageClickEventArgs e)
{
- int i = lsViewMag.SelectedIndex;
+ int i = grViewMag.SelectedIndex;
// condizione 1: sono entro la pagina
- if (i < lsViewMag.Items.Count - 1)
+ if (i < grViewMag.Rows.Count - 1)
{
- lsViewMag.SelectedIndex = lsViewMag.SelectedIndex + 1;
+ grViewMag.SelectedIndex = grViewMag.SelectedIndex + 1;
}
else
{
// condizione 2: ho altre pagine successive
- int newIndex = dtPager.StartRowIndex + dtPager.PageSize;
- if (newIndex <= dtPager.TotalRowCount)
+ if (grViewMag.PageIndex < grViewMag.PageCount)
{
- // avanzo pagina
- CommandEventArgs commandEventArgs = new CommandEventArgs("Next", "");
- NextPreviousPagerField nextPreviousPagerField = dtPager.Fields[0] as NextPreviousPagerField;
- if (nextPreviousPagerField != null)
- {
- nextPreviousPagerField.HandleEvent(commandEventArgs);
- }
+ grViewMag.PageIndex = grViewMag.PageIndex + 1;
// seleziono prima riga
- lsViewMag.SelectedIndex = 0;
+ grViewMag.SelectedIndex = 0;
}
}
}
diff --git a/GMW_Term/WebUserControls/mod_searchRes.ascx.designer.cs b/GMW_Term/WebUserControls/mod_searchRes.ascx.designer.cs
index 7fb33d73..dc68a4f3 100644
--- a/GMW_Term/WebUserControls/mod_searchRes.ascx.designer.cs
+++ b/GMW_Term/WebUserControls/mod_searchRes.ascx.designer.cs
@@ -22,13 +22,40 @@ namespace GMW_Term.WebUserControls {
protected global::System.Web.UI.WebControls.Panel pnlBlocchi;
///
- /// lsViewMag control.
+ /// btnUpMag control.
///
///
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::System.Web.UI.WebControls.ListView lsViewMag;
+ protected global::System.Web.UI.WebControls.ImageButton btnUpMag;
+
+ ///
+ /// btnButtonsHome control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnButtonsHome;
+
+ ///
+ /// btnDownMag control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ImageButton btnDownMag;
+
+ ///
+ /// grViewMag control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView grViewMag;
///
/// ods control.
@@ -39,15 +66,6 @@ namespace GMW_Term.WebUserControls {
///
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
- ///
- /// dtPager control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.DataPager dtPager;
-
///
/// pnlUdc control.
///
diff --git a/GMW_Term/bin/GMW_Term.dll b/GMW_Term/bin/GMW_Term.dll
index 2af248fa..09ee2347 100644
Binary files a/GMW_Term/bin/GMW_Term.dll and b/GMW_Term/bin/GMW_Term.dll differ
diff --git a/GMW_Terminus.suo b/GMW_Terminus.suo
index d45a82cd..bc10ec58 100644
Binary files a/GMW_Terminus.suo and b/GMW_Terminus.suo differ