diff --git a/GMW.suo b/GMW.suo index 31d1d4fc..1f10d116 100644 Binary files a/GMW.suo and b/GMW.suo differ diff --git a/GMW_Term/GMW_Term.csproj b/GMW_Term/GMW_Term.csproj index da6a1c79..ece81f0b 100644 --- a/GMW_Term/GMW_Term.csproj +++ b/GMW_Term/GMW_Term.csproj @@ -157,10 +157,14 @@ + + - + + Designer + diff --git a/GMW_Term/Style.css b/GMW_Term/Style.css index fbf6fde3..c3d3f7e5 100644 --- a/GMW_Term/Style.css +++ b/GMW_Term/Style.css @@ -428,6 +428,20 @@ width: 210px; height: 20px; } +.btnAzzurroHalf +{ + border: solid 2px blue; + background-color: #AAFFFF; + width: 210px; + height: 30px; +} +.btnAzzurroThird +{ + border: solid 2px blue; + background-color: #AAFFFF; + width: 210px; + height: 20px; +} /* buttons larghi */ .btnAzzurroWide diff --git a/GMW_Term/Web.config b/GMW_Term/Web.config index 6c99251e..81c4c4e3 100644 --- a/GMW_Term/Web.config +++ b/GMW_Term/Web.config @@ -58,7 +58,7 @@ - + diff --git a/GMW_Term/WebUserControls/mod_searchRes.ascx b/GMW_Term/WebUserControls/mod_searchRes.ascx index e33387e9..7e3cdd77 100644 --- a/GMW_Term/WebUserControls/mod_searchRes.ascx +++ b/GMW_Term/WebUserControls/mod_searchRes.ascx @@ -1,124 +1,79 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_searchRes.ascx.cs" - Inherits="GMW_Term.WebUserControls.mod_searchRes" %> +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_searchRes.ascx.cs" Inherits="GMW_Term.WebUserControls.mod_searchRes" %> <% if (false) { %> <% } %> +
+ + + + + +
- - - -
- -
-
- -
-
- + + + + + + + + +  - 
 /  -
-
-
- - No data -
- + + + + + - + -
- - - <%-- --%> - - - - - - - - <%----%> - - -
- - - -
- -
-
- -
-
- -  -  - -
-
-
- - No data -
- + + + + + + + + + +
+ +   + +
+
+ +
+
+
+
+
+ - - + + -
- - - <%-- --%> - - -
- -   -
-
- -
-
-   -
-
-
- <%----%> -
-
-
diff --git a/GMW_Term/WebUserControls/mod_searchRes.ascx.cs b/GMW_Term/WebUserControls/mod_searchRes.ascx.cs index 3df7bb8c..983a9a7d 100644 --- a/GMW_Term/WebUserControls/mod_searchRes.ascx.cs +++ b/GMW_Term/WebUserControls/mod_searchRes.ascx.cs @@ -5,6 +5,7 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using SteamWare; +using System.Text; namespace GMW_Term.WebUserControls { @@ -29,11 +30,50 @@ namespace GMW_Term.WebUserControls if (!Page.IsPostBack) { idxBlocco = -1; + grViewMag.SelectedIndex = 0; } showData(); + registraScripts(); } /// - /// mostr ai dati corretti + /// registro scripts gestione navigazione via arrow keys + /// + private void registraScripts() + { + // registro script x gestione keyUp/keyDown + ClientScriptManager cs = Page.ClientScript; + String csname = "keyScript"; + Type cstype = this.GetType(); + // Check to see if the startup script is already registered. + if (!cs.IsStartupScriptRegistered(cstype, csname)) + { + string scriptKeyNav = @"function move(e) { + var key = 0; + if(window.event) + key = event.keyCode; + else + key = e.keyCode; + if(key == 38) + document.getElementById('{ctlName}_btnUp').click(); + if(key == 40) + document.getElementById('{ctlName}_btnDown').click(); + if(key == 37) + document.getElementById('{ctlName}_btnLeft').click(); + if(key == 39) + document.getElementById('{ctlName}_btnRight').click(); + if(key == 13) + document.getElementById('{ctlName}_btnRight').click(); + } + document.onkeydown=move; + "; + // rif x codici: http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes + scriptKeyNav = scriptKeyNav.Replace("{ctlName}", this.UniqueID.Replace("$", "_")); + // registro script! + cs.RegisterClientScriptBlock(cstype, csname, scriptKeyNav, true); + } + } + /// + /// mostra i dati corretti /// private void showData() { @@ -46,30 +86,6 @@ namespace GMW_Term.WebUserControls pnlBlocchi.Visible = !showUdc; pnlUdc.Visible = showUdc; } - - protected void TemplatePagerField_OnPagerCommand(object sender, DataPagerCommandEventArgs e) - { - // Check which button raised the event - switch (e.CommandName) - { - case "Next": - int newIndex = e.Item.Pager.StartRowIndex + e.Item.Pager.PageSize; - if (newIndex <= e.TotalRowCount) - { - e.NewStartRowIndex = newIndex; - e.NewMaximumRows = e.Item.Pager.MaximumRows; - } - break; - case "Previous": - e.NewStartRowIndex = e.Item.Pager.StartRowIndex - e.Item.Pager.PageSize; - e.NewMaximumRows = e.Item.Pager.MaximumRows; - break; - case "First": - e.NewStartRowIndex = 0; - e.NewMaximumRows = e.Item.Pager.MaximumRows; - break; - } - } /// /// va alla pagina dei buttons principale /// @@ -86,10 +102,227 @@ 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(); } + #region gestione frecce area MAG/Udc + + /// + /// Mag: richiesto di salire di 1 riga + /// + /// + /// + protected void btnUp_Click(object sender, ImageClickEventArgs e) + { + // controllo se sono in modalità Mag + if (idxBlocco < 0) + { + MoveUpMag(); + } + else // modalità UDC + { + MoveUpUdc(); + } + } + /// + /// Mag: richiesto di scendere di 1 riga + /// + /// + /// + protected void btnDown_Click(object sender, ImageClickEventArgs e) + { + if (idxBlocco < 0) + { + MoveDownMag(); + } + else + { + MoveDownUdc(); + } + } + /// + /// Mag: richiesto passare a dettaglio! + /// + /// + /// + protected void btnRight_Click(object sender, ImageClickEventArgs e) + { + // controllo se sono in modalità Mag + if (idxBlocco < 0) + { + reqDetailMag(); + } + else // modalità UDC + { + reqDetailUdc(); + } + } + /// + /// Mag: richiesto passare a pag precedente + /// + /// + /// + protected void btnLeft_Click(object sender, ImageClickEventArgs e) + { + // controllo se sono in modalità Mag + if (idxBlocco < 0) + { + resetSearch(); + } + else // modalità UDC + { + resetDetailUdc(); + } + } + + + #endregion + + #region gestione operazioni spostamento/dettaglio su gridview + + /// + /// sposta UP selezione blocco MAG + /// + private void MoveUpMag() + { + int i = grViewMag.SelectedIndex; + // condizione 1: sono entro la pagina + if (i > 0) + { + grViewMag.SelectedIndex = grViewMag.SelectedIndex - 1; + } + else + { + // condizione 2: ho altre pagine precedenti + if (grViewMag.PageIndex > 0) + { + grViewMag.PageIndex = grViewMag.PageIndex - 1; + // seleziono prima riga + grViewMag.SelectedIndex = grViewMag.PageSize - 1; + } + } + } + /// + /// sposta DOWN selezione blocco MAG + /// + private void MoveDownMag() + { + int i = grViewMag.SelectedIndex; + // condizione 1: sono entro la pagina + if (i < grViewMag.Rows.Count - 1) + { + grViewMag.SelectedIndex = grViewMag.SelectedIndex + 1; + } + else + { + // condizione 2: ho altre pagine successive + if (grViewMag.PageIndex < grViewMag.PageCount) + { + grViewMag.PageIndex = grViewMag.PageIndex + 1; + // seleziono prima riga + grViewMag.SelectedIndex = 0; + } + } + } + /// + /// richiesta dettaglio Mag + /// + private void reqDetailMag() + { + idxBlocco = Convert.ToInt32(grViewMag.SelectedDataKey["IdxBlocco"].ToString()); + grViewUdc.SelectedIndex = 0; + grViewUdc.PageIndex = 0; + showData(); + } + /// + /// reset a ricerca + /// + private void resetSearch() + { + Response.Redirect("~/Search.aspx"); + } + /// + /// sposta UP selezione blocco UDC + /// + private void MoveUpUdc() + { + int i = grViewUdc.SelectedIndex; + // condizione 1: sono entro la pagina + if (i > 0) + { + grViewUdc.SelectedIndex = grViewUdc.SelectedIndex - 1; + grViewUdc.DataBind(); + } + else + { + // condizione 2: ho altre pagine precedenti + if (grViewUdc.PageIndex > 0) + { + grViewUdc.PageIndex = grViewUdc.PageIndex - 1; + // seleziono prima riga + grViewUdc.SelectedIndex = grViewUdc.PageSize - 1; + } + } + } + /// + /// sposta DOWN selezione blocco UDC + /// + private void MoveDownUdc() + { + int i = grViewUdc.SelectedIndex; + // condizione 1: sono entro la pagina + if (i < grViewUdc.Rows.Count - 1) + { + grViewUdc.SelectedIndex = grViewUdc.SelectedIndex + 1; + grViewUdc.DataBind(); + } + else + { + // condizione 2: ho altre pagine successive + if (grViewUdc.PageIndex < grViewUdc.PageCount) + { + grViewUdc.PageIndex = grViewUdc.PageIndex + 1; + // seleziono prima riga + grViewUdc.SelectedIndex = 0; + } + } + } + /// + /// UDC: richiesto passare a dettaglio! + /// + /// + /// + private void reqDetailUdc() + { + //idxBlocco = Convert.ToInt32(grViewMag.SelectedDataKey["IdxBlocco"].ToString()); + grViewUdc.DataBind(); + } + /// + /// reset ricerca dettaglio UDC + /// + private void resetDetailUdc() + { + idxBlocco = -1; + grViewMag.SelectedIndex = 0; + grViewMag.PageIndex = 0; + showData(); + } + + #endregion + } } \ No newline at end of file diff --git a/GMW_Term/WebUserControls/mod_searchRes.ascx.designer.cs b/GMW_Term/WebUserControls/mod_searchRes.ascx.designer.cs index e6a0e14f..84972cd2 100644 --- a/GMW_Term/WebUserControls/mod_searchRes.ascx.designer.cs +++ b/GMW_Term/WebUserControls/mod_searchRes.ascx.designer.cs @@ -12,6 +12,51 @@ namespace GMW_Term.WebUserControls { public partial class mod_searchRes { + /// + /// btnLeft control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ImageButton btnLeft; + + /// + /// btnUp control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ImageButton btnUp; + + /// + /// 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; + + /// + /// btnDown control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ImageButton btnDown; + + /// + /// btnRight control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ImageButton btnRight; + /// /// pnlBlocchi control. /// @@ -22,22 +67,13 @@ namespace GMW_Term.WebUserControls { protected global::System.Web.UI.WebControls.Panel pnlBlocchi; /// - /// lblRes control. + /// grViewMag control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lblRes; - - /// - /// lsViewMag 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.GridView grViewMag; /// /// ods control. @@ -48,15 +84,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. /// @@ -67,39 +94,21 @@ namespace GMW_Term.WebUserControls { protected global::System.Web.UI.WebControls.Panel pnlUdc; /// - /// Label3 control. + /// grViewUdc control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label Label3; + protected global::System.Web.UI.WebControls.GridView grViewUdc; /// - /// lsViewPart control. + /// odsUdc control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.ListView lsViewPart; - - /// - /// odsPart control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ObjectDataSource odsPart; - - /// - /// dpUdc control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.DataPager dpUdc; + protected global::System.Web.UI.WebControls.ObjectDataSource odsUdc; } } diff --git a/GMW_Term/bin/GMW_Term.dll b/GMW_Term/bin/GMW_Term.dll index 267b2b77..719a95b0 100644 Binary files a/GMW_Term/bin/GMW_Term.dll and b/GMW_Term/bin/GMW_Term.dll differ diff --git a/GMW_Term/bin/GMW_data.dll b/GMW_Term/bin/GMW_data.dll index 551265b7..4003aa8c 100644 Binary files a/GMW_Term/bin/GMW_data.dll and b/GMW_Term/bin/GMW_data.dll differ diff --git a/GMW_Term/bin/SteamWare.dll b/GMW_Term/bin/SteamWare.dll index ab048a39..b0f1199e 100644 Binary files a/GMW_Term/bin/SteamWare.dll and b/GMW_Term/bin/SteamWare.dll differ diff --git a/GMW_Term/images/ArrowDown.png b/GMW_Term/images/ArrowDown.png index b2f90857..97114e82 100644 Binary files a/GMW_Term/images/ArrowDown.png and b/GMW_Term/images/ArrowDown.png differ diff --git a/GMW_Term/images/ArrowLeft.png b/GMW_Term/images/ArrowLeft.png new file mode 100644 index 00000000..28c762ff Binary files /dev/null and b/GMW_Term/images/ArrowLeft.png differ diff --git a/GMW_Term/images/ArrowRight.png b/GMW_Term/images/ArrowRight.png new file mode 100644 index 00000000..86f9e07b Binary files /dev/null and b/GMW_Term/images/ArrowRight.png differ diff --git a/GMW_Term/images/ArrowUp.png b/GMW_Term/images/ArrowUp.png index 43680f9a..44d74a9f 100644 Binary files a/GMW_Term/images/ArrowUp.png and b/GMW_Term/images/ArrowUp.png differ diff --git a/GMW_data/DS_magazzino.Designer.cs b/GMW_data/DS_magazzino.Designer.cs index ea42ff4f..b128803d 100644 --- a/GMW_data/DS_magazzino.Designer.cs +++ b/GMW_data/DS_magazzino.Designer.cs @@ -11536,6 +11536,8 @@ namespace GMW_data { private global::System.Data.DataColumn columnCodCella; + private global::System.Data.DataColumn columnQta; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public stp_UDC_FifoByParticolareBloccoDataTable() { @@ -11593,6 +11595,14 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn QtaColumn { + get { + return this.columnQta; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -11630,12 +11640,13 @@ namespace GMW_data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public stp_UDC_FifoByParticolareBloccoRow Addstp_UDC_FifoByParticolareBloccoRow(string UDC, System.DateTime DataRif, string CodCella) { + public stp_UDC_FifoByParticolareBloccoRow Addstp_UDC_FifoByParticolareBloccoRow(string UDC, System.DateTime DataRif, string CodCella, decimal Qta) { stp_UDC_FifoByParticolareBloccoRow rowstp_UDC_FifoByParticolareBloccoRow = ((stp_UDC_FifoByParticolareBloccoRow)(this.NewRow())); object[] columnValuesArray = new object[] { UDC, DataRif, - CodCella}; + CodCella, + Qta}; rowstp_UDC_FifoByParticolareBloccoRow.ItemArray = columnValuesArray; this.Rows.Add(rowstp_UDC_FifoByParticolareBloccoRow); return rowstp_UDC_FifoByParticolareBloccoRow; @@ -11668,6 +11679,7 @@ namespace GMW_data { this.columnUDC = base.Columns["UDC"]; this.columnDataRif = base.Columns["DataRif"]; this.columnCodCella = base.Columns["CodCella"]; + this.columnQta = base.Columns["Qta"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -11679,6 +11691,8 @@ namespace GMW_data { base.Columns.Add(this.columnDataRif); this.columnCodCella = new global::System.Data.DataColumn("CodCella", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCodCella); + this.columnQta = new global::System.Data.DataColumn("Qta", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnQta); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnUDC}, true)); this.columnUDC.AllowDBNull = false; @@ -17359,6 +17373,22 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public decimal Qta { + get { + try { + return ((decimal)(this[this.tablestp_UDC_FifoByParticolareBlocco.QtaColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Qta\' in table \'stp_UDC_FifoByParticolareBlocco\' is DBNull.", e); + } + } + set { + this[this.tablestp_UDC_FifoByParticolareBlocco.QtaColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool IsDataRifNull() { @@ -17370,6 +17400,18 @@ namespace GMW_data { public void SetDataRifNull() { this[this.tablestp_UDC_FifoByParticolareBlocco.DataRifColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsQtaNull() { + return this.IsNull(this.tablestp_UDC_FifoByParticolareBlocco.QtaColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetQtaNull() { + this[this.tablestp_UDC_FifoByParticolareBlocco.QtaColumn] = global::System.Convert.DBNull; + } } /// @@ -32534,6 +32576,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolar tableMapping.ColumnMappings.Add("UDC", "UDC"); tableMapping.ColumnMappings.Add("DataRif", "DataRif"); tableMapping.ColumnMappings.Add("CodCella", "CodCella"); + tableMapping.ColumnMappings.Add("Qta", "Qta"); this._adapter.TableMappings.Add(tableMapping); } diff --git a/GMW_data/DS_magazzino.xsd b/GMW_data/DS_magazzino.xsd index b4bfd463..87418726 100644 --- a/GMW_data/DS_magazzino.xsd +++ b/GMW_data/DS_magazzino.xsd @@ -3056,6 +3056,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolar + @@ -4160,7 +4161,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolar - + @@ -4217,7 +4218,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolar - + @@ -4249,7 +4250,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolar - + @@ -4267,6 +4268,7 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolar + @@ -4406,17 +4408,17 @@ SELECT idxEvento, DataOra, CodSoggetto, codPostazione, clientIP, UDC, Particolar - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/GMW_data/DS_magazzino.xss b/GMW_data/DS_magazzino.xss index 7cba96e5..e660e935 100644 --- a/GMW_data/DS_magazzino.xss +++ b/GMW_data/DS_magazzino.xss @@ -33,7 +33,7 @@ - +