diff --git a/MP-Admin/GestKIT.aspx b/MP-Admin/GestKIT.aspx new file mode 100644 index 00000000..4ed8a390 --- /dev/null +++ b/MP-Admin/GestKIT.aspx @@ -0,0 +1,13 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" CodeBehind="GestKIT.aspx.cs" Inherits="MoonProAdmin.GestKIT" %> + +<%@ Register Src="~/WebUserControls/mod_barcode.ascx" TagPrefix="uc1" TagName="mod_barcode" %> +<%@ Register Src="~/WebUserControls/mod_gestPromODL.ascx" TagPrefix="uc1" TagName="mod_gestPromODL" %> +<%@ Register Src="~/WebUserControls/mod_gestKIT.ascx" TagPrefix="uc1" TagName="mod_gestKIT" %> + + + + + + + + diff --git a/MP-Admin/GestKIT.aspx.cs b/MP-Admin/GestKIT.aspx.cs new file mode 100644 index 00000000..fba36b1d --- /dev/null +++ b/MP-Admin/GestKIT.aspx.cs @@ -0,0 +1,43 @@ +using System; + +namespace MoonProAdmin +{ + public partial class GestKIT : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + mod_barcode.eh_comandoRegistrato += Mod_barcode_eh_comandoRegistrato; + mod_barcode.eh_dataRead += Mod_barcode_eh_dataRead; + } + + private void Mod_barcode_eh_dataRead(object sender, EventArgs e) + { + // verifico input su KIT x lettura "grezza" + string rawInput = mod_barcode.rawInput; + mod_gestKIT.lastInput = rawInput; + mod_gestKIT.doUpdate(); + } + + private void Mod_barcode_eh_comandoRegistrato(object sender, EventArgs e) + { + // verifico input su KIT x comando completo + string BCodeVal = mod_barcode.BCodeVal; + // se è un ORDINE... procedo! + if (BCodeVal.IndexOf("OPR") == 0) + { + mod_gestKIT.codOrd = mod_barcode.codOrd; + mod_gestKIT.codArt = mod_barcode.codArt; + mod_gestKIT.kitCode = mod_barcode.kitCode; + mod_gestKIT.qta = mod_barcode.qta; + mod_gestKIT.descArt = mod_barcode.descArt; + string tempData = string.Format("OPR: {0}, ART: {1}, KIT: {2}, QTA: {3}, Descr: {4}", mod_barcode.codOrd, mod_barcode.codArt, mod_barcode.kitCode, mod_barcode.qta, mod_barcode.descArt); + mod_gestKIT.lastInput = tempData; + } + else + { + mod_gestKIT.lastInput = mod_barcode.BCodeVal; + } + mod_gestKIT.doUpdate(); + } + } +} \ No newline at end of file diff --git a/MP-Admin/GestKIT.aspx.designer.cs b/MP-Admin/GestKIT.aspx.designer.cs new file mode 100644 index 00000000..b269de70 --- /dev/null +++ b/MP-Admin/GestKIT.aspx.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 MoonProAdmin { + + + public partial class GestKIT { + + /// + /// Controllo mod_gestKIT. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MoonProAdmin.WebUserControls.mod_gestKIT mod_gestKIT; + + /// + /// Controllo mod_barcode. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MoonProAdmin.WebUserControls.mod_barcode mod_barcode; + + /// + /// Controllo mod_gestPromODL. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MoonProAdmin.WebUserControls.mod_gestPromODL mod_gestPromODL; + } +} diff --git a/MP-Admin/MP-Admin.csproj b/MP-Admin/MP-Admin.csproj index 81529220..7342f7d0 100644 --- a/MP-Admin/MP-Admin.csproj +++ b/MP-Admin/MP-Admin.csproj @@ -252,6 +252,7 @@ + @@ -457,6 +458,13 @@ gestioneODL.aspx + + GestKIT.aspx + ASPXCodeBehind + + + GestKIT.aspx + gestPromesseODL.aspx ASPXCodeBehind @@ -601,6 +609,13 @@ mod_gestioneODL.ascx + + mod_gestKIT.ascx + ASPXCodeBehind + + + mod_gestKIT.ascx + mod_gestPromODL.ascx ASPXCodeBehind @@ -849,6 +864,7 @@ + diff --git a/MP-Admin/WebUserControls/mod_barcode.ascx.cs b/MP-Admin/WebUserControls/mod_barcode.ascx.cs index 207eba8a..56f91224 100644 --- a/MP-Admin/WebUserControls/mod_barcode.ascx.cs +++ b/MP-Admin/WebUserControls/mod_barcode.ascx.cs @@ -9,108 +9,7 @@ namespace MoonProAdmin.WebUserControls { public partial class mod_barcode : System.Web.UI.UserControl { - - #region variabili in sessione - - /// - /// UID formattato con "_" - /// - public string uid - { - get - { - return this.UniqueID.Replace("$", "_").Replace("-", "_"); - } - } - - protected string codArt - { - get - { - return memLayer.ML.StringSessionObj(string.Format("codArt_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("codArt_{0}", uid), value); - } - } - protected string descArt - { - get - { - return memLayer.ML.StringSessionObj(string.Format("descArt_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("descArt_{0}", uid), value); - } - } - protected string kitCode - { - get - { - return memLayer.ML.StringSessionObj(string.Format("kitCode_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("kitCode_{0}", uid), value); - } - } - protected string codOrd - { - get - { - return memLayer.ML.StringSessionObj(string.Format("codOrd_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("codOrd_{0}", uid), value); - } - } - protected int qta - { - get - { - return memLayer.ML.IntSessionObj(string.Format("qta_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("qta_{0}", uid), value); - } - } - protected string idxMacc - { - get - { - return memLayer.ML.StringSessionObj(string.Format("idxMacc_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("idxMacc_{0}", uid), value); - } - } - protected string nomeMacc - { - get - { - return memLayer.ML.StringSessionObj(string.Format("nomeMacc_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("nomeMacc_{0}", uid), value); - } - } - protected string codGruppo - { - get - { - return memLayer.ML.StringSessionObj(string.Format("codGruppo_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("codGruppo_{0}", uid), value); - } - } + #region setup VARS /// /// RegExp x RESET / CANCEL @@ -128,6 +27,111 @@ namespace MoonProAdmin.WebUserControls /// RegExp x Replace da Find (se vettore è | delimited) /// protected string regExp_Replace = memLayer.ML.cdv("regExp_Replace"); + + #endregion + + #region variabili in sessione + + /// + /// UID formattato con "_" + /// + public string uid + { + get + { + return this.UniqueID.Replace("$", "_").Replace("-", "_"); + } + } + + public string codArt + { + get + { + return memLayer.ML.StringSessionObj(string.Format("codArt_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("codArt_{0}", uid), value); + } + } + public string descArt + { + get + { + return memLayer.ML.StringSessionObj(string.Format("descArt_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("descArt_{0}", uid), value); + } + } + public string kitCode + { + get + { + return memLayer.ML.StringSessionObj(string.Format("kitCode_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("kitCode_{0}", uid), value); + } + } + public string codOrd + { + get + { + return memLayer.ML.StringSessionObj(string.Format("codOrd_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("codOrd_{0}", uid), value); + } + } + public int qta + { + get + { + return memLayer.ML.IntSessionObj(string.Format("qta_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("qta_{0}", uid), value); + } + } + public string idxMacc + { + get + { + return memLayer.ML.StringSessionObj(string.Format("idxMacc_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("idxMacc_{0}", uid), value); + } + } + public string nomeMacc + { + get + { + return memLayer.ML.StringSessionObj(string.Format("nomeMacc_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("nomeMacc_{0}", uid), value); + } + } + public string codGruppo + { + get + { + return memLayer.ML.StringSessionObj(string.Format("codGruppo_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("codGruppo_{0}", uid), value); + } + } + /// /// titolo pagina /// @@ -361,7 +365,7 @@ namespace MoonProAdmin.WebUserControls } /// - /// verifica parametri ins essione x i valori eventualmente da mettere al comando... + /// verifica parametri in sessione x i valori eventualmente da mettere al comando... /// private void checkParam() { diff --git a/MP-Admin/WebUserControls/mod_gestKIT.ascx b/MP-Admin/WebUserControls/mod_gestKIT.ascx new file mode 100644 index 00000000..d74ffdd4 --- /dev/null +++ b/MP-Admin/WebUserControls/mod_gestKIT.ascx @@ -0,0 +1,17 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestKIT.ascx.cs" Inherits="MoonProAdmin.WebUserControls.mod_gestKIT" %> +
    +
  1. cmd x reset e ripartire a fare NUOVO kit
  2. +
  3. lettura del barcode
  4. +
  5. recupero OPR
  6. +
  7. decodifica come articolo
  8. +
  9. eventuale lista di ordini KIT collegati ad OPR IN ROSSO
  10. +
  11. eventuale lista di ordini KIT collegati ad articolo IN VERDE
  12. +
  13. salvataggio OPR in lista (redis?memoria?)
  14. +
  15. ricerca KIT con articolo(i)
  16. +
  17. controllo kit completo
  18. +
  19. comando conferma e crea KIT
  20. +
  21. lascio filtro OPR/articolo x mostrare ordine (nei 2 modi rosso/verde)
  22. +
  23. cmd x reset e ripartire a fare NUOVO kit
  24. +
+ + \ No newline at end of file diff --git a/MP-Admin/WebUserControls/mod_gestKIT.ascx.cs b/MP-Admin/WebUserControls/mod_gestKIT.ascx.cs new file mode 100644 index 00000000..7bf8d526 --- /dev/null +++ b/MP-Admin/WebUserControls/mod_gestKIT.ascx.cs @@ -0,0 +1,218 @@ +using SteamWare; +using System; + +namespace MoonProAdmin.WebUserControls +{ + public partial class mod_gestKIT : System.Web.UI.UserControl + { + #region setup VARS + + /// + /// RegExp x RESET / CANCEL + /// + protected string regExp_KO = memLayer.ML.cdv("regExp_KO"); + /// + /// RegExp x CONFERMA + /// + protected string regExp_OK = memLayer.ML.cdv("regExp_OK"); + /// + /// RegExp x START KIT + /// + protected string regExp_KitStart = memLayer.ML.cdv("regExp_KitStart"); + /// + /// RegExp x SAVE KIT + /// + protected string regExp_KitSave = memLayer.ML.cdv("regExp_KitSave"); + + #endregion + + + #region variabili in sessione + + /// + /// UID formattato con "_" + /// + public string uid + { + get + { + return this.UniqueID.Replace("$", "_").Replace("-", "_"); + } + } + + public string codArt + { + get + { + return memLayer.ML.StringSessionObj(string.Format("codArt_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("codArt_{0}", uid), value); + } + } + public string descArt + { + get + { + return memLayer.ML.StringSessionObj(string.Format("descArt_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("descArt_{0}", uid), value); + } + } + public string kitCode + { + get + { + return memLayer.ML.StringSessionObj(string.Format("kitCode_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("kitCode_{0}", uid), value); + } + } + public string codOrd + { + get + { + return memLayer.ML.StringSessionObj(string.Format("codOrd_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("codOrd_{0}", uid), value); + } + } + public int qta + { + get + { + return memLayer.ML.IntSessionObj(string.Format("qta_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("qta_{0}", uid), value); + } + } + public string idxMacc + { + get + { + return memLayer.ML.StringSessionObj(string.Format("idxMacc_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("idxMacc_{0}", uid), value); + } + } + public string nomeMacc + { + get + { + return memLayer.ML.StringSessionObj(string.Format("nomeMacc_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("nomeMacc_{0}", uid), value); + } + } + public string codGruppo + { + get + { + return memLayer.ML.StringSessionObj(string.Format("codGruppo_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("codGruppo_{0}", uid), value); + } + } + + /// + /// titolo pagina + /// + public string titolo + { + get + { + return devicesAuthProxy.getPage(Request.Url).Replace(".aspx", ""); + } + } + #endregion + + /// + /// Caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + + } + /// + /// Ultimo input registrato + /// + public string lastInput + { + get + { + return hlLastInput.Value; + } + set + { + hlLastInput.Value = value; + } + } + /// + /// Aggiorno controllo secondo ULTIMO input + /// + public void doUpdate() + { + // aggiorno label... + messOut = lastInput; + // controllo input (reset/inizio o salva...) + if (lastInput == regExp_KO) + { + // resetto dati + doReset(); + messOut = "Effettuato reset!"; + } + else if (lastInput == regExp_KitStart) + { + // resetto dati + doReset(); + messOut = "Inizio configurazione KIT"; + } + else if (lastInput == regExp_KitSave) + { + + } + else if (lastInput == regExp_OK) + { + + } + } + + private void doReset() + { + codOrd = ""; + codArt = ""; + kitCode = ""; + qta = 0; + descArt = ""; + } + + public string messOut + { + set + { + lblOut.Text = value; + } + get + { + return lblOut.Text; + } + } + } +} \ No newline at end of file diff --git a/MP-Admin/WebUserControls/mod_gestKIT.ascx.designer.cs b/MP-Admin/WebUserControls/mod_gestKIT.ascx.designer.cs new file mode 100644 index 00000000..229c485a --- /dev/null +++ b/MP-Admin/WebUserControls/mod_gestKIT.ascx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// 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 MoonProAdmin.WebUserControls { + + + public partial class mod_gestKIT { + + /// + /// Controllo hlLastInput. + /// + /// + /// 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 hlLastInput; + + /// + /// Controllo lblOut. + /// + /// + /// 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.Label lblOut; + } +} diff --git a/MP-Admin/WebUserControls/mod_main_help.ascx b/MP-Admin/WebUserControls/mod_main_help.ascx index 1e23ef5f..2da85db9 100644 --- a/MP-Admin/WebUserControls/mod_main_help.ascx +++ b/MP-Admin/WebUserControls/mod_main_help.ascx @@ -3,74 +3,65 @@
-
- +
+
+ <%: traduci("btnAnagArticoli") %>
- <%: traduci("btnAnagArticoli") %>
-
- -
- <%: traduci("btnGestPromesseOdl") %> +
+
+ <%: traduci("btnGestPromesseOdl") %> +
-
- -
- <%: traduci("btnGestOdl") %> +
+
+ <%: traduci("btnGestOdl") %> +
-
- -
- <%: traduci("btnGestDatiMacchina") %> +
+
+ <%: traduci("btnGestDatiMacchina") %> +
- -
- -
- <%: traduci("btnApprovaTC") %> +
+
+ <%: traduci("btnApprovaTC") %> +
-
- +
+
+ <%: traduci("btnApprovaProd") %>
- <%: traduci("btnApprovaProd") %>
- <%----%> -
- +
+
+ <%: traduci("btnBCode") %> +
+ +
+
+ +
+
+ <%: traduci("btnGestKIT") %>
- <%: traduci("btnBCode") %>
- -<%--
-
-
-
-
-
-
-
-
-
-
-
-
-
--%> diff --git a/MP-Admin/WebUserControls/mod_main_help.ascx.cs b/MP-Admin/WebUserControls/mod_main_help.ascx.cs index 38af0eb7..caee42a4 100644 --- a/MP-Admin/WebUserControls/mod_main_help.ascx.cs +++ b/MP-Admin/WebUserControls/mod_main_help.ascx.cs @@ -10,35 +10,39 @@ public partial class mod_main_help : ApplicationUserControl protected void btnGestPromesseOdl_Click(object sender, EventArgs e) { - Response.Redirect("~/gestPromesseODL.aspx"); + Response.Redirect("~/gestPromesseODL"); } protected void btnGestOdl_Click(object sender, EventArgs e) { - Response.Redirect("~/gestioneODL.aspx"); + Response.Redirect("~/gestioneODL"); } protected void btnAnagArticoli_Click(object sender, EventArgs e) { - Response.Redirect("~/anagArticoli.aspx"); + Response.Redirect("~/anagArticoli"); } protected void btnGestDatiMacchina_Click(object sender, EventArgs e) { - Response.Redirect("~/gestioneDatiMacchine.aspx"); + Response.Redirect("~/gestioneDatiMacchine"); } protected void btnApprovaTC_Click(object sender, EventArgs e) { - Response.Redirect("~/approvazioneODL.aspx"); + Response.Redirect("~/approvazioneODL"); } protected void btnApprovaProd_Click(object sender, EventArgs e) { - Response.Redirect("~/approvazioneProd.aspx"); + Response.Redirect("~/approvazioneProd"); } protected void btnBCode_Click(object sender, EventArgs e) { - Response.Redirect("~/BCode.aspx"); + Response.Redirect("~/BCode"); } + protected void lbtGestKIT_Click(object sender, EventArgs e) + { + Response.Redirect("~/GestKIT"); + } } diff --git a/MP-Admin/WebUserControls/mod_main_help.ascx.designer.cs b/MP-Admin/WebUserControls/mod_main_help.ascx.designer.cs index a8866666..4ea55d8a 100644 --- a/MP-Admin/WebUserControls/mod_main_help.ascx.designer.cs +++ b/MP-Admin/WebUserControls/mod_main_help.ascx.designer.cs @@ -73,4 +73,13 @@ public partial class mod_main_help { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.LinkButton lbtBCode; + + /// + /// Controllo lbtGestKIT. + /// + /// + /// 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.LinkButton lbtGestKIT; } diff --git a/MP-TAB/DettaglioMacchina.aspx b/MP-TAB/DettaglioMacchina.aspx index ce727e9e..44495889 100644 --- a/MP-TAB/DettaglioMacchina.aspx +++ b/MP-TAB/DettaglioMacchina.aspx @@ -36,8 +36,6 @@ Reg.CONTROLLI
- <%-- - --%>
diff --git a/MapoDb/DS_IntServ.Designer.cs b/MapoDb/DS_IntServ.Designer.cs index 217990b0..551a60e8 100644 --- a/MapoDb/DS_IntServ.Designer.cs +++ b/MapoDb/DS_IntServ.Designer.cs @@ -26,9 +26,9 @@ namespace MapoDb { private TransitoDatiDataTable tableTransitoDati; - private AnagKITDataTable tableAnagKIT; + private TemplateKITDataTable tableTemplateKIT; - private CompKITDataTable tableCompKIT; + private IstanzeKITDataTable tableIstanzeKIT; private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; @@ -61,11 +61,11 @@ namespace MapoDb { if ((ds.Tables["TransitoDati"] != null)) { base.Tables.Add(new TransitoDatiDataTable(ds.Tables["TransitoDati"])); } - if ((ds.Tables["AnagKIT"] != null)) { - base.Tables.Add(new AnagKITDataTable(ds.Tables["AnagKIT"])); + if ((ds.Tables["TemplateKIT"] != null)) { + base.Tables.Add(new TemplateKITDataTable(ds.Tables["TemplateKIT"])); } - if ((ds.Tables["CompKIT"] != null)) { - base.Tables.Add(new CompKITDataTable(ds.Tables["CompKIT"])); + if ((ds.Tables["IstanzeKIT"] != null)) { + base.Tables.Add(new IstanzeKITDataTable(ds.Tables["IstanzeKIT"])); } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; @@ -99,9 +99,9 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] - public AnagKITDataTable AnagKIT { + public TemplateKITDataTable TemplateKIT { get { - return this.tableAnagKIT; + return this.tableTemplateKIT; } } @@ -109,9 +109,9 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] - public CompKITDataTable CompKIT { + public IstanzeKITDataTable IstanzeKIT { get { - return this.tableCompKIT; + return this.tableIstanzeKIT; } } @@ -185,11 +185,11 @@ namespace MapoDb { if ((ds.Tables["TransitoDati"] != null)) { base.Tables.Add(new TransitoDatiDataTable(ds.Tables["TransitoDati"])); } - if ((ds.Tables["AnagKIT"] != null)) { - base.Tables.Add(new AnagKITDataTable(ds.Tables["AnagKIT"])); + if ((ds.Tables["TemplateKIT"] != null)) { + base.Tables.Add(new TemplateKITDataTable(ds.Tables["TemplateKIT"])); } - if ((ds.Tables["CompKIT"] != null)) { - base.Tables.Add(new CompKITDataTable(ds.Tables["CompKIT"])); + if ((ds.Tables["IstanzeKIT"] != null)) { + base.Tables.Add(new IstanzeKITDataTable(ds.Tables["IstanzeKIT"])); } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; @@ -230,16 +230,16 @@ namespace MapoDb { this.tableTransitoDati.InitVars(); } } - this.tableAnagKIT = ((AnagKITDataTable)(base.Tables["AnagKIT"])); + this.tableTemplateKIT = ((TemplateKITDataTable)(base.Tables["TemplateKIT"])); if ((initTable == true)) { - if ((this.tableAnagKIT != null)) { - this.tableAnagKIT.InitVars(); + if ((this.tableTemplateKIT != null)) { + this.tableTemplateKIT.InitVars(); } } - this.tableCompKIT = ((CompKITDataTable)(base.Tables["CompKIT"])); + this.tableIstanzeKIT = ((IstanzeKITDataTable)(base.Tables["IstanzeKIT"])); if ((initTable == true)) { - if ((this.tableCompKIT != null)) { - this.tableCompKIT.InitVars(); + if ((this.tableIstanzeKIT != null)) { + this.tableIstanzeKIT.InitVars(); } } } @@ -254,10 +254,10 @@ namespace MapoDb { this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; this.tableTransitoDati = new TransitoDatiDataTable(); base.Tables.Add(this.tableTransitoDati); - this.tableAnagKIT = new AnagKITDataTable(); - base.Tables.Add(this.tableAnagKIT); - this.tableCompKIT = new CompKITDataTable(); - base.Tables.Add(this.tableCompKIT); + this.tableTemplateKIT = new TemplateKITDataTable(); + base.Tables.Add(this.tableTemplateKIT); + this.tableIstanzeKIT = new IstanzeKITDataTable(); + base.Tables.Add(this.tableIstanzeKIT); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -268,13 +268,13 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - private bool ShouldSerializeAnagKIT() { + private bool ShouldSerializeTemplateKIT() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - private bool ShouldSerializeCompKIT() { + private bool ShouldSerializeIstanzeKIT() { return false; } @@ -337,10 +337,10 @@ namespace MapoDb { public delegate void TransitoDatiRowChangeEventHandler(object sender, TransitoDatiRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public delegate void AnagKITRowChangeEventHandler(object sender, AnagKITRowChangeEvent e); + public delegate void TemplateKITRowChangeEventHandler(object sender, TemplateKITRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public delegate void CompKITRowChangeEventHandler(object sender, CompKITRowChangeEvent e); + public delegate void IstanzeKITRowChangeEventHandler(object sender, IstanzeKITRowChangeEvent e); /// ///Represents the strongly named DataTable class. @@ -672,14 +672,18 @@ namespace MapoDb { /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class AnagKITDataTable : global::System.Data.TypedTableBase { + public partial class TemplateKITDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnCodArtParent; + private global::System.Data.DataColumn columnCodArtChild; + + private global::System.Data.DataColumn columnQty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public AnagKITDataTable() { - this.TableName = "AnagKIT"; + public TemplateKITDataTable() { + this.TableName = "TemplateKIT"; this.BeginInit(); this.InitClass(); this.EndInit(); @@ -687,7 +691,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - internal AnagKITDataTable(global::System.Data.DataTable table) { + internal TemplateKITDataTable(global::System.Data.DataTable table) { this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; @@ -704,7 +708,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - protected AnagKITDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + protected TemplateKITDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } @@ -717,6 +721,22 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn CodArtChildColumn { + get { + return this.columnCodArtChild; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn QtyColumn { + get { + return this.columnQty; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -728,52 +748,55 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public AnagKITRow this[int index] { + public TemplateKITRow this[int index] { get { - return ((AnagKITRow)(this.Rows[index])); + return ((TemplateKITRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event AnagKITRowChangeEventHandler AnagKITRowChanging; + public event TemplateKITRowChangeEventHandler TemplateKITRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event AnagKITRowChangeEventHandler AnagKITRowChanged; + public event TemplateKITRowChangeEventHandler TemplateKITRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event AnagKITRowChangeEventHandler AnagKITRowDeleting; + public event TemplateKITRowChangeEventHandler TemplateKITRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event AnagKITRowChangeEventHandler AnagKITRowDeleted; + public event TemplateKITRowChangeEventHandler TemplateKITRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public void AddAnagKITRow(AnagKITRow row) { + public void AddTemplateKITRow(TemplateKITRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public AnagKITRow AddAnagKITRow(string CodArtParent) { - AnagKITRow rowAnagKITRow = ((AnagKITRow)(this.NewRow())); + public TemplateKITRow AddTemplateKITRow(string CodArtParent, string CodArtChild, int Qty) { + TemplateKITRow rowTemplateKITRow = ((TemplateKITRow)(this.NewRow())); object[] columnValuesArray = new object[] { - CodArtParent}; - rowAnagKITRow.ItemArray = columnValuesArray; - this.Rows.Add(rowAnagKITRow); - return rowAnagKITRow; + CodArtParent, + CodArtChild, + Qty}; + rowTemplateKITRow.ItemArray = columnValuesArray; + this.Rows.Add(rowTemplateKITRow); + return rowTemplateKITRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public AnagKITRow FindByCodArtParent(string CodArtParent) { - return ((AnagKITRow)(this.Rows.Find(new object[] { - CodArtParent}))); + public TemplateKITRow FindByCodArtParentCodArtChild(string CodArtParent, string CodArtChild) { + return ((TemplateKITRow)(this.Rows.Find(new object[] { + CodArtParent, + CodArtChild}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public override global::System.Data.DataTable Clone() { - AnagKITDataTable cln = ((AnagKITDataTable)(base.Clone())); + TemplateKITDataTable cln = ((TemplateKITDataTable)(base.Clone())); cln.InitVars(); return cln; } @@ -781,13 +804,15 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { - return new AnagKITDataTable(); + return new TemplateKITDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] internal void InitVars() { this.columnCodArtParent = base.Columns["CodArtParent"]; + this.columnCodArtChild = base.Columns["CodArtChild"]; + this.columnQty = base.Columns["Qty"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -795,37 +820,44 @@ namespace MapoDb { private void InitClass() { this.columnCodArtParent = new global::System.Data.DataColumn("CodArtParent", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCodArtParent); + this.columnCodArtChild = new global::System.Data.DataColumn("CodArtChild", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodArtChild); + this.columnQty = new global::System.Data.DataColumn("Qty", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnQty); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { - this.columnCodArtParent}, true)); + this.columnCodArtParent, + this.columnCodArtChild}, true)); this.columnCodArtParent.AllowDBNull = false; - this.columnCodArtParent.Unique = true; this.columnCodArtParent.MaxLength = 50; + this.columnCodArtChild.AllowDBNull = false; + this.columnCodArtChild.MaxLength = 50; + this.columnQty.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public AnagKITRow NewAnagKITRow() { - return ((AnagKITRow)(this.NewRow())); + public TemplateKITRow NewTemplateKITRow() { + return ((TemplateKITRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new AnagKITRow(builder); + return new TemplateKITRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override global::System.Type GetRowType() { - return typeof(AnagKITRow); + return typeof(TemplateKITRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); - if ((this.AnagKITRowChanged != null)) { - this.AnagKITRowChanged(this, new AnagKITRowChangeEvent(((AnagKITRow)(e.Row)), e.Action)); + if ((this.TemplateKITRowChanged != null)) { + this.TemplateKITRowChanged(this, new TemplateKITRowChangeEvent(((TemplateKITRow)(e.Row)), e.Action)); } } @@ -833,8 +865,8 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); - if ((this.AnagKITRowChanging != null)) { - this.AnagKITRowChanging(this, new AnagKITRowChangeEvent(((AnagKITRow)(e.Row)), e.Action)); + if ((this.TemplateKITRowChanging != null)) { + this.TemplateKITRowChanging(this, new TemplateKITRowChangeEvent(((TemplateKITRow)(e.Row)), e.Action)); } } @@ -842,8 +874,8 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); - if ((this.AnagKITRowDeleted != null)) { - this.AnagKITRowDeleted(this, new AnagKITRowChangeEvent(((AnagKITRow)(e.Row)), e.Action)); + if ((this.TemplateKITRowDeleted != null)) { + this.TemplateKITRowDeleted(this, new TemplateKITRowChangeEvent(((TemplateKITRow)(e.Row)), e.Action)); } } @@ -851,14 +883,14 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); - if ((this.AnagKITRowDeleting != null)) { - this.AnagKITRowDeleting(this, new AnagKITRowChangeEvent(((AnagKITRow)(e.Row)), e.Action)); + if ((this.TemplateKITRowDeleting != null)) { + this.TemplateKITRowDeleting(this, new TemplateKITRowChangeEvent(((TemplateKITRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public void RemoveAnagKITRow(AnagKITRow row) { + public void RemoveTemplateKITRow(TemplateKITRow row) { this.Rows.Remove(row); } @@ -885,7 +917,7 @@ namespace MapoDb { type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "AnagKITDataTable"; + attribute2.FixedValue = "TemplateKITDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); @@ -931,18 +963,24 @@ namespace MapoDb { /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class CompKITDataTable : global::System.Data.TypedTableBase { + public partial class IstanzeKITDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnKeyKit; + + private global::System.Data.DataColumn columnKeyExtOrd; private global::System.Data.DataColumn columnCodArtParent; private global::System.Data.DataColumn columnCodArtChild; - private global::System.Data.DataColumn columnQty; + private global::System.Data.DataColumn columnQtyKIT; + + private global::System.Data.DataColumn columnQtyART; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public CompKITDataTable() { - this.TableName = "CompKIT"; + public IstanzeKITDataTable() { + this.TableName = "IstanzeKIT"; this.BeginInit(); this.InitClass(); this.EndInit(); @@ -950,7 +988,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - internal CompKITDataTable(global::System.Data.DataTable table) { + internal IstanzeKITDataTable(global::System.Data.DataTable table) { this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; @@ -967,11 +1005,27 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - protected CompKITDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + protected IstanzeKITDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn KeyKitColumn { + get { + return this.columnKeyKit; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn KeyExtOrdColumn { + get { + return this.columnKeyExtOrd; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public global::System.Data.DataColumn CodArtParentColumn { @@ -990,9 +1044,17 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public global::System.Data.DataColumn QtyColumn { + public global::System.Data.DataColumn QtyKITColumn { get { - return this.columnQty; + return this.columnQtyKIT; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn QtyARTColumn { + get { + return this.columnQtyART; } } @@ -1007,55 +1069,58 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public CompKITRow this[int index] { + public IstanzeKITRow this[int index] { get { - return ((CompKITRow)(this.Rows[index])); + return ((IstanzeKITRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event CompKITRowChangeEventHandler CompKITRowChanging; + public event IstanzeKITRowChangeEventHandler IstanzeKITRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event CompKITRowChangeEventHandler CompKITRowChanged; + public event IstanzeKITRowChangeEventHandler IstanzeKITRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event CompKITRowChangeEventHandler CompKITRowDeleting; + public event IstanzeKITRowChangeEventHandler IstanzeKITRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event CompKITRowChangeEventHandler CompKITRowDeleted; + public event IstanzeKITRowChangeEventHandler IstanzeKITRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public void AddCompKITRow(CompKITRow row) { + public void AddIstanzeKITRow(IstanzeKITRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public CompKITRow AddCompKITRow(string CodArtParent, string CodArtChild, int Qty) { - CompKITRow rowCompKITRow = ((CompKITRow)(this.NewRow())); + public IstanzeKITRow AddIstanzeKITRow(string KeyKit, string KeyExtOrd, string CodArtParent, string CodArtChild, int QtyKIT, int QtyART) { + IstanzeKITRow rowIstanzeKITRow = ((IstanzeKITRow)(this.NewRow())); object[] columnValuesArray = new object[] { + KeyKit, + KeyExtOrd, CodArtParent, CodArtChild, - Qty}; - rowCompKITRow.ItemArray = columnValuesArray; - this.Rows.Add(rowCompKITRow); - return rowCompKITRow; + QtyKIT, + QtyART}; + rowIstanzeKITRow.ItemArray = columnValuesArray; + this.Rows.Add(rowIstanzeKITRow); + return rowIstanzeKITRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public CompKITRow FindByCodArtParentCodArtChild(string CodArtParent, string CodArtChild) { - return ((CompKITRow)(this.Rows.Find(new object[] { - CodArtParent, - CodArtChild}))); + public IstanzeKITRow FindByKeyKitKeyExtOrd(string KeyKit, string KeyExtOrd) { + return ((IstanzeKITRow)(this.Rows.Find(new object[] { + KeyKit, + KeyExtOrd}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public override global::System.Data.DataTable Clone() { - CompKITDataTable cln = ((CompKITDataTable)(base.Clone())); + IstanzeKITDataTable cln = ((IstanzeKITDataTable)(base.Clone())); cln.InitVars(); return cln; } @@ -1063,60 +1128,74 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { - return new CompKITDataTable(); + return new IstanzeKITDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] internal void InitVars() { + this.columnKeyKit = base.Columns["KeyKit"]; + this.columnKeyExtOrd = base.Columns["KeyExtOrd"]; this.columnCodArtParent = base.Columns["CodArtParent"]; this.columnCodArtChild = base.Columns["CodArtChild"]; - this.columnQty = base.Columns["Qty"]; + this.columnQtyKIT = base.Columns["QtyKIT"]; + this.columnQtyART = base.Columns["QtyART"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void InitClass() { + this.columnKeyKit = new global::System.Data.DataColumn("KeyKit", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnKeyKit); + this.columnKeyExtOrd = new global::System.Data.DataColumn("KeyExtOrd", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnKeyExtOrd); this.columnCodArtParent = new global::System.Data.DataColumn("CodArtParent", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCodArtParent); this.columnCodArtChild = new global::System.Data.DataColumn("CodArtChild", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCodArtChild); - this.columnQty = new global::System.Data.DataColumn("Qty", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnQty); + this.columnQtyKIT = new global::System.Data.DataColumn("QtyKIT", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnQtyKIT); + this.columnQtyART = new global::System.Data.DataColumn("QtyART", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnQtyART); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { - this.columnCodArtParent, - this.columnCodArtChild}, true)); + this.columnKeyKit, + this.columnKeyExtOrd}, true)); + this.columnKeyKit.AllowDBNull = false; + this.columnKeyKit.MaxLength = 50; + this.columnKeyExtOrd.AllowDBNull = false; + this.columnKeyExtOrd.MaxLength = 50; this.columnCodArtParent.AllowDBNull = false; this.columnCodArtParent.MaxLength = 50; this.columnCodArtChild.AllowDBNull = false; this.columnCodArtChild.MaxLength = 50; - this.columnQty.AllowDBNull = false; + this.columnQtyKIT.AllowDBNull = false; + this.columnQtyART.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public CompKITRow NewCompKITRow() { - return ((CompKITRow)(this.NewRow())); + public IstanzeKITRow NewIstanzeKITRow() { + return ((IstanzeKITRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new CompKITRow(builder); + return new IstanzeKITRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override global::System.Type GetRowType() { - return typeof(CompKITRow); + return typeof(IstanzeKITRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); - if ((this.CompKITRowChanged != null)) { - this.CompKITRowChanged(this, new CompKITRowChangeEvent(((CompKITRow)(e.Row)), e.Action)); + if ((this.IstanzeKITRowChanged != null)) { + this.IstanzeKITRowChanged(this, new IstanzeKITRowChangeEvent(((IstanzeKITRow)(e.Row)), e.Action)); } } @@ -1124,8 +1203,8 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); - if ((this.CompKITRowChanging != null)) { - this.CompKITRowChanging(this, new CompKITRowChangeEvent(((CompKITRow)(e.Row)), e.Action)); + if ((this.IstanzeKITRowChanging != null)) { + this.IstanzeKITRowChanging(this, new IstanzeKITRowChangeEvent(((IstanzeKITRow)(e.Row)), e.Action)); } } @@ -1133,8 +1212,8 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); - if ((this.CompKITRowDeleted != null)) { - this.CompKITRowDeleted(this, new CompKITRowChangeEvent(((CompKITRow)(e.Row)), e.Action)); + if ((this.IstanzeKITRowDeleted != null)) { + this.IstanzeKITRowDeleted(this, new IstanzeKITRowChangeEvent(((IstanzeKITRow)(e.Row)), e.Action)); } } @@ -1142,14 +1221,14 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); - if ((this.CompKITRowDeleting != null)) { - this.CompKITRowDeleting(this, new CompKITRowChangeEvent(((CompKITRow)(e.Row)), e.Action)); + if ((this.IstanzeKITRowDeleting != null)) { + this.IstanzeKITRowDeleting(this, new IstanzeKITRowChangeEvent(((IstanzeKITRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public void RemoveCompKITRow(CompKITRow row) { + public void RemoveIstanzeKITRow(IstanzeKITRow row) { this.Rows.Remove(row); } @@ -1176,7 +1255,7 @@ namespace MapoDb { type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "CompKITDataTable"; + attribute2.FixedValue = "IstanzeKITDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); @@ -1290,51 +1369,25 @@ namespace MapoDb { /// ///Represents strongly named DataRow class. /// - public partial class AnagKITRow : global::System.Data.DataRow { + public partial class TemplateKITRow : global::System.Data.DataRow { - private AnagKITDataTable tableAnagKIT; + private TemplateKITDataTable tableTemplateKIT; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - internal AnagKITRow(global::System.Data.DataRowBuilder rb) : + internal TemplateKITRow(global::System.Data.DataRowBuilder rb) : base(rb) { - this.tableAnagKIT = ((AnagKITDataTable)(this.Table)); + this.tableTemplateKIT = ((TemplateKITDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public string CodArtParent { get { - return ((string)(this[this.tableAnagKIT.CodArtParentColumn])); + return ((string)(this[this.tableTemplateKIT.CodArtParentColumn])); } set { - this[this.tableAnagKIT.CodArtParentColumn] = value; - } - } - } - - /// - ///Represents strongly named DataRow class. - /// - public partial class CompKITRow : global::System.Data.DataRow { - - private CompKITDataTable tableCompKIT; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - internal CompKITRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tableCompKIT = ((CompKITDataTable)(this.Table)); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public string CodArtParent { - get { - return ((string)(this[this.tableCompKIT.CodArtParentColumn])); - } - set { - this[this.tableCompKIT.CodArtParentColumn] = value; + this[this.tableTemplateKIT.CodArtParentColumn] = value; } } @@ -1342,10 +1395,10 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public string CodArtChild { get { - return ((string)(this[this.tableCompKIT.CodArtChildColumn])); + return ((string)(this[this.tableTemplateKIT.CodArtChildColumn])); } set { - this[this.tableCompKIT.CodArtChildColumn] = value; + this[this.tableTemplateKIT.CodArtChildColumn] = value; } } @@ -1353,10 +1406,91 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public int Qty { get { - return ((int)(this[this.tableCompKIT.QtyColumn])); + return ((int)(this[this.tableTemplateKIT.QtyColumn])); } set { - this[this.tableCompKIT.QtyColumn] = value; + this[this.tableTemplateKIT.QtyColumn] = value; + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class IstanzeKITRow : global::System.Data.DataRow { + + private IstanzeKITDataTable tableIstanzeKIT; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal IstanzeKITRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableIstanzeKIT = ((IstanzeKITDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string KeyKit { + get { + return ((string)(this[this.tableIstanzeKIT.KeyKitColumn])); + } + set { + this[this.tableIstanzeKIT.KeyKitColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string KeyExtOrd { + get { + return ((string)(this[this.tableIstanzeKIT.KeyExtOrdColumn])); + } + set { + this[this.tableIstanzeKIT.KeyExtOrdColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string CodArtParent { + get { + return ((string)(this[this.tableIstanzeKIT.CodArtParentColumn])); + } + set { + this[this.tableIstanzeKIT.CodArtParentColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string CodArtChild { + get { + return ((string)(this[this.tableIstanzeKIT.CodArtChildColumn])); + } + set { + this[this.tableIstanzeKIT.CodArtChildColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int QtyKIT { + get { + return ((int)(this[this.tableIstanzeKIT.QtyKITColumn])); + } + set { + this[this.tableIstanzeKIT.QtyKITColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int QtyART { + get { + return ((int)(this[this.tableIstanzeKIT.QtyARTColumn])); + } + set { + this[this.tableIstanzeKIT.QtyARTColumn] = value; } } } @@ -1399,22 +1533,22 @@ namespace MapoDb { ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public class AnagKITRowChangeEvent : global::System.EventArgs { + public class TemplateKITRowChangeEvent : global::System.EventArgs { - private AnagKITRow eventRow; + private TemplateKITRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public AnagKITRowChangeEvent(AnagKITRow row, global::System.Data.DataRowAction action) { + public TemplateKITRowChangeEvent(TemplateKITRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public AnagKITRow Row { + public TemplateKITRow Row { get { return this.eventRow; } @@ -1433,22 +1567,22 @@ namespace MapoDb { ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public class CompKITRowChangeEvent : global::System.EventArgs { + public class IstanzeKITRowChangeEvent : global::System.EventArgs { - private CompKITRow eventRow; + private IstanzeKITRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public CompKITRowChangeEvent(CompKITRow row, global::System.Data.DataRowAction action) { + public IstanzeKITRowChangeEvent(IstanzeKITRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public CompKITRow Row { + public IstanzeKITRow Row { get { return this.eventRow; } @@ -1872,7 +2006,7 @@ SELECT IdxRequest, DtRequest, DataType, ValueIN, ValueOUT FROM TransitoDati WHER [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class AnagKITTableAdapter : global::System.ComponentModel.Component { + public partial class TemplateKITTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; @@ -1886,7 +2020,7 @@ SELECT IdxRequest, DtRequest, DataType, ValueIN, ValueOUT FROM TransitoDati WHER [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public AnagKITTableAdapter() { + public TemplateKITTableAdapter() { this.ClearBeforeFill = true; } @@ -1983,342 +2117,32 @@ SELECT IdxRequest, DtRequest, DataType, ValueIN, ValueOUT FROM TransitoDati WHER this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "AnagKIT"; - tableMapping.ColumnMappings.Add("CodArtParent", "CodArtParent"); - this._adapter.TableMappings.Add(tableMapping); - this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[AnagKIT] WHERE (([CodArtParent] = @Original_CodArtParent))"; - this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodArtParent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtParent", 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 [dbo].[AnagKIT] ([CodArtParent]) VALUES (@CodArtParent);\r\nSELECT CodA" + - "rtParent FROM AnagKIT WHERE (CodArtParent = @CodArtParent)"; - this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtParent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtParent", 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 [dbo].[AnagKIT] SET [CodArtParent] = @CodArtParent WHERE (([CodArtParent] " + - "= @Original_CodArtParent));\r\nSELECT CodArtParent FROM AnagKIT WHERE (CodArtParen" + - "t = @CodArtParent)"; - this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtParent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtParent", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodArtParent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtParent", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - private void InitConnection() { - this._connection = new global::System.Data.SqlClient.SqlConnection(); - this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonPro_IS_ConnectionString; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; - this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); - this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT CodArtParent FROM dbo.AnagKIT"; - this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(DS_IntServ.AnagKITDataTable dataTable) { - this.Adapter.SelectCommand = this.CommandCollection[0]; - if ((this.ClearBeforeFill == true)) { - dataTable.Clear(); - } - int returnValue = this.Adapter.Fill(dataTable); - return returnValue; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual DS_IntServ.AnagKITDataTable GetData() { - this.Adapter.SelectCommand = this.CommandCollection[0]; - DS_IntServ.AnagKITDataTable dataTable = new DS_IntServ.AnagKITDataTable(); - this.Adapter.Fill(dataTable); - return dataTable; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(DS_IntServ.AnagKITDataTable dataTable) { - return this.Adapter.Update(dataTable); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(DS_IntServ dataSet) { - return this.Adapter.Update(dataSet, "AnagKIT"); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(global::System.Data.DataRow dataRow) { - return this.Adapter.Update(new global::System.Data.DataRow[] { - dataRow}); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - 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", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(string Original_CodArtParent) { - if ((Original_CodArtParent == null)) { - throw new global::System.ArgumentNullException("Original_CodArtParent"); - } - else { - this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_CodArtParent)); - } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; - if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.DeleteCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.DeleteCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(string CodArtParent) { - if ((CodArtParent == null)) { - throw new global::System.ArgumentNullException("CodArtParent"); - } - else { - this.Adapter.InsertCommand.Parameters[0].Value = ((string)(CodArtParent)); - } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; - if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.InsertCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.InsertCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string CodArtParent, string Original_CodArtParent) { - if ((CodArtParent == null)) { - throw new global::System.ArgumentNullException("CodArtParent"); - } - else { - this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(CodArtParent)); - } - if ((Original_CodArtParent == null)) { - throw new global::System.ArgumentNullException("Original_CodArtParent"); - } - else { - this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Original_CodArtParent)); - } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; - if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.UpdateCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.UpdateCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string Original_CodArtParent) { - return this.Update(Original_CodArtParent, Original_CodArtParent); - } - } - - /// - ///Represents the connection and commands used to retrieve and save data. - /// - [global::System.ComponentModel.DesignerCategoryAttribute("code")] - [global::System.ComponentModel.ToolboxItem(true)] - [global::System.ComponentModel.DataObjectAttribute(true)] - [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + - ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class CompKITTableAdapter : global::System.ComponentModel.Component { - - private global::System.Data.SqlClient.SqlDataAdapter _adapter; - - private global::System.Data.SqlClient.SqlConnection _connection; - - private global::System.Data.SqlClient.SqlTransaction _transaction; - - private global::System.Data.SqlClient.SqlCommand[] _commandCollection; - - private bool _clearBeforeFill; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public CompKITTableAdapter() { - this.ClearBeforeFill = true; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { - get { - if ((this._adapter == null)) { - this.InitAdapter(); - } - return this._adapter; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - internal global::System.Data.SqlClient.SqlConnection Connection { - get { - if ((this._connection == null)) { - this.InitConnection(); - } - return this._connection; - } - set { - this._connection = value; - if ((this.Adapter.InsertCommand != null)) { - this.Adapter.InsertCommand.Connection = value; - } - if ((this.Adapter.DeleteCommand != null)) { - this.Adapter.DeleteCommand.Connection = value; - } - if ((this.Adapter.UpdateCommand != null)) { - this.Adapter.UpdateCommand.Connection = value; - } - for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { - if ((this.CommandCollection[i] != null)) { - ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; - } - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - internal global::System.Data.SqlClient.SqlTransaction Transaction { - get { - return this._transaction; - } - set { - this._transaction = value; - for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { - this.CommandCollection[i].Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.DeleteCommand != null))) { - this.Adapter.DeleteCommand.Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.InsertCommand != null))) { - this.Adapter.InsertCommand.Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.UpdateCommand != null))) { - this.Adapter.UpdateCommand.Transaction = this._transaction; - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { - get { - if ((this._commandCollection == null)) { - this.InitCommandCollection(); - } - return this._commandCollection; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public bool ClearBeforeFill { - get { - return this._clearBeforeFill; - } - set { - this._clearBeforeFill = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - private void InitAdapter() { - this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); - global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); - tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "CompKIT"; + tableMapping.DataSetTable = "TemplateKIT"; tableMapping.ColumnMappings.Add("CodArtParent", "CodArtParent"); tableMapping.ColumnMappings.Add("CodArtChild", "CodArtChild"); tableMapping.ColumnMappings.Add("Qty", "Qty"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[CompKIT] WHERE (([CodArtParent] = @Original_CodArtParent) AND " + - "([CodArtChild] = @Original_CodArtChild) AND ([Qty] = @Original_Qty))"; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[TemplateKIT] WHERE (([CodArtParent] = @Original_CodArtParent) " + + "AND ([CodArtChild] = @Original_CodArtChild) AND ([Qty] = @Original_Qty))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodArtParent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtParent", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodArtChild", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtChild", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Qty", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Qty", 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 [dbo].[CompKIT] ([CodArtParent], [CodArtChild], [Qty]) VALUES (@CodAr" + - "tParent, @CodArtChild, @Qty);\r\nSELECT CodArtParent, CodArtChild, Qty FROM CompKI" + - "T WHERE (CodArtChild = @CodArtChild) AND (CodArtParent = @CodArtParent)"; + this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[TemplateKIT] ([CodArtParent], [CodArtChild], [Qty]) VALUES (@C" + + "odArtParent, @CodArtChild, @Qty);\r\nSELECT CodArtParent, CodArtChild, Qty FROM Te" + + "mplateKIT WHERE (CodArtChild = @CodArtChild) AND (CodArtParent = @CodArtParent)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtParent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtParent", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtChild", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtChild", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qty", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Qty", 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 [dbo].[CompKIT] SET [CodArtParent] = @CodArtParent, [CodArtChild] = @CodArtChild, [Qty] = @Qty WHERE (([CodArtParent] = @Original_CodArtParent) AND ([CodArtChild] = @Original_CodArtChild) AND ([Qty] = @Original_Qty)); -SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtChild) AND (CodArtParent = @CodArtParent)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[TemplateKIT] SET [CodArtParent] = @CodArtParent, [CodArtChild] = @CodArtChild, [Qty] = @Qty WHERE (([CodArtParent] = @Original_CodArtParent) AND ([CodArtChild] = @Original_CodArtChild) AND ([Qty] = @Original_Qty)); +SELECT CodArtParent, CodArtChild, Qty FROM TemplateKIT WHERE (CodArtChild = @CodArtChild) AND (CodArtParent = @CodArtParent)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtParent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtParent", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtChild", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtChild", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -2338,18 +2162,30 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT CodArtParent, CodArtChild, Qty FROM dbo.CompKIT"; + this._commandCollection[0].CommandText = "SELECT CodArtParent, CodArtChild, Qty FROM dbo.TemplateKIT"; 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_TemplateKit_Search"; + 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("@CodArtParent", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtChild", 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_TemplateKIT_upsert"; + 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, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(DS_IntServ.CompKITDataTable dataTable) { + public virtual int Fill(DS_IntServ.TemplateKITDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); @@ -2362,9 +2198,9 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual DS_IntServ.CompKITDataTable GetData() { + public virtual DS_IntServ.TemplateKITDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; - DS_IntServ.CompKITDataTable dataTable = new DS_IntServ.CompKITDataTable(); + DS_IntServ.TemplateKITDataTable dataTable = new DS_IntServ.TemplateKITDataTable(); this.Adapter.Fill(dataTable); return dataTable; } @@ -2372,7 +2208,30 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(DS_IntServ.CompKITDataTable dataTable) { + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_IntServ.TemplateKITDataTable getBySearch(string CodArtParent, string CodArtChild) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((CodArtParent == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodArtParent)); + } + if ((CodArtChild == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(CodArtChild)); + } + DS_IntServ.TemplateKITDataTable dataTable = new DS_IntServ.TemplateKITDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_IntServ.TemplateKITDataTable dataTable) { return this.Adapter.Update(dataTable); } @@ -2380,7 +2239,7 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(DS_IntServ dataSet) { - return this.Adapter.Update(dataSet, "CompKIT"); + return this.Adapter.Update(dataSet, "TemplateKIT"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -2520,6 +2379,556 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC public virtual int Update(int Qty, string Original_CodArtParent, string Original_CodArtChild, int Original_Qty) { return this.Update(Original_CodArtParent, Original_CodArtChild, Qty, Original_CodArtParent, Original_CodArtChild, Original_Qty); } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int upsertQuery() { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + 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; + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class IstanzeKITTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public IstanzeKITTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "IstanzeKIT"; + tableMapping.ColumnMappings.Add("KeyKit", "KeyKit"); + tableMapping.ColumnMappings.Add("KeyExtOrd", "KeyExtOrd"); + tableMapping.ColumnMappings.Add("CodArtParent", "CodArtParent"); + tableMapping.ColumnMappings.Add("CodArtChild", "CodArtChild"); + tableMapping.ColumnMappings.Add("QtyKIT", "QtyKIT"); + tableMapping.ColumnMappings.Add("QtyART", "QtyART"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[IstanzeKIT] WHERE (([KeyKit] = @Original_KeyKit) AND ([KeyExtOrd] = @Original_KeyExtOrd) AND ([CodArtParent] = @Original_CodArtParent) AND ([CodArtChild] = @Original_CodArtChild) AND ([QtyKIT] = @Original_QtyKIT) AND ([QtyART] = @Original_QtyART))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KeyKit", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyKit", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KeyExtOrd", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyExtOrd", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodArtParent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtParent", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodArtChild", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtChild", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QtyKIT", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QtyKIT", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QtyART", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QtyART", 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 [dbo].[IstanzeKIT] ([KeyKit], [KeyExtOrd], [CodArtParent], [CodArtChild], [QtyKIT], [QtyART]) VALUES (@KeyKit, @KeyExtOrd, @CodArtParent, @CodArtChild, @QtyKIT, @QtyART); +SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM IstanzeKIT WHERE (KeyExtOrd = @KeyExtOrd) AND (KeyKit = @KeyKit)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyKit", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyKit", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyExtOrd", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyExtOrd", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtParent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtParent", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtChild", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtChild", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtyKIT", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QtyKIT", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtyART", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QtyART", 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 [dbo].[IstanzeKIT] SET [KeyKit] = @KeyKit, [KeyExtOrd] = @KeyExtOrd, [CodArtParent] = @CodArtParent, [CodArtChild] = @CodArtChild, [QtyKIT] = @QtyKIT, [QtyART] = @QtyART WHERE (([KeyKit] = @Original_KeyKit) AND ([KeyExtOrd] = @Original_KeyExtOrd) AND ([CodArtParent] = @Original_CodArtParent) AND ([CodArtChild] = @Original_CodArtChild) AND ([QtyKIT] = @Original_QtyKIT) AND ([QtyART] = @Original_QtyART)); +SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM IstanzeKIT WHERE (KeyExtOrd = @KeyExtOrd) AND (KeyKit = @KeyKit)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyKit", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyKit", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyExtOrd", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyExtOrd", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtParent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtParent", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtChild", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtChild", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtyKIT", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QtyKIT", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtyART", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QtyART", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KeyKit", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyKit", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KeyExtOrd", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyExtOrd", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodArtParent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtParent", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodArtChild", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArtChild", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QtyKIT", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QtyKIT", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QtyART", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QtyART", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonPro_IS_ConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM dbo.Ista" + + "nzeKIT"; + 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_IstanzeKit_Search"; + 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("@KeyKit", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyExtOrd", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtParent", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArtChild", 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_IstanzeKit_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("@KeyKit", 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("@KeyExtOrd", 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("@CodArtParent", 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("@CodArtChild", 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("@QtyKIT", 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("@QtyART", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DS_IntServ.IstanzeKITDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_IntServ.IstanzeKITDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_IntServ.IstanzeKITDataTable dataTable = new DS_IntServ.IstanzeKITDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_IntServ.IstanzeKITDataTable getBySearch(string KeyKit, string KeyExtOrd, string CodArtParent, string CodArtChild) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((KeyKit == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(KeyKit)); + } + if ((KeyExtOrd == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(KeyExtOrd)); + } + if ((CodArtParent == null)) { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = ((string)(CodArtParent)); + } + if ((CodArtChild == null)) { + this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[4].Value = ((string)(CodArtChild)); + } + DS_IntServ.IstanzeKITDataTable dataTable = new DS_IntServ.IstanzeKITDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_IntServ.IstanzeKITDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_IntServ dataSet) { + return this.Adapter.Update(dataSet, "IstanzeKIT"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + 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", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(string Original_KeyKit, string Original_KeyExtOrd, string Original_CodArtParent, string Original_CodArtChild, int Original_QtyKIT, int Original_QtyART) { + if ((Original_KeyKit == null)) { + throw new global::System.ArgumentNullException("Original_KeyKit"); + } + else { + this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_KeyKit)); + } + if ((Original_KeyExtOrd == null)) { + throw new global::System.ArgumentNullException("Original_KeyExtOrd"); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_KeyExtOrd)); + } + if ((Original_CodArtParent == null)) { + throw new global::System.ArgumentNullException("Original_CodArtParent"); + } + else { + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_CodArtParent)); + } + if ((Original_CodArtChild == null)) { + throw new global::System.ArgumentNullException("Original_CodArtChild"); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_CodArtChild)); + } + this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_QtyKIT)); + this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_QtyART)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(string KeyKit, string KeyExtOrd, string CodArtParent, string CodArtChild, int QtyKIT, int QtyART) { + if ((KeyKit == null)) { + throw new global::System.ArgumentNullException("KeyKit"); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(KeyKit)); + } + if ((KeyExtOrd == null)) { + throw new global::System.ArgumentNullException("KeyExtOrd"); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(KeyExtOrd)); + } + if ((CodArtParent == null)) { + throw new global::System.ArgumentNullException("CodArtParent"); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(CodArtParent)); + } + if ((CodArtChild == null)) { + throw new global::System.ArgumentNullException("CodArtChild"); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(CodArtChild)); + } + this.Adapter.InsertCommand.Parameters[4].Value = ((int)(QtyKIT)); + this.Adapter.InsertCommand.Parameters[5].Value = ((int)(QtyART)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string KeyKit, string KeyExtOrd, string CodArtParent, string CodArtChild, int QtyKIT, int QtyART, string Original_KeyKit, string Original_KeyExtOrd, string Original_CodArtParent, string Original_CodArtChild, int Original_QtyKIT, int Original_QtyART) { + if ((KeyKit == null)) { + throw new global::System.ArgumentNullException("KeyKit"); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(KeyKit)); + } + if ((KeyExtOrd == null)) { + throw new global::System.ArgumentNullException("KeyExtOrd"); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(KeyExtOrd)); + } + if ((CodArtParent == null)) { + throw new global::System.ArgumentNullException("CodArtParent"); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(CodArtParent)); + } + if ((CodArtChild == null)) { + throw new global::System.ArgumentNullException("CodArtChild"); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(CodArtChild)); + } + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(QtyKIT)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(QtyART)); + if ((Original_KeyKit == null)) { + throw new global::System.ArgumentNullException("Original_KeyKit"); + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_KeyKit)); + } + if ((Original_KeyExtOrd == null)) { + throw new global::System.ArgumentNullException("Original_KeyExtOrd"); + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_KeyExtOrd)); + } + if ((Original_CodArtParent == null)) { + throw new global::System.ArgumentNullException("Original_CodArtParent"); + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_CodArtParent)); + } + if ((Original_CodArtChild == null)) { + throw new global::System.ArgumentNullException("Original_CodArtChild"); + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_CodArtChild)); + } + this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_QtyKIT)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_QtyART)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string CodArtParent, string CodArtChild, int QtyKIT, int QtyART, string Original_KeyKit, string Original_KeyExtOrd, string Original_CodArtParent, string Original_CodArtChild, int Original_QtyKIT, int Original_QtyART) { + return this.Update(Original_KeyKit, Original_KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART, Original_KeyKit, Original_KeyExtOrd, Original_CodArtParent, Original_CodArtChild, Original_QtyKIT, Original_QtyART); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int insertQuery(string KeyKit, string KeyExtOrd, string CodArtParent, string CodArtChild, global::System.Nullable QtyKIT, global::System.Nullable QtyART) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + if ((KeyKit == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(KeyKit)); + } + if ((KeyExtOrd == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(KeyExtOrd)); + } + if ((CodArtParent == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(CodArtParent)); + } + if ((CodArtChild == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(CodArtChild)); + } + if ((QtyKIT.HasValue == true)) { + command.Parameters[5].Value = ((int)(QtyKIT.Value)); + } + else { + command.Parameters[5].Value = global::System.DBNull.Value; + } + if ((QtyART.HasValue == true)) { + command.Parameters[6].Value = ((int)(QtyART.Value)); + } + else { + command.Parameters[6].Value = global::System.DBNull.Value; + } + 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; + } } /// @@ -2536,9 +2945,9 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC private TransitoDatiTableAdapter _transitoDatiTableAdapter; - private AnagKITTableAdapter _anagKITTableAdapter; + private TemplateKITTableAdapter _templateKITTableAdapter; - private CompKITTableAdapter _compKITTableAdapter; + private IstanzeKITTableAdapter _istanzeKITTableAdapter; private bool _backupDataSetBeforeUpdate; @@ -2574,12 +2983,12 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + "a", "System.Drawing.Design.UITypeEditor")] - public AnagKITTableAdapter AnagKITTableAdapter { + public TemplateKITTableAdapter TemplateKITTableAdapter { get { - return this._anagKITTableAdapter; + return this._templateKITTableAdapter; } set { - this._anagKITTableAdapter = value; + this._templateKITTableAdapter = value; } } @@ -2588,12 +2997,12 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + "a", "System.Drawing.Design.UITypeEditor")] - public CompKITTableAdapter CompKITTableAdapter { + public IstanzeKITTableAdapter IstanzeKITTableAdapter { get { - return this._compKITTableAdapter; + return this._istanzeKITTableAdapter; } set { - this._compKITTableAdapter = value; + this._istanzeKITTableAdapter = value; } } @@ -2620,13 +3029,13 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC && (this._transitoDatiTableAdapter.Connection != null))) { return this._transitoDatiTableAdapter.Connection; } - if (((this._anagKITTableAdapter != null) - && (this._anagKITTableAdapter.Connection != null))) { - return this._anagKITTableAdapter.Connection; + if (((this._templateKITTableAdapter != null) + && (this._templateKITTableAdapter.Connection != null))) { + return this._templateKITTableAdapter.Connection; } - if (((this._compKITTableAdapter != null) - && (this._compKITTableAdapter.Connection != null))) { - return this._compKITTableAdapter.Connection; + if (((this._istanzeKITTableAdapter != null) + && (this._istanzeKITTableAdapter.Connection != null))) { + return this._istanzeKITTableAdapter.Connection; } return null; } @@ -2644,10 +3053,10 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC if ((this._transitoDatiTableAdapter != null)) { count = (count + 1); } - if ((this._anagKITTableAdapter != null)) { + if ((this._templateKITTableAdapter != null)) { count = (count + 1); } - if ((this._compKITTableAdapter != null)) { + if ((this._istanzeKITTableAdapter != null)) { count = (count + 1); } return count; @@ -2670,21 +3079,21 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC allChangedRows.AddRange(updatedRows); } } - if ((this._anagKITTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.AnagKIT.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + if ((this._templateKITTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.TemplateKIT.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { - result = (result + this._anagKITTableAdapter.Update(updatedRows)); + result = (result + this._templateKITTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } - if ((this._compKITTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.CompKIT.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + if ((this._istanzeKITTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.IstanzeKIT.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { - result = (result + this._compKITTableAdapter.Update(updatedRows)); + result = (result + this._istanzeKITTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } @@ -2706,19 +3115,19 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC allAddedRows.AddRange(addedRows); } } - if ((this._anagKITTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.AnagKIT.Select(null, null, global::System.Data.DataViewRowState.Added); + if ((this._templateKITTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.TemplateKIT.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { - result = (result + this._anagKITTableAdapter.Update(addedRows)); + result = (result + this._templateKITTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } - if ((this._compKITTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.CompKIT.Select(null, null, global::System.Data.DataViewRowState.Added); + if ((this._istanzeKITTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.IstanzeKIT.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { - result = (result + this._compKITTableAdapter.Update(addedRows)); + result = (result + this._istanzeKITTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } @@ -2732,19 +3141,19 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private int UpdateDeletedRows(DS_IntServ dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; - if ((this._compKITTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.CompKIT.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if ((this._istanzeKITTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.IstanzeKIT.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { - result = (result + this._compKITTableAdapter.Update(deletedRows)); + result = (result + this._istanzeKITTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } - if ((this._anagKITTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.AnagKIT.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if ((this._templateKITTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.TemplateKIT.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { - result = (result + this._anagKITTableAdapter.Update(deletedRows)); + result = (result + this._templateKITTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } @@ -2800,13 +3209,13 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + "a stessa stringa di connessione."); } - if (((this._anagKITTableAdapter != null) - && (this.MatchTableAdapterConnection(this._anagKITTableAdapter.Connection) == false))) { + if (((this._templateKITTableAdapter != null) + && (this.MatchTableAdapterConnection(this._templateKITTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + "a stessa stringa di connessione."); } - if (((this._compKITTableAdapter != null) - && (this.MatchTableAdapterConnection(this._compKITTableAdapter.Connection) == false))) { + if (((this._istanzeKITTableAdapter != null) + && (this.MatchTableAdapterConnection(this._istanzeKITTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + "a stessa stringa di connessione."); } @@ -2852,22 +3261,22 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC adaptersWithAcceptChangesDuringUpdate.Add(this._transitoDatiTableAdapter.Adapter); } } - if ((this._anagKITTableAdapter != null)) { - revertConnections.Add(this._anagKITTableAdapter, this._anagKITTableAdapter.Connection); - this._anagKITTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); - this._anagKITTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); - if (this._anagKITTableAdapter.Adapter.AcceptChangesDuringUpdate) { - this._anagKITTableAdapter.Adapter.AcceptChangesDuringUpdate = false; - adaptersWithAcceptChangesDuringUpdate.Add(this._anagKITTableAdapter.Adapter); + if ((this._templateKITTableAdapter != null)) { + revertConnections.Add(this._templateKITTableAdapter, this._templateKITTableAdapter.Connection); + this._templateKITTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._templateKITTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._templateKITTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._templateKITTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._templateKITTableAdapter.Adapter); } } - if ((this._compKITTableAdapter != null)) { - revertConnections.Add(this._compKITTableAdapter, this._compKITTableAdapter.Connection); - this._compKITTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); - this._compKITTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); - if (this._compKITTableAdapter.Adapter.AcceptChangesDuringUpdate) { - this._compKITTableAdapter.Adapter.AcceptChangesDuringUpdate = false; - adaptersWithAcceptChangesDuringUpdate.Add(this._compKITTableAdapter.Adapter); + if ((this._istanzeKITTableAdapter != null)) { + revertConnections.Add(this._istanzeKITTableAdapter, this._istanzeKITTableAdapter.Connection); + this._istanzeKITTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._istanzeKITTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._istanzeKITTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._istanzeKITTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._istanzeKITTableAdapter.Adapter); } } // @@ -2932,13 +3341,13 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC this._transitoDatiTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._transitoDatiTableAdapter])); this._transitoDatiTableAdapter.Transaction = null; } - if ((this._anagKITTableAdapter != null)) { - this._anagKITTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._anagKITTableAdapter])); - this._anagKITTableAdapter.Transaction = null; + if ((this._templateKITTableAdapter != null)) { + this._templateKITTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._templateKITTableAdapter])); + this._templateKITTableAdapter.Transaction = null; } - if ((this._compKITTableAdapter != null)) { - this._compKITTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._compKITTableAdapter])); - this._compKITTableAdapter.Transaction = null; + if ((this._istanzeKITTableAdapter != null)) { + this._istanzeKITTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._istanzeKITTableAdapter])); + this._istanzeKITTableAdapter.Transaction = null; } if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; diff --git a/MapoDb/DS_IntServ.xsd b/MapoDb/DS_IntServ.xsd index 9a880760..ed35aaa9 100644 --- a/MapoDb/DS_IntServ.xsd +++ b/MapoDb/DS_IntServ.xsd @@ -79,55 +79,12 @@ SELECT IdxRequest, DtRequest, DataType, ValueIN, ValueOUT FROM TransitoDati WHER - + - + - DELETE FROM [dbo].[AnagKIT] WHERE (([CodArtParent] = @Original_CodArtParent)) - - - - - - - - INSERT INTO [dbo].[AnagKIT] ([CodArtParent]) VALUES (@CodArtParent); -SELECT CodArtParent FROM AnagKIT WHERE (CodArtParent = @CodArtParent) - - - - - - - - SELECT CodArtParent FROM dbo.AnagKIT - - - - - - UPDATE [dbo].[AnagKIT] SET [CodArtParent] = @CodArtParent WHERE (([CodArtParent] = @Original_CodArtParent)); -SELECT CodArtParent FROM AnagKIT WHERE (CodArtParent = @CodArtParent) - - - - - - - - - - - - - - - - - - - DELETE FROM [dbo].[CompKIT] WHERE (([CodArtParent] = @Original_CodArtParent) AND ([CodArtChild] = @Original_CodArtChild) AND ([Qty] = @Original_Qty)) + DELETE FROM [dbo].[TemplateKIT] WHERE (([CodArtParent] = @Original_CodArtParent) AND ([CodArtChild] = @Original_CodArtChild) AND ([Qty] = @Original_Qty)) @@ -137,8 +94,8 @@ SELECT CodArtParent FROM AnagKIT WHERE (CodArtParent = @CodArtParent) - INSERT INTO [dbo].[CompKIT] ([CodArtParent], [CodArtChild], [Qty]) VALUES (@CodArtParent, @CodArtChild, @Qty); -SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtChild) AND (CodArtParent = @CodArtParent) + INSERT INTO [dbo].[TemplateKIT] ([CodArtParent], [CodArtChild], [Qty]) VALUES (@CodArtParent, @CodArtChild, @Qty); +SELECT CodArtParent, CodArtChild, Qty FROM TemplateKIT WHERE (CodArtChild = @CodArtChild) AND (CodArtParent = @CodArtParent) @@ -148,14 +105,14 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC - SELECT CodArtParent, CodArtChild, Qty FROM dbo.CompKIT + SELECT CodArtParent, CodArtChild, Qty FROM dbo.TemplateKIT - UPDATE [dbo].[CompKIT] SET [CodArtParent] = @CodArtParent, [CodArtChild] = @CodArtChild, [Qty] = @Qty WHERE (([CodArtParent] = @Original_CodArtParent) AND ([CodArtChild] = @Original_CodArtChild) AND ([Qty] = @Original_Qty)); -SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtChild) AND (CodArtParent = @CodArtParent) + UPDATE [dbo].[TemplateKIT] SET [CodArtParent] = @CodArtParent, [CodArtChild] = @CodArtChild, [Qty] = @Qty WHERE (([CodArtParent] = @Original_CodArtParent) AND ([CodArtChild] = @Original_CodArtChild) AND ([Qty] = @Original_Qty)); +SELECT CodArtParent, CodArtChild, Qty FROM TemplateKIT WHERE (CodArtChild = @CodArtChild) AND (CodArtParent = @CodArtParent) @@ -173,7 +130,129 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC - + + + + + dbo.stp_TemplateKit_Search + + + + + + + + + + + + dbo.stp_TemplateKIT_upsert + + + + + + + + + + + + + + DELETE FROM [dbo].[IstanzeKIT] WHERE (([KeyKit] = @Original_KeyKit) AND ([KeyExtOrd] = @Original_KeyExtOrd) AND ([CodArtParent] = @Original_CodArtParent) AND ([CodArtChild] = @Original_CodArtChild) AND ([QtyKIT] = @Original_QtyKIT) AND ([QtyART] = @Original_QtyART)) + + + + + + + + + + + + + INSERT INTO [dbo].[IstanzeKIT] ([KeyKit], [KeyExtOrd], [CodArtParent], [CodArtChild], [QtyKIT], [QtyART]) VALUES (@KeyKit, @KeyExtOrd, @CodArtParent, @CodArtChild, @QtyKIT, @QtyART); +SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM IstanzeKIT WHERE (KeyExtOrd = @KeyExtOrd) AND (KeyKit = @KeyKit) + + + + + + + + + + + + + SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM dbo.IstanzeKIT + + + + + + UPDATE [dbo].[IstanzeKIT] SET [KeyKit] = @KeyKit, [KeyExtOrd] = @KeyExtOrd, [CodArtParent] = @CodArtParent, [CodArtChild] = @CodArtChild, [QtyKIT] = @QtyKIT, [QtyART] = @QtyART WHERE (([KeyKit] = @Original_KeyKit) AND ([KeyExtOrd] = @Original_KeyExtOrd) AND ([CodArtParent] = @Original_CodArtParent) AND ([CodArtChild] = @Original_CodArtChild) AND ([QtyKIT] = @Original_QtyKIT) AND ([QtyART] = @Original_QtyART)); +SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM IstanzeKIT WHERE (KeyExtOrd = @KeyExtOrd) AND (KeyKit = @KeyKit) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dbo.stp_IstanzeKit_Search + + + + + + + + + + + + + + dbo.stp_IstanzeKit_insert + + + + + + + + + + + + + @@ -212,20 +291,7 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC - - - - - - - - - - - - - - + @@ -246,20 +312,57 @@ SELECT CodArtParent, CodArtChild, Qty FROM CompKIT WHERE (CodArtChild = @CodArtC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + \ No newline at end of file diff --git a/MapoDb/DS_IntServ.xss b/MapoDb/DS_IntServ.xss index cbb2c7ed..4504f039 100644 --- a/MapoDb/DS_IntServ.xss +++ b/MapoDb/DS_IntServ.xss @@ -7,8 +7,8 @@ - - + + \ No newline at end of file