Inserito detail x item in details view...

This commit is contained in:
Samuele E. Locatelli
2019-10-15 18:37:02 +02:00
parent 72e3bbc16d
commit a7bbbb7ef5
14 changed files with 279 additions and 100 deletions
+46 -23
View File
@@ -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<int> OrdID) {
public virtual DS_App.ItemListDataTable getByOfflineOrder(global::System.Nullable<int> 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<int> 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<int> ItemID, string ItemDtmx, global::System.Nullable<int> minStatus, global::System.Nullable<int> 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<int> minStatus, global::System.Nullable<int> 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<int> SheetID, global::System.Nullable<int> 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<int> 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<int> ItemID, global::System.Nullable<int> 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));
}
+11
View File
@@ -586,6 +586,17 @@ SELECT ItemID, ItemStatus, OrdID, ItemDtmx, ItemExtCode, ItemDesc, ItemNote, Ite
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="Sauder_NKCConnectionString (Settings)" DbObjectName="Sauder_NKC.dbo.stp_IL_getByOfflineOrder" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByOfflineOrder" GetMethodModifier="Public" GetMethodName="getByOfflineOrder" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByOfflineOrder" UserSourceName="getByOfflineOrder">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_IL_getByOfflineOrder</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@OffOrdID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="Sauder_NKCConnectionString (Settings)" DbObjectName="Sauder_NKC.dbo.stp_IL_getByOrder" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByOrder" GetMethodModifier="Public" GetMethodName="getByOrder" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByOrder" UserSourceName="getByOrder">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
+1 -1
View File
@@ -4,7 +4,7 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-11" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="51" ViewPortY="-11" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:BatchList" ZOrder="7" X="90" Y="375" Height="381" Width="244" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:StackList" ZOrder="15" X="434" Y="674" Height="343" Width="222" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
+49 -6
View File
@@ -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<int, string> anagMateriali
{
set
{
string jsonData = JsonConvert.SerializeObject(value);
memLayer.ML.setRSV("anagMateriali", jsonData, 60);
}
get
{
Dictionary<int, string> answ = new Dictionary<int, string>();
//cerco in redis...
string rawData = memLayer.ML.getRSV("anagMateriali");
if (!string.IsNullOrEmpty(rawData))
{
answ = JsonConvert.DeserializeObject<Dictionary<int, string>>(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;
}
}
}

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

+9 -1
View File
@@ -209,7 +209,7 @@
<Content Include="DevUtils.aspx" />
<Content Include="Images\MT0006110.jpg" />
<Content Include="Images\test - Copia %282%29.svg" />
<Content Include="Images\test - Copia.svg" />
<Content Include="Images\test_b.svg" />
<Content Include="Images\test.svg" />
<Content Include="Images\Test11.svg" />
<Content Include="Images\WIP.png" />
@@ -234,6 +234,7 @@
<Content Include="WebUserControls\cmp_numRow.ascx" />
<Content Include="WebUserControls\cmp_offlineOrders.ascx" />
<Content Include="WebUserControls\cmp_offOrderDetail.ascx" />
<Content Include="WebUserControls\cmp_OOLI_detail.ascx" />
<Content Include="WebUserControls\cmp_orderStatus.ascx" />
<Content Include="WebUserControls\cmp_scrapList.ascx" />
<Content Include="WebUserControls\cmp_stackBuilding.ascx" />
@@ -596,6 +597,13 @@
<Compile Include="WebUserControls\cmp_offOrderDetail.ascx.designer.cs">
<DependentUpon>cmp_offOrderDetail.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\cmp_OOLI_detail.ascx.cs">
<DependentUpon>cmp_OOLI_detail.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\cmp_OOLI_detail.ascx.designer.cs">
<DependentUpon>cmp_OOLI_detail.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\cmp_orderStatus.ascx.cs">
<DependentUpon>cmp_orderStatus.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -0,0 +1,28 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_OOLI_detail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_OOLI_detail" %>
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="ItemID" DataSourceID="ods" AllowPaging="True" CssClass="table table-sm table-condensed table-striped" AllowSorting="True">
<Columns>
<asp:TemplateField HeaderText="Mat" SortExpression="MatID">
<ItemTemplate>
<asp:Label runat="server" ID="lblMatId" Text='<%# matByKey(Eval("MatID")) %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Code" SortExpression="ItemExtCode">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("ItemExtCode") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Desc" SortExpression="ItemDesc">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("ItemDesc") %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByOfflineOrder" TypeName="AppData.DS_AppTableAdapters.ItemListTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="hfOffOrderId" DefaultValue="0" Name="OffOrdID" PropertyName="Value" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfOffOrderId" />
@@ -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();
}
}
}
}
+42
View File
@@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace NKC_WF.WebUserControls {
public partial class cmp_OOLI_detail {
/// <summary>
/// Controllo grView.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView grView;
/// <summary>
/// Controllo ods.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
/// <summary>
/// Controllo hfOffOrderId.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfOffOrderId;
}
}
+35 -16
View File
@@ -1,17 +1,36 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_offOrderDetail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_offOrderDetail" %>
<asp:DetailsView ID="detView" runat="server" Height="50px" Width="125px" AutoGenerateRows="False" DataKeyNames="OrdID" DataSourceID="ods">
<Fields>
<asp:BoundField DataField="OrdID" HeaderText="OrdID" InsertVisible="False" ReadOnly="True" SortExpression="OrdID" />
<asp:BoundField DataField="CreationDate" HeaderText="CreationDate" SortExpression="CreationDate" />
<asp:BoundField DataField="OrdStatus" HeaderText="OrdStatus" SortExpression="OrdStatus" />
<asp:BoundField DataField="StatusDesc" HeaderText="StatusDesc" ReadOnly="True" SortExpression="StatusDesc" />
<asp:BoundField DataField="NumItems" HeaderText="NumItems" SortExpression="NumItems" />
<asp:BoundField DataField="DrawFilePath" HeaderText="DrawFilePath" SortExpression="DrawFilePath" />
</Fields>
</asp:DetailsView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByKey" TypeName="AppData.DS_AppTableAdapters.OfflineOrderListTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="hfOffOrderId" DefaultValue="0" Name="OrdId" PropertyName="Value" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfOffOrderId" />
<%@ Register Src="~/WebUserControls/cmp_OOLI_detail.ascx" TagPrefix="uc1" TagName="cmp_OOLI_detail" %>
<div class="border border-info rounded p-2 text-center mb-2">
<asp:FormView runat="server" ID="frmView" DataKeyNames="OrdID" DataSourceID="ods" OnDataBound="frmView_DataBound">
<ItemTemplate>
<div class="row">
<div class="col">
<svg width="710" height="305" viewBox='0 0 1420 710' xmlns='http://www.w3.org/2000/svg' runat="server" id="svgTable">
</svg>
<asp:Label ID="DrawFilePathLabel" runat="server" Text='<%# Eval("DrawFilePath") %>' Visible="false" />
</div>
</div>
<div class="row my-2">
<div class="col">
<asp:LinkButton runat="server" ID="lbtMakeCnc" CssClass="btn btn-success btn-block" Visible='<%# Eval("OrdStatus").ToString()=="0" %>' OnClick="lbtMakeCnc_Click"><i class="fa fa-laptop" aria-hidden="true"></i> MAKE CNC PROG</asp:LinkButton>
</div>
<div class="col">
<asp:LinkButton runat="server" ID="lbtPrintLabels" CssClass="btn btn-info btn-block" Visible='<%# Eval("OrdStatus").ToString()!="0" %>' OnClick="lbtPrintLabels_Click"><i class="fa fa-print" aria-hidden="true"></i> PRINT LABELS</asp:LinkButton>
</div>
</div>
<div class="row">
<div class="col">
<uc1:cmp_OOLI_detail runat="server" id="cmp_OOLI_detail" OffOrdId='<%# Eval("OrdID") %>' />
</div>
</div>
</ItemTemplate>
</asp:FormView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByKey" TypeName="AppData.DS_AppTableAdapters.OfflineOrderListTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="hfOffOrderId" DefaultValue="0" Name="OrdId" PropertyName="Value" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfOffOrderId" />
</div>
@@ -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)
{
}
}
}
+2 -2
View File
@@ -13,13 +13,13 @@ namespace NKC_WF.WebUserControls {
public partial class cmp_offOrderDetail {
/// <summary>
/// Controllo detView.
/// Controllo frmView.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.DetailsView detView;
protected global::System.Web.UI.WebControls.FormView frmView;
/// <summary>
/// Controllo ods.
@@ -10,7 +10,6 @@
</div>
<div class="card-body">
<uc1:cmp_offOrderDetail runat="server" ID="cmp_offOrderDetail" />
<asp:GridView ID="grView" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="OrdID" DataSourceID="ods" CssClass="table table-sm table-condensed table-striped" AllowSorting="True" OnSelectedIndexChanged="grView_SelectedIndexChanged">
<SelectedRowStyle CssClass="table-info" />
<EmptyDataTemplate>
@@ -25,9 +24,7 @@
<asp:LinkButton ID="lbtSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip="Select" CssClass="btn btn-sm btn-primary"><i class="fa fa-search" aria-hidden="true"></i></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="OrdID" HeaderText="OrdID" InsertVisible="False" ReadOnly="True" SortExpression="OrdID" />--%>
<asp:BoundField DataField="CreationDate" HeaderText="Created" SortExpression="CreationDate" />
<%--<asp:BoundField DataField="OrdStatus" HeaderText="OrdStatus" SortExpression="OrdStatus" />--%>
<asp:BoundField DataField="StatusDesc" HeaderText="Status" ReadOnly="True" SortExpression="StatusDesc" />
<asp:BoundField DataField="NumItems" HeaderText="# Items" SortExpression="NumItems" />
</Columns>
@@ -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<int, string> anagMateriali
{
set
{
string jsonData = JsonConvert.SerializeObject(value);
memLayer.ML.setRSV("anagMateriali", jsonData, 60);
}
get
{
Dictionary<int, string> answ = new Dictionary<int, string>();
//cerco in redis...
string rawData = memLayer.ML.getRSV("anagMateriali");
if (!string.IsNullOrEmpty(rawData))
{
answ = JsonConvert.DeserializeObject<Dictionary<int, string>>(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)
{