From a7bbbb7ef5cd8bd6af6232a3aae940baa97e0689 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 15 Oct 2019 18:37:02 +0200 Subject: [PATCH] Inserito detail x item in details view... --- AppData/DS_App.Designer.cs | 69 ++++++++++++------- AppData/DS_App.xsd | 11 +++ AppData/DS_App.xss | 2 +- NKC_WF/BaseUserControl.cs | 55 +++++++++++++-- .../Images/{test - Copia.svg => test_b.svg} | 0 NKC_WF/NKC_WF.csproj | 10 ++- NKC_WF/WebUserControls/cmp_OOLI_detail.ascx | 28 ++++++++ .../WebUserControls/cmp_OOLI_detail.ascx.cs | 27 ++++++++ .../cmp_OOLI_detail.ascx.designer.cs | 42 +++++++++++ .../WebUserControls/cmp_offOrderDetail.ascx | 51 +++++++++----- .../cmp_offOrderDetail.ascx.cs | 29 ++++++++ .../cmp_offOrderDetail.ascx.designer.cs | 4 +- NKC_WF/WebUserControls/cmp_offlineOrders.ascx | 3 - NKC_WF/WebUserControls/cmp_scrapList.ascx.cs | 48 ------------- 14 files changed, 279 insertions(+), 100 deletions(-) rename NKC_WF/Images/{test - Copia.svg => test_b.svg} (100%) create mode 100644 NKC_WF/WebUserControls/cmp_OOLI_detail.ascx create mode 100644 NKC_WF/WebUserControls/cmp_OOLI_detail.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_OOLI_detail.ascx.designer.cs diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 3bc2ad3..75f285d 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -9417,7 +9417,7 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[8]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[9]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\n FROM dbo.ItemList"; @@ -9430,49 +9430,55 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_IL_getByOrder"; + this._commandCollection[2].CommandText = "dbo.stp_IL_getByOfflineOrder"; this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OffOrdID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_IL_getBySearch"; + this._commandCollection[3].CommandText = "dbo.stp_IL_getByOrder"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemDtmx", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@minStatus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maxStatus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "dbo.stp_IL_getByStatus"; + this._commandCollection[4].CommandText = "dbo.stp_IL_getBySearch"; this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemDtmx", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@minStatus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maxStatus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_IL_updateSheetStatus"; + this._commandCollection[5].CommandText = "dbo.stp_IL_getByStatus"; this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatusID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@minStatus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maxStatus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_IL_updateSheetStatusPU"; + this._commandCollection[6].CommandText = "dbo.stp_IL_updateSheetStatus"; this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatusID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[7].Connection = this.Connection; - this._commandCollection[7].CommandText = "dbo.stp_IL_updateStatus"; + this._commandCollection[7].CommandText = "dbo.stp_IL_updateSheetStatusPU"; this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatusID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[8].Connection = this.Connection; + this._commandCollection[8].CommandText = "dbo.stp_IL_updateStatus"; + this._commandCollection[8].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatusID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -9503,8 +9509,25 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_App.ItemListDataTable getByOrder(global::System.Nullable OrdID) { + public virtual DS_App.ItemListDataTable getByOfflineOrder(global::System.Nullable OffOrdID) { this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((OffOrdID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(OffOrdID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.ItemListDataTable dataTable = new DS_App.ItemListDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_App.ItemListDataTable getByOrder(global::System.Nullable OrdID) { + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((OrdID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(OrdID.Value)); } @@ -9521,7 +9544,7 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.ItemListDataTable getBySearch(global::System.Nullable ItemID, string ItemDtmx, global::System.Nullable minStatus, global::System.Nullable maxStatus) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((ItemID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ItemID.Value)); } @@ -9556,7 +9579,7 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.ItemListDataTable getByStatus(global::System.Nullable minStatus, global::System.Nullable maxStatus) { - this.Adapter.SelectCommand = this.CommandCollection[4]; + this.Adapter.SelectCommand = this.CommandCollection[5]; if ((minStatus.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(minStatus.Value)); } @@ -9976,7 +9999,7 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateSheetStatus(global::System.Nullable SheetID, global::System.Nullable StatusID, string PlaceCod) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; if ((SheetID.HasValue == true)) { command.Parameters[1].Value = ((int)(SheetID.Value)); } @@ -10016,7 +10039,7 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateSheetStatusPU(global::System.Nullable SheetID, string PlaceCod) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; if ((SheetID.HasValue == true)) { command.Parameters[1].Value = ((int)(SheetID.Value)); } @@ -10050,7 +10073,7 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateStatus(global::System.Nullable ItemID, global::System.Nullable StatusID, string PlaceCod) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8]; if ((ItemID.HasValue == true)) { command.Parameters[1].Value = ((int)(ItemID.Value)); } diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 2555237..b26a301 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -586,6 +586,17 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite + + + + dbo.stp_IL_getByOfflineOrder + + + + + + + diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index b158123..bbfe07a 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + diff --git a/NKC_WF/BaseUserControl.cs b/NKC_WF/BaseUserControl.cs index f627ac7..1c75a29 100644 --- a/NKC_WF/BaseUserControl.cs +++ b/NKC_WF/BaseUserControl.cs @@ -1,10 +1,8 @@ -using System; +using AppData; +using Newtonsoft.Json; +using SteamWare; +using System; using System.Collections.Generic; -using System.Linq; -using System.Web; -using AppData; -using System.Web.UI; -using System.Web.UI.WebControls; namespace NKC_WF { @@ -50,5 +48,50 @@ namespace NKC_WF return SteamWare.user_std.UtSn.Traduci(lemma); } + protected Dictionary anagMateriali + { + set + { + string jsonData = JsonConvert.SerializeObject(value); + memLayer.ML.setRSV("anagMateriali", jsonData, 60); + } + get + { + Dictionary answ = new Dictionary(); + //cerco in redis... + string rawData = memLayer.ML.getRSV("anagMateriali"); + if (!string.IsNullOrEmpty(rawData)) + { + answ = JsonConvert.DeserializeObject>(rawData); + } + // sennò nel DB e salvo in redis... + else + { + var tabMat = DataLayer.man.taMat.GetData(); + foreach (var item in tabMat) + { + answ.Add(item.MatID, item.MatDesc); + } + // salvo in redis + anagMateriali = answ; + } + // restituisco + return answ; + } + } + + public string matByKey(object _matId) + { + string answ = ""; + int matId = 0; + int.TryParse(_matId.ToString(), out matId); + try + { + answ = anagMateriali[matId]; + } + catch + { } + return answ; + } } } \ No newline at end of file diff --git a/NKC_WF/Images/test - Copia.svg b/NKC_WF/Images/test_b.svg similarity index 100% rename from NKC_WF/Images/test - Copia.svg rename to NKC_WF/Images/test_b.svg diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index ca44dfc..87d5829 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -209,7 +209,7 @@ - + @@ -234,6 +234,7 @@ + @@ -596,6 +597,13 @@ cmp_offOrderDetail.ascx + + cmp_OOLI_detail.ascx + ASPXCodeBehind + + + cmp_OOLI_detail.ascx + cmp_orderStatus.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_OOLI_detail.ascx b/NKC_WF/WebUserControls/cmp_OOLI_detail.ascx new file mode 100644 index 0000000..4a6497a --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_OOLI_detail.ascx @@ -0,0 +1,28 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_OOLI_detail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_OOLI_detail" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_OOLI_detail.ascx.cs b/NKC_WF/WebUserControls/cmp_OOLI_detail.ascx.cs new file mode 100644 index 0000000..e78916b --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_OOLI_detail.ascx.cs @@ -0,0 +1,27 @@ +using System; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_OOLI_detail : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + public int OffOrdId + { + get + { + int answ = 0; + int.TryParse(hfOffOrderId.Value, out answ); + return answ; + } + set + { + hfOffOrderId.Value = value.ToString(); + // faccio udpate svg... + grView.DataBind(); + } + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_OOLI_detail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_OOLI_detail.ascx.designer.cs new file mode 100644 index 0000000..ceab143 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_OOLI_detail.ascx.designer.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace NKC_WF.WebUserControls { + + + public partial class cmp_OOLI_detail { + + /// + /// Controllo grView. + /// + /// + /// 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.GridView grView; + + /// + /// Controllo ods. + /// + /// + /// 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.ObjectDataSource ods; + + /// + /// Controllo hfOffOrderId. + /// + /// + /// 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.HiddenField hfOffOrderId; + } +} diff --git a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx index c41c79d..eeb272c 100644 --- a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx @@ -1,17 +1,36 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_offOrderDetail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_offOrderDetail" %> - - - - - - - - - - - - - - - - \ No newline at end of file +<%@ Register Src="~/WebUserControls/cmp_OOLI_detail.ascx" TagPrefix="uc1" TagName="cmp_OOLI_detail" %> + + +
+ + +
+
+ + + +
+
+
+
+ MAKE CNC PROG +
+
+ PRINT LABELS +
+
+
+
+ +
+
+
+
+ + + + + + +
diff --git a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs index 757a944..ddb9539 100644 --- a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs @@ -1,4 +1,7 @@ using System; +using System.IO; +using System.Web.UI.HtmlControls; +using System.Web.UI.WebControls; namespace NKC_WF.WebUserControls { @@ -20,7 +23,33 @@ namespace NKC_WF.WebUserControls set { hfOffOrderId.Value = value.ToString(); + // faccio udpate svg... + frmView.DataBind(); } } + + protected void frmView_DataBound(object sender, EventArgs e) + { + try + { + Label filePath = (Label)frmView.FindControl("DrawFilePathLabel"); + string filename = Server.MapPath(filePath.Text); + string svgRawData = File.ReadAllText(filename); + HtmlGenericControl svgControl = (HtmlGenericControl)frmView.FindControl("svgTable"); + svgControl.InnerHtml = svgRawData; + } + catch (Exception exc) + { } + } + + protected void lbtMakeCnc_Click(object sender, EventArgs e) + { + + } + + protected void lbtPrintLabels_Click(object sender, EventArgs e) + { + + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.designer.cs index 3e0b387..7f5492a 100644 --- a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.designer.cs @@ -13,13 +13,13 @@ namespace NKC_WF.WebUserControls { public partial class cmp_offOrderDetail { /// - /// Controllo detView. + /// Controllo frmView. /// /// /// 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.DetailsView detView; + protected global::System.Web.UI.WebControls.FormView frmView; /// /// Controllo ods. diff --git a/NKC_WF/WebUserControls/cmp_offlineOrders.ascx b/NKC_WF/WebUserControls/cmp_offlineOrders.ascx index 71f355f..9f555bc 100644 --- a/NKC_WF/WebUserControls/cmp_offlineOrders.ascx +++ b/NKC_WF/WebUserControls/cmp_offlineOrders.ascx @@ -10,7 +10,6 @@
- @@ -25,9 +24,7 @@ - <%----%> - <%----%> diff --git a/NKC_WF/WebUserControls/cmp_scrapList.ascx.cs b/NKC_WF/WebUserControls/cmp_scrapList.ascx.cs index 61e2216..7de1e89 100644 --- a/NKC_WF/WebUserControls/cmp_scrapList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_scrapList.ascx.cs @@ -1,8 +1,5 @@ using AppData; -using Newtonsoft.Json; -using SteamWare; using System; -using System.Collections.Generic; using System.Web.UI.WebControls; namespace NKC_WF.WebUserControls @@ -23,51 +20,6 @@ namespace NKC_WF.WebUserControls grView.PageSize = mod_righePag.numRowPag; } - protected Dictionary anagMateriali - { - set - { - string jsonData = JsonConvert.SerializeObject(value); - memLayer.ML.setRSV("anagMateriali", jsonData, 60); - } - get - { - Dictionary answ = new Dictionary(); - //cerco in redis... - string rawData = memLayer.ML.getRSV("anagMateriali"); - if (!string.IsNullOrEmpty(rawData)) - { - answ = JsonConvert.DeserializeObject>(rawData); - } - // sennò nel DB e salvo in redis... - else - { - var tabMat = DataLayer.man.taMat.GetData(); - foreach (var item in tabMat) - { - answ.Add(item.MatID, item.MatDesc); - } - // salvo in redis - anagMateriali = answ; - } - // restituisco - return answ; - } - } - - public string matByKey(object _matId) - { - string answ = ""; - int matId = 0; - int.TryParse(_matId.ToString(), out matId); - try - { - answ = anagMateriali[matId]; - } - catch - { } - return answ; - } protected void chkToggle_CheckedChanged(object sender, EventArgs e) {