From b1e0e9bdb77331a0ac38f4a66140f4f207f7e500 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 Oct 2022 19:09:20 +0200 Subject: [PATCH] Fix editing - materiali - special part - plants --- AppData/DS_App.Designer.cs | 198 +++++++++++++++++- AppData/DS_App.xsd | 66 +++++- AppData/DS_App.xss | 4 +- AppData/DataLayer.cs | 3 + NKC_WF/WebUserControls/cmp_MaterialsMgmt.ascx | 12 +- NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx | 47 +++++ .../WebUserControls/cmp_SpecPartMgmt.ascx.cs | 9 +- .../cmp_SpecPartMgmt.ascx.designer.cs | 20 +- NKC_WF/WebUserControls/cmp_plantMgmt.ascx | 8 +- 9 files changed, 346 insertions(+), 21 deletions(-) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index f54244f..4d0a00e 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -20257,6 +20257,8 @@ namespace AppData { private global::System.Data.DataColumn columnSpecPartCod; + private global::System.Data.DataColumn columnModelCod; + private global::System.Data.DataColumn columnSpecPartDescr; private global::System.Data.DataColumn columnCartCode; @@ -20302,6 +20304,14 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn ModelCodColumn { + get { + return this.columnModelCod; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn SpecPartDescrColumn { @@ -20355,10 +20365,11 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] - public SpecialPartsRow AddSpecialPartsRow(string SpecPartCod, string SpecPartDescr, string CartCode) { + public SpecialPartsRow AddSpecialPartsRow(string SpecPartCod, string ModelCod, string SpecPartDescr, string CartCode) { SpecialPartsRow rowSpecialPartsRow = ((SpecialPartsRow)(this.NewRow())); object[] columnValuesArray = new object[] { SpecPartCod, + ModelCod, SpecPartDescr, CartCode}; rowSpecialPartsRow.ItemArray = columnValuesArray; @@ -20391,6 +20402,7 @@ namespace AppData { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.columnSpecPartCod = base.Columns["SpecPartCod"]; + this.columnModelCod = base.Columns["ModelCod"]; this.columnSpecPartDescr = base.Columns["SpecPartDescr"]; this.columnCartCode = base.Columns["CartCode"]; } @@ -20400,6 +20412,8 @@ namespace AppData { private void InitClass() { this.columnSpecPartCod = new global::System.Data.DataColumn("SpecPartCod", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnSpecPartCod); + this.columnModelCod = new global::System.Data.DataColumn("ModelCod", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnModelCod); this.columnSpecPartDescr = new global::System.Data.DataColumn("SpecPartDescr", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnSpecPartDescr); this.columnCartCode = new global::System.Data.DataColumn("CartCode", typeof(string), null, global::System.Data.MappingType.Element); @@ -20409,6 +20423,8 @@ namespace AppData { this.columnSpecPartCod.AllowDBNull = false; this.columnSpecPartCod.Unique = true; this.columnSpecPartCod.MaxLength = 50; + this.columnModelCod.AllowDBNull = false; + this.columnModelCod.MaxLength = 50; this.columnSpecPartDescr.AllowDBNull = false; this.columnSpecPartDescr.MaxLength = 250; this.columnCartCode.AllowDBNull = false; @@ -28972,6 +28988,17 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string ModelCod { + get { + return ((string)(this[this.tableSpecialParts.ModelCodColumn])); + } + set { + this[this.tableSpecialParts.ModelCodColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string SpecPartDescr { @@ -46824,6 +46851,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "SpecialParts"; tableMapping.ColumnMappings.Add("SpecPartCod", "SpecPartCod"); + tableMapping.ColumnMappings.Add("ModelCod", "ModelCod"); tableMapping.ColumnMappings.Add("SpecPartDescr", "SpecPartDescr"); tableMapping.ColumnMappings.Add("CartCode", "CartCode"); this._adapter.TableMappings.Add(tableMapping); @@ -46834,19 +46862,22 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecPartCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecPartCod", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [SpecialParts] ([SpecPartCod], [SpecPartDescr], [CartCode]) VALUES (@" + - "SpecPartCod, @SpecPartDescr, @CartCode);\r\nSELECT SpecPartCod, SpecPartDescr, Car" + - "tCode FROM SpecialParts WHERE (SpecPartCod = @SpecPartCod)"; + this._adapter.InsertCommand.CommandText = "INSERT INTO [SpecialParts] ([SpecPartCod], [ModelCod], [SpecPartDescr], [CartCode" + + "]) VALUES (@SpecPartCod, @ModelCod, @SpecPartDescr, @CartCode);\r\nSELECT SpecPart" + + "Cod, ModelCod, SpecPartDescr, CartCode FROM SpecialParts WHERE (SpecPartCod = @S" + + "pecPartCod)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecPartCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecPartCod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ModelCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ModelCod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecPartDescr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecPartDescr", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [SpecialParts] SET [SpecPartCod] = @SpecPartCod, [SpecPartDescr] = @SpecPartDescr, [CartCode] = @CartCode WHERE (([SpecPartCod] = @Original_SpecPartCod)); -SELECT SpecPartCod, SpecPartDescr, CartCode FROM SpecialParts WHERE (SpecPartCod = @SpecPartCod)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [SpecialParts] SET [SpecPartCod] = @SpecPartCod, [ModelCod] = @ModelCod, [SpecPartDescr] = @SpecPartDescr, [CartCode] = @CartCode WHERE (([SpecPartCod] = @Original_SpecPartCod)); +SELECT SpecPartCod, ModelCod, SpecPartDescr, CartCode FROM SpecialParts WHERE (SpecPartCod = @SpecPartCod)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecPartCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecPartCod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ModelCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ModelCod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecPartDescr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecPartDescr", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecPartCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecPartCod", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); @@ -46862,11 +46893,36 @@ SELECT SpecPartCod, SpecPartDescr, CartCode FROM SpecialParts WHERE (SpecPartCod [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT * FROM SpecialParts"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM SpecialParts"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "dbo.stp_SpecPart_delete"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecPartCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_SpecPart_insert"; + 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("@SpecPartCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ModelCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecPartDescr", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_SpecPart_update"; + 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("@SpecPartCod", 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("@ModelCod", 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("@SpecPartDescr", global::System.Data.SqlDbType.NVarChar, 250, 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("@CartCode", 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("@Original_SpecPartCod", 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()] @@ -46921,6 +46977,132 @@ SELECT SpecPartCod, SpecPartDescr, CartCode FROM SpecialParts WHERE (SpecPartCod public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int deleteQuery(string Original_SpecPartCod) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((Original_SpecPartCod == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(Original_SpecPartCod)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int insertQuery(string SpecPartCod, string ModelCod, string SpecPartDescr, string CartCode) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + if ((SpecPartCod == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(SpecPartCod)); + } + if ((ModelCod == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(ModelCod)); + } + if ((SpecPartDescr == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(SpecPartDescr)); + } + if ((CartCode == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(CartCode)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int updateQuery(string SpecPartCod, string ModelCod, string SpecPartDescr, string CartCode, string Original_SpecPartCod) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + if ((SpecPartCod == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(SpecPartCod)); + } + if ((ModelCod == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(ModelCod)); + } + if ((SpecPartDescr == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(SpecPartDescr)); + } + if ((CartCode == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(CartCode)); + } + if ((Original_SpecPartCod == null)) { + command.Parameters[5].Value = global::System.DBNull.Value; + } + else { + command.Parameters[5].Value = ((string)(Original_SpecPartCod)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } } /// diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index f342d41..b164393 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -4076,27 +4076,30 @@ SELECT PlantCod, PlantDescr FROM PlantList WHERE (PlantCod = @PlantCod) - INSERT INTO [SpecialParts] ([SpecPartCod], [SpecPartDescr], [CartCode]) VALUES (@SpecPartCod, @SpecPartDescr, @CartCode); -SELECT SpecPartCod, SpecPartDescr, CartCode FROM SpecialParts WHERE (SpecPartCod = @SpecPartCod) + INSERT INTO [SpecialParts] ([SpecPartCod], [ModelCod], [SpecPartDescr], [CartCode]) VALUES (@SpecPartCod, @ModelCod, @SpecPartDescr, @CartCode); +SELECT SpecPartCod, ModelCod, SpecPartDescr, CartCode FROM SpecialParts WHERE (SpecPartCod = @SpecPartCod) + - - SELECT * FROM SpecialParts + + SELECT * +FROM SpecialParts - UPDATE [SpecialParts] SET [SpecPartCod] = @SpecPartCod, [SpecPartDescr] = @SpecPartDescr, [CartCode] = @CartCode WHERE (([SpecPartCod] = @Original_SpecPartCod)); -SELECT SpecPartCod, SpecPartDescr, CartCode FROM SpecialParts WHERE (SpecPartCod = @SpecPartCod) + UPDATE [SpecialParts] SET [SpecPartCod] = @SpecPartCod, [ModelCod] = @ModelCod, [SpecPartDescr] = @SpecPartDescr, [CartCode] = @CartCode WHERE (([SpecPartCod] = @Original_SpecPartCod)); +SELECT SpecPartCod, ModelCod, SpecPartDescr, CartCode FROM SpecialParts WHERE (SpecPartCod = @SpecPartCod) + @@ -4107,10 +4110,52 @@ SELECT SpecPartCod, SpecPartDescr, CartCode FROM SpecialParts WHERE (SpecPartCod + - + + + + + dbo.stp_SpecPart_delete + + + + + + + + + + + dbo.stp_SpecPart_insert + + + + + + + + + + + + + + dbo.stp_SpecPart_update + + + + + + + + + + + + @@ -5770,6 +5815,13 @@ SELECT SpecPartCod, SpecPartDescr, CartCode FROM SpecialParts WHERE (SpecPartCod + + + + + + + diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 00ed297..bbe0dd7 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. --> - + @@ -52,7 +52,7 @@ - + diff --git a/AppData/DataLayer.cs b/AppData/DataLayer.cs index 0afaaaf..b5a31ef 100644 --- a/AppData/DataLayer.cs +++ b/AppData/DataLayer.cs @@ -57,6 +57,7 @@ namespace AppData public DS_AppTableAdapters.SheetListTableAdapter taSHL; public DS_AppTableAdapters.SheetStatsTableAdapter taShStats; public DS_AppTableAdapters.SheetsPreviewTableAdapter taSP; + public DS_AppTableAdapters.SpecialPartsTableAdapter taSpecialPart; public DS_AppTableAdapters.StatusDecodeTableAdapter taStatDec; public DS_AppTableAdapters.StatusLogTableAdapter taStatLog; public DS_AppTableAdapters.StackListTableAdapter taSTL; @@ -201,6 +202,7 @@ namespace AppData taSTL = new DS_AppTableAdapters.StackListTableAdapter(); taSHL = new DS_AppTableAdapters.SheetListTableAdapter(); taSP = new DS_AppTableAdapters.SheetsPreviewTableAdapter(); + taSpecialPart = new DS_AppTableAdapters.SpecialPartsTableAdapter(); taElPos = new DS_ReportTableAdapters.ElencoPostazioniTableAdapter(); taPJQ = new DS_ReportTableAdapters.PrintJobQueueTableAdapter(); taRepBin = new DS_ReportTableAdapters.stp_prt_BinTableAdapter(); @@ -259,6 +261,7 @@ namespace AppData taSTL.Connection.ConnectionString = connString; taSHL.Connection.ConnectionString = connString; taSP.Connection.ConnectionString = connString; + taSpecialPart.Connection.ConnectionString = connString; taElPos.Connection.ConnectionString = connString; taPJQ.Connection.ConnectionString = connString; taRepBin.Connection.ConnectionString = connString; diff --git a/NKC_WF/WebUserControls/cmp_MaterialsMgmt.ascx b/NKC_WF/WebUserControls/cmp_MaterialsMgmt.ascx index 8f8029f..31d1250 100644 --- a/NKC_WF/WebUserControls/cmp_MaterialsMgmt.ascx +++ b/NKC_WF/WebUserControls/cmp_MaterialsMgmt.ascx @@ -14,7 +14,7 @@ - + @@ -63,6 +63,16 @@ + <%-- + + + + + + + + --%> diff --git a/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx b/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx index 9a1251b..8a6b100 100644 --- a/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx +++ b/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx @@ -1 +1,48 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_SpecPartMgmt.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_SpecPartMgmt" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx.cs b/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx.cs index d49a88a..e3fde3e 100644 --- a/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx.cs @@ -7,11 +7,18 @@ using System.Web.UI.WebControls; namespace NKC_WF.WebUserControls { - public partial class cmp_SpecPartMgmt : System.Web.UI.UserControl + public partial class cmp_SpecPartMgmt : BaseUserControl { protected void Page_Load(object sender, EventArgs e) { } + + protected void lbtAddNew_Click(object sender, EventArgs e) + { + DLMan.taSpecialPart.insertQuery("NEWCODE","MODEL", "New Special Prod description", "CC"); + grView.SelectedIndex = -1; + grView.DataBind(); + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx.designer.cs index f4eaa6f..7d84cfd 100644 --- a/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_SpecPartMgmt.ascx.designer.cs @@ -3,7 +3,7 @@ // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ @@ -13,5 +13,23 @@ namespace NKC_WF.WebUserControls public partial class cmp_SpecPartMgmt { + + /// + /// grView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// ods control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; } } diff --git a/NKC_WF/WebUserControls/cmp_plantMgmt.ascx b/NKC_WF/WebUserControls/cmp_plantMgmt.ascx index 106839a..0c8f896 100644 --- a/NKC_WF/WebUserControls/cmp_plantMgmt.ascx +++ b/NKC_WF/WebUserControls/cmp_plantMgmt.ascx @@ -6,7 +6,7 @@ - + <%----%> @@ -24,6 +24,12 @@ + + + +