diff --git a/GMW/GMW/GMW.csproj b/GMW/GMW/GMW.csproj index c0eefb36..335d80e8 100644 --- a/GMW/GMW/GMW.csproj +++ b/GMW/GMW/GMW.csproj @@ -71,6 +71,13 @@ + + anagCelle.aspx + ASPXCodeBehind + + + anagCelle.aspx + anagMagazzini.aspx ASPXCodeBehind @@ -332,6 +339,7 @@ + diff --git a/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx b/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx index 0d033828..b800a8f0 100644 --- a/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx +++ b/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx @@ -27,8 +27,6 @@ Visible="false" /> - <%-- -  --%> +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_anagCelle.ascx.cs" + Inherits="GMW.WebUserControls.mod_anagCelle" %> +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> +<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %> +
+ + + + + + +
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +   + \ No newline at end of file diff --git a/GMW/GMW/WebUserControls/mod_anagCelle.ascx.cs b/GMW/GMW/WebUserControls/mod_anagCelle.ascx.cs index c641bea1..e65b5042 100644 --- a/GMW/GMW/WebUserControls/mod_anagCelle.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_anagCelle.ascx.cs @@ -1,17 +1,493 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; +using System.Data; using System.Web.UI; using System.Web.UI.WebControls; +using SteamWare; +using GMW_data; namespace GMW.WebUserControls { - public partial class mod_anagCelle : System.Web.UI.UserControl + public partial class mod_anagCelle : SteamWare.ApplicationUserControl { - protected void Page_Load(object sender, EventArgs e) - { + #region area da NON modificare + #region area protected + + protected string _idxGridView; + protected string _idxGridViewExt; + protected string _tabCache; + protected bool _showNewBtn = false; + + /// + /// imposta errore non cancellabilità per record correlati + /// + protected void setNoDeletableErrorMessage() + { + // mostro avviso di non cancellabilità... + lblWarning.Text = traduci("notDeletable_hasChild"); + lblWarning.Visible = true; + grView.DataBind(); } + /// + /// esegue cancellazioen record + /// + protected void doDelete() + { + // posso cancellare... + lblWarning.Visible = false; + ods.Delete(); + } + /// + /// Valida la cancellazione per i dati mostrati dal gridView + /// richiede sia preventivamentedichiarato _idxGridView + /// + /// + /// + protected virtual void validaDelete(object sender, ObjectDataSourceMethodEventArgs e) + { + int idx = Convert.ToInt32(e.InputParameters[string.Format("Original_{0}", _idxGridView)]); + if (objIsNotRelated(idx)) + { + // annullo cancellazione... + e.Cancel = true; + // seleziono record... metto in session valore idx e poi ridisegno... + SteamWare.memLayer.ML.setSessionVal(_idxGridView, idx); + setNoDeletableErrorMessage(); + } + else + { + doDelete(); + } + } + + /// + /// recupera i dati di un nuovo record contenuti nel footer di un gridView; + /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...) + /// + /// + /// + protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e) + { + //recupero la riga footer... + DataColumnCollection colonne = colonneObj(); + string nomeCol; + string tipoColonna = ""; + foreach (DataColumn colonna in colonne) + { + nomeCol = colonna.ColumnName; + // cerco un textbox o quello che sia... + if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null) + { + tipoColonna = "textBox"; + } + else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null) + { + tipoColonna = "dropDownList"; + } + else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null) + { + tipoColonna = "checkBox"; + } + else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null) + { + tipoColonna = "selAjax"; + } + // in base al tipo salvo negli inputparameters dell'ODS + switch (tipoColonna) + { + case "textBox": + e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text; + break; + case "dropDownList": + e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue; + break; + case "checkBox": + e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).Checked; + break; + case "selAjax": + e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore; + break; + default: + break; + } + tipoColonna = ""; + } + } + /// + /// inserisce nuovo valore da footer + /// + /// + /// + protected void lblIns_click(object sender, EventArgs e) + { + // click su inserimento, chiamo il metodo insert dell'ObjectDataSource + ods.Insert(); + SteamWare.memLayer.ML.emptyCacheVal(_tabCache); + } + /// + /// annulla inserimento nuovo valore da footer + /// + /// + /// + protected void lblCanc_click(object sender, EventArgs e) + { + // annullo inserimento: nascondo footer, bind controlli... + grView.FooterRow.Visible = false; + } + + /// + /// aggiorna controlli datagrid e numero righe in pagina + /// + protected override void aggiornaControlliDataGL() + { + base.aggiornaControlliDataGL(); + grView.PageSize = _righeDataGridMed; + } + /// + /// traduce gli header delle colonne + /// + /// + /// + protected void grView_DataBound(object sender, EventArgs e) + { + if (grView.Rows.Count > 0) + { + LinkButton lb; + // aggiorno gli headers + foreach (TableCell cella in grView.HeaderRow.Cells) + { + try + { + lb = (LinkButton)cella.Controls[0]; + lb.Text = traduci(lb.Text); + } + catch + { } + } + int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); + lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); + } + else + { + lblNumRec.Text = ""; + } + } + /// + /// gestione evento richeista nuovo valore (mostra footer, ...) + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + // reset selezione... + resetSelezione(); + // mostro il footer oppure la riga dei dettagli x nuovo... + if (grView.FooterRow != null) + { + grView.FooterRow.Visible = true; + } + // sollevo evento nuovo valore... + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } + } + /// + /// reset della selezione + /// + /// + /// + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + /// + /// gestione cambio selezione valore + /// + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // salvo in session il valore selezionato... + SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, true); + // sollevo evento nuovo valore... + if (eh_selValore != null) + { + eh_selValore(this, new EventArgs()); + } + } + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); + grView.SelectedIndex = -1; + grView.DataBind(); + lblWarning.Visible = false; + if (eh_resetSelezione != null) + { + eh_resetSelezione(this, new EventArgs()); + } + } + + /// + /// collega i controlli + /// + protected override void bindControlli() + { + base.bindControlli(); + caricaTabelle(); + } + + #endregion + + #region gestione eventi + + public event EventHandler eh_resetSelezione; + public event EventHandler eh_nuovoValore; + public event EventHandler eh_selValore; + + #endregion + + #region public + + /// + /// definisce visibilità btnNew + /// + public bool showNewBtn + { + get + { + return _showNewBtn; + } + set + { + _showNewBtn = value; + } + } + /// + /// effettua update del modulo + /// + public void doUpdate() + { + resetSelezione(); + } + + + #endregion + + #endregion + + #region area codice variabile + + /// + /// carico le tabelle + /// + private void caricaTabelle() + { + } + /// + /// verifica complessiva non esistenza record child + /// + /// + /// + protected bool objIsNotRelated(object idxObj) + { + // !!!FARE!!! con assegnazioni celle/UDC + return false;// MagClass.magazzino.taCelle.getByIdxBlocco(Convert.ToInt32(idxObj)).Rows.Count == 0; + } + /// + /// elenco colonne del datagrid + /// + /// + protected DataColumnCollection colonneObj() + { + DS_magazzino.CelleDataTable tabella = new DS_magazzino.CelleDataTable(); + DataColumnCollection colonne = tabella.Columns; + return colonne; + } + /// + /// inizializzazione valori di default + /// + /// + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + _idxGridView = "IdxCella"; + mod_filtroMag.eh_selValore += new EventHandler(mod_filtroMag_eh_selValore); + mod_filtroBlock.eh_selValore += new EventHandler(mod_filtroBlock_eh_selValore); + if (!Page.IsPostBack) + { + mod_filtroMag.ods = odsFiltroMag; + mod_filtroBlock.ods = odsFiltroBlock; + // imposto corretto valore x filtro Mag + mod_filtroMag.valore = memLayer.ML.StringSessionObj("CodMag_sel"); + if (memLayer.ML.isInSessionObject("IdxBlocco_sel")) + { + mod_filtroBlock.valore = memLayer.ML.StringSessionObj("IdxBlocco_sel"); + } + checkFixOds(); + } + } + + void mod_filtroBlock_eh_selValore(object sender, EventArgs e) + { + // salvo in sessione il valore selezionato... + if (mod_filtroBlock.valoreInt != 0) + { + memLayer.ML.setSessionVal("IdxBlocco_sel", mod_filtroBlock.valoreInt); + } + else + { + memLayer.ML.emptySessionVal("IdxBlocco_sel"); + } + // chiamo procedura che aggiorna ods principale + checkFixOds(); + } + + void mod_filtroMag_eh_selValore(object sender, EventArgs e) + { + // salvo in sessione il valore selezionato... + if (mod_filtroMag.valore != "") + { + memLayer.ML.setSessionVal("CodMag_sel", mod_filtroMag.valore); + } + else + { + memLayer.ML.emptySessionVal("CodMag_sel"); + } + // chiamo procedura che aggiorna ods principale + checkFixOds(); + } + + /// + /// chiamato post modifica valore check/selezione nel selettore filtro impianto + /// + /// + /// + public void eh_selectedMagazzino(object sender, EventArgs e) + { + if (mod_filtroMag.valore != "") + { + if (!mod_filtroBlock.Visible) + { + mod_filtroBlock.Visible = true; + } + else + { + mod_filtroBlock.reset(); + memLayer.ML.emptySessionVal("IdxBlocco_sel"); + } + mod_filtroBlock.ods = odsFiltroBlock; + } + else + { + mod_filtroBlock.reset(); + mod_filtroBlock.Visible = false; + memLayer.ML.emptySessionVal("IdxBlocco_sel"); + } + // chiamo procedura che aggiorna ods principale + checkFixOds(); + } + /// + /// segnalo nuovo valore filtro attivo... + /// + private void checkFixOds() + { + // determino cosa filtrare nella filter expression... + if (mod_filtroBlock.Visible && memLayer.ML.isInSessionObject("IdxBlocco_sel")) + { + ods.FilterExpression = " (CodCella LIKE '%{0}%' OR Descrizione LIKE '%{0}%') AND IdxBlocco = {1} "; + } + else + { + ods.FilterExpression = " CodCella LIKE '%{0}%' OR Descrizione LIKE '%{0}%' "; + } + grView.DataBind(); + } + + + /// + /// svuoto da cache post update + /// + /// + /// + protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) + { + // evento come nuovo... + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } + } + /// + /// determina se sia eliminabile il record (=non usato) + /// + /// + /// + public bool delEnabled(object idxObj) + { + bool answ = isWritable(); + // solo se ha diritti scrittura controllo + if (answ) + { + int trovati = 0; + // !!!FARE!!! + //// controllo se ci siano celle associate + //trovati = MagClass.magazzino.taCelle.getByIdxBlocco(Convert.ToInt32(idxObj)).Rows.Count; + // controllo se ci sono record correlati... + if (trovati > 0) + { + answ = false; + } + } + return answ; + } + /// + /// gestione evento inserimento nuovo record standard (se ZERO presenti) + /// + /// + /// + protected void btnNewFromEmpty_Click(object sender, EventArgs e) + { + // reset selezione... + resetSelezione(); + // !!!FARE!!! + //// i primi valori ("0") di default sono "ND"... li inserisco come standard... + //MagClass.magazzino.taBlocchi.Insert(memLayer.ML.StringSessionObj("CodMag_sel"), memLayer.ML.confReadString("CodCS"), "ND", "Descrizione n.d.", memLayer.ML.confReadInt("NumX"), memLayer.ML.confReadInt("NumY"), memLayer.ML.confReadInt("NumZ")); + // sollevo evento nuovo valore... + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } + updateOdsDaFiltro(); + } + /// + /// aggiorno visualizzazione + /// + private void updateOdsDaFiltro() + { + grView.DataBind(); + } + /// + /// restituisce il codice blocco dato il suo idx + /// + /// + /// + public string CodBloccoDaIdx(object idx) + { + string answ = "nd"; + int _idxBlocco = Convert.ToInt32(idx); + try + { + answ = MagClass.magazzino.taBlocchi.getByIdx(_idxBlocco)[0].CodBlocco; + } + catch + { } + return answ; + } + + #endregion } } \ No newline at end of file diff --git a/GMW/GMW/WebUserControls/mod_anagCelle.ascx.designer.cs b/GMW/GMW/WebUserControls/mod_anagCelle.ascx.designer.cs index e9557154..ef57fe96 100644 --- a/GMW/GMW/WebUserControls/mod_anagCelle.ascx.designer.cs +++ b/GMW/GMW/WebUserControls/mod_anagCelle.ascx.designer.cs @@ -1,18 +1,88 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.42 +// Runtime Version:2.0.50727.4927 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace GMW.WebUserControls -{ - - - public partial class mod_anagCelle - { +namespace GMW.WebUserControls { + + + public partial class mod_anagCelle { + + /// + /// mod_filtroMag control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::mod_filtro mod_filtroMag; + + /// + /// odsFiltroMag control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsFiltroMag; + + /// + /// mod_filtroBlock control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::mod_filtro mod_filtroBlock; + + /// + /// odsFiltroBlock control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsFiltroBlock; + + /// + /// grView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// ods control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// lblNumRec control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblNumRec; + + /// + /// lblWarning control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblWarning; } } diff --git a/GMW/GMW/WebUserControls/mod_filtro.ascx b/GMW/GMW/WebUserControls/mod_filtro.ascx index 776d4d4b..6d57923d 100644 --- a/GMW/GMW/WebUserControls/mod_filtro.ascx +++ b/GMW/GMW/WebUserControls/mod_filtro.ascx @@ -1,6 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_filtro" Codebehind="mod_filtro.ascx.cs" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> - + /// css applicato agli elementi del controllo + /// + public string css + { + get + { + return _css; + } + set + { + _css = value; + } + } + /// + /// resetta il controllo (un-checked) + /// + public void reset() + { + chkFilt.Checked = false; + dlFilt.Visible = false; + memLayer.ML.emptySessionVal(string.Format("valFiltro_{0}", this.ID)); + } } \ No newline at end of file diff --git a/GMW/GMW/anagCelle.aspx b/GMW/GMW/anagCelle.aspx new file mode 100644 index 00000000..aa6af2d2 --- /dev/null +++ b/GMW/GMW/anagCelle.aspx @@ -0,0 +1,5 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSearch.master" AutoEventWireup="true" CodeBehind="anagCelle.aspx.cs" Inherits="GMW.anagCelle" %> +<%@ Register src="WebUserControls/mod_anagCelle.ascx" tagname="mod_anagCelle" tagprefix="uc1" %> + + + diff --git a/GMW/GMW/anagCelle.aspx.cs b/GMW/GMW/anagCelle.aspx.cs new file mode 100644 index 00000000..cc615a2e --- /dev/null +++ b/GMW/GMW/anagCelle.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace GMW +{ + public partial class anagCelle : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/GMW/GMW/anagCelle.aspx.designer.cs b/GMW/GMW/anagCelle.aspx.designer.cs new file mode 100644 index 00000000..2a8617d0 --- /dev/null +++ b/GMW/GMW/anagCelle.aspx.designer.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GMW { + + + public partial class anagCelle { + + /// + /// mod_anagCelle1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::GMW.WebUserControls.mod_anagCelle mod_anagCelle1; + } +} diff --git a/GMW/GMW/anagMagazzini.aspx.cs b/GMW/GMW/anagMagazzini.aspx.cs index e1c95f9c..6cf9a7d3 100644 --- a/GMW/GMW/anagMagazzini.aspx.cs +++ b/GMW/GMW/anagMagazzini.aspx.cs @@ -15,6 +15,12 @@ namespace GMW mod_anagMagazzini1.eh_resetSelezione += new EventHandler(mod_anagMagazzini1_eh_resetSelezione); mod_anagBlocchi1.eh_nuovoValore += new EventHandler(mod_anagBlocchi1_eh_nuovoValore); mod_tipoCella1.eh_nuovoValore += new EventHandler(mod_tipoCella1_eh_nuovoValore); + mod_anagBlocchi1.eh_selValore += new EventHandler(mod_anagBlocchi1_eh_selValore); + } + + void mod_anagBlocchi1_eh_selValore(object sender, EventArgs e) + { + Response.Redirect("anagCelle.aspx"); } void mod_tipoCella1_eh_nuovoValore(object sender, EventArgs e) diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index 1a2bad90..06bd3036 100644 Binary files a/GMW/GMW/bin/GMW.dll and b/GMW/GMW/bin/GMW.dll differ diff --git a/GMW/GMW/bin/GMW_data.dll b/GMW/GMW/bin/GMW_data.dll index bd2c628e..6dce9d00 100644 Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index 1a2bad90..06bd3036 100644 Binary files a/GMW/GMW/obj/Debug/GMW.dll and b/GMW/GMW/obj/Debug/GMW.dll differ diff --git a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache index 5c41be73..7bd3011a 100644 Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_data/DS_Utility.Designer.cs b/GMW/GMW_data/DS_Utility.Designer.cs index 37ee6154..3338415f 100644 --- a/GMW/GMW_data/DS_Utility.Designer.cs +++ b/GMW/GMW_data/DS_Utility.Designer.cs @@ -27,6 +27,8 @@ namespace GMW_data { private v_selMagDataTable tablev_selMag; + private v_selBloccoDataTable tablev_selBlocco; + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -56,6 +58,9 @@ namespace GMW_data { if ((ds.Tables["v_selMag"] != null)) { base.Tables.Add(new v_selMagDataTable(ds.Tables["v_selMag"])); } + if ((ds.Tables["v_selBlocco"] != null)) { + base.Tables.Add(new v_selBloccoDataTable(ds.Tables["v_selBlocco"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -83,6 +88,15 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public v_selBloccoDataTable v_selBlocco { + get { + return this.tablev_selBlocco; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.BrowsableAttribute(true)] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] @@ -145,6 +159,9 @@ namespace GMW_data { if ((ds.Tables["v_selMag"] != null)) { base.Tables.Add(new v_selMagDataTable(ds.Tables["v_selMag"])); } + if ((ds.Tables["v_selBlocco"] != null)) { + base.Tables.Add(new v_selBloccoDataTable(ds.Tables["v_selBlocco"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -181,6 +198,12 @@ namespace GMW_data { this.tablev_selMag.InitVars(); } } + this.tablev_selBlocco = ((v_selBloccoDataTable)(base.Tables["v_selBlocco"])); + if ((initTable == true)) { + if ((this.tablev_selBlocco != null)) { + this.tablev_selBlocco.InitVars(); + } + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -192,6 +215,8 @@ namespace GMW_data { this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; this.tablev_selMag = new v_selMagDataTable(); base.Tables.Add(this.tablev_selMag); + this.tablev_selBlocco = new v_selBloccoDataTable(); + base.Tables.Add(this.tablev_selBlocco); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -199,6 +224,11 @@ namespace GMW_data { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private bool ShouldSerializev_selBlocco() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { @@ -254,6 +284,8 @@ namespace GMW_data { public delegate void v_selMagRowChangeEventHandler(object sender, v_selMagRowChangeEvent e); + public delegate void v_selBloccoRowChangeEventHandler(object sender, v_selBloccoRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -518,6 +550,286 @@ namespace GMW_data { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class v_selBloccoDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnvalue; + + private global::System.Data.DataColumn columnlabel; + + private global::System.Data.DataColumn columnCodCS; + + private global::System.Data.DataColumn columnCodMag; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public v_selBloccoDataTable() { + this.TableName = "v_selBlocco"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal v_selBloccoDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected v_selBloccoDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn valueColumn { + get { + return this.columnvalue; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn labelColumn { + get { + return this.columnlabel; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn CodCSColumn { + get { + return this.columnCodCS; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn CodMagColumn { + get { + return this.columnCodMag; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public v_selBloccoRow this[int index] { + get { + return ((v_selBloccoRow)(this.Rows[index])); + } + } + + public event v_selBloccoRowChangeEventHandler v_selBloccoRowChanging; + + public event v_selBloccoRowChangeEventHandler v_selBloccoRowChanged; + + public event v_selBloccoRowChangeEventHandler v_selBloccoRowDeleting; + + public event v_selBloccoRowChangeEventHandler v_selBloccoRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void Addv_selBloccoRow(v_selBloccoRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public v_selBloccoRow Addv_selBloccoRow(string label, string CodCS, string CodMag) { + v_selBloccoRow rowv_selBloccoRow = ((v_selBloccoRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + label, + CodCS, + CodMag}; + rowv_selBloccoRow.ItemArray = columnValuesArray; + this.Rows.Add(rowv_selBloccoRow); + return rowv_selBloccoRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public v_selBloccoRow FindByvalue(int value) { + return ((v_selBloccoRow)(this.Rows.Find(new object[] { + value}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public override global::System.Data.DataTable Clone() { + v_selBloccoDataTable cln = ((v_selBloccoDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override global::System.Data.DataTable CreateInstance() { + return new v_selBloccoDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal void InitVars() { + this.columnvalue = base.Columns["value"]; + this.columnlabel = base.Columns["label"]; + this.columnCodCS = base.Columns["CodCS"]; + this.columnCodMag = base.Columns["CodMag"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void InitClass() { + this.columnvalue = new global::System.Data.DataColumn("value", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnvalue); + this.columnlabel = new global::System.Data.DataColumn("label", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnlabel); + this.columnCodCS = new global::System.Data.DataColumn("CodCS", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodCS); + this.columnCodMag = new global::System.Data.DataColumn("CodMag", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodMag); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnvalue}, true)); + this.columnvalue.AutoIncrement = true; + this.columnvalue.AutoIncrementSeed = -1; + this.columnvalue.AutoIncrementStep = -1; + this.columnvalue.AllowDBNull = false; + this.columnvalue.ReadOnly = true; + this.columnvalue.Unique = true; + this.columnlabel.ReadOnly = true; + this.columnlabel.MaxLength = 151; + this.columnCodCS.MaxLength = 2; + this.columnCodMag.MaxLength = 50; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public v_selBloccoRow Newv_selBloccoRow() { + return ((v_selBloccoRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new v_selBloccoRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override global::System.Type GetRowType() { + return typeof(v_selBloccoRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.v_selBloccoRowChanged != null)) { + this.v_selBloccoRowChanged(this, new v_selBloccoRowChangeEvent(((v_selBloccoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.v_selBloccoRowChanging != null)) { + this.v_selBloccoRowChanging(this, new v_selBloccoRowChangeEvent(((v_selBloccoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.v_selBloccoRowDeleted != null)) { + this.v_selBloccoRowDeleted(this, new v_selBloccoRowChangeEvent(((v_selBloccoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.v_selBloccoRowDeleting != null)) { + this.v_selBloccoRowDeleting(this, new v_selBloccoRowChangeEvent(((v_selBloccoRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void Removev_selBloccoRow(v_selBloccoRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_Utility ds = new DS_Utility(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "v_selBloccoDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + /// ///Represents strongly named DataRow class. /// @@ -578,6 +890,106 @@ namespace GMW_data { } } + /// + ///Represents strongly named DataRow class. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + public partial class v_selBloccoRow : global::System.Data.DataRow { + + private v_selBloccoDataTable tablev_selBlocco; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal v_selBloccoRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tablev_selBlocco = ((v_selBloccoDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public int value { + get { + return ((int)(this[this.tablev_selBlocco.valueColumn])); + } + set { + this[this.tablev_selBlocco.valueColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public string label { + get { + try { + return ((string)(this[this.tablev_selBlocco.labelColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'label\' in table \'v_selBlocco\' is DBNull.", e); + } + } + set { + this[this.tablev_selBlocco.labelColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public string CodCS { + get { + try { + return ((string)(this[this.tablev_selBlocco.CodCSColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'CodCS\' in table \'v_selBlocco\' is DBNull.", e); + } + } + set { + this[this.tablev_selBlocco.CodCSColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public string CodMag { + get { + try { + return ((string)(this[this.tablev_selBlocco.CodMagColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'CodMag\' in table \'v_selBlocco\' is DBNull.", e); + } + } + set { + this[this.tablev_selBlocco.CodMagColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool IslabelNull() { + return this.IsNull(this.tablev_selBlocco.labelColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void SetlabelNull() { + this[this.tablev_selBlocco.labelColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool IsCodCSNull() { + return this.IsNull(this.tablev_selBlocco.CodCSColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void SetCodCSNull() { + this[this.tablev_selBlocco.CodCSColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool IsCodMagNull() { + return this.IsNull(this.tablev_selBlocco.CodMagColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void SetCodMagNull() { + this[this.tablev_selBlocco.CodMagColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -608,6 +1020,37 @@ namespace GMW_data { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + public class v_selBloccoRowChangeEvent : global::System.EventArgs { + + private v_selBloccoRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public v_selBloccoRowChangeEvent(v_selBloccoRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public v_selBloccoRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace GMW_data.DS_UtilityTableAdapters { @@ -794,6 +1237,195 @@ namespace GMW_data.DS_UtilityTableAdapters { } } + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + [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=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class v_selBloccoTableAdapter : 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()] + public v_selBloccoTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + 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()] + 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()] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + 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 = "v_selBlocco"; + tableMapping.ColumnMappings.Add("value", "value"); + tableMapping.ColumnMappings.Add("label", "label"); + tableMapping.ColumnMappings.Add("CodCS", "CodCS"); + tableMapping.ColumnMappings.Add("CodMag", "CodMag"); + this._adapter.TableMappings.Add(tableMapping); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::GMW_data.Properties.Settings.Default.GMWConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT value, label, CodCS, CodMag FROM dbo.v_selBlocco"; + 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 = "SELECT *\r\nFROM v_selBlocco\r\nWHERE (CodCS = @CodCS) AND (" + + "CodMag = @CodMag)"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.NChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, "CodCS", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMag", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "CodMag", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DS_Utility.v_selBloccoDataTable 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.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_Utility.v_selBloccoDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_Utility.v_selBloccoDataTable dataTable = new DS_Utility.v_selBloccoDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Utility.v_selBloccoDataTable getByConditio(string CodCS, string CodMag) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((CodCS == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(CodCS)); + } + if ((CodMag == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodMag)); + } + DS_Utility.v_selBloccoDataTable dataTable = new DS_Utility.v_selBloccoDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + } + /// ///Represents the connection and commands used to retrieve and save data. /// diff --git a/GMW/GMW_data/DS_Utility.xsd b/GMW/GMW_data/DS_Utility.xsd index f49671d8..9e43853c 100644 --- a/GMW/GMW_data/DS_Utility.xsd +++ b/GMW/GMW_data/DS_Utility.xsd @@ -39,6 +39,39 @@ ORDER BY label + + + + + + SELECT value, label, CodCS, CodMag FROM dbo.v_selBlocco + + + + + + + + + + + + + + + + SELECT * +FROM v_selBlocco +WHERE (CodCS = @CodCS) AND (CodMag = @CodMag) + + + + + + + + + @@ -153,6 +186,34 @@ ORDER BY label + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -160,5 +221,9 @@ ORDER BY label + + + + \ No newline at end of file diff --git a/GMW/GMW_data/DS_Utility.xss b/GMW/GMW_data/DS_Utility.xss index 8cbb1994..75595718 100644 --- a/GMW/GMW_data/DS_Utility.xss +++ b/GMW/GMW_data/DS_Utility.xss @@ -6,8 +6,9 @@ --> - - + + + \ No newline at end of file diff --git a/GMW/GMW_data/DS_magazzino.Designer.cs b/GMW/GMW_data/DS_magazzino.Designer.cs index 939f3ea7..3046e0a9 100644 --- a/GMW/GMW_data/DS_magazzino.Designer.cs +++ b/GMW/GMW_data/DS_magazzino.Designer.cs @@ -7512,7 +7512,7 @@ SELECT IdxBlocco, CodMag, CodCS, CodBlocco, DescBlocco, NumX, NumY, NumZ FROM Bl [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT IdxBlocco, CodMag, CodCS, CodBlocco, DescBlocco, NumX, NumY, NumZ FROM dbo" + @@ -7532,18 +7532,24 @@ SELECT IdxBlocco, CodMag, CodCS, CodBlocco, DescBlocco, NumX, NumY, NumZ FROM Bl this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMag", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "UPDATE Blocchi\r\nSET CodMag = @CodMag, CodCS = @CodCS, CodBlo" + + this._commandCollection[3].CommandText = "dbo.stp_BlocchiGetByIdx"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxBlocco", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = "UPDATE Blocchi\r\nSET CodMag = @CodMag, CodCS = @CodCS, CodBlo" + "cco = @CodBlocco, DescBlocco = @DescBlocco, NumX = @NumX, NumY = @NumY, NumZ = @" + "NumZ\r\nWHERE (IdxBlocco = @Original_IdxBlocco)"; - this._commandCollection[3].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMag", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "CodMag", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.NChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, "CodCS", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodBlocco", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, "CodBlocco", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DescBlocco", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "DescBlocco", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumX", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "NumX", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumY", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "NumY", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumZ", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "NumZ", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxBlocco", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "IdxBlocco", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._commandCollection[4].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMag", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "CodMag", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.NChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, "CodCS", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodBlocco", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, "CodBlocco", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DescBlocco", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "DescBlocco", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumX", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "NumX", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumY", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "NumY", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumZ", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "NumZ", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxBlocco", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "IdxBlocco", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -7590,6 +7596,22 @@ SELECT IdxBlocco, CodMag, CodCS, CodBlocco, DescBlocco, NumX, NumY, NumZ FROM Bl return dataTable; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_magazzino.BlocchiDataTable getByIdx(global::System.Nullable IdxBlocco) { + this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((IdxBlocco.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxBlocco.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_magazzino.BlocchiDataTable dataTable = new DS_magazzino.BlocchiDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(DS_magazzino.BlocchiDataTable dataTable) { @@ -7924,7 +7946,7 @@ SELECT IdxBlocco, CodMag, CodCS, CodBlocco, DescBlocco, NumX, NumY, NumZ FROM Bl [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, false)] public virtual int UpdateQuery(string CodMag, string CodCS, string CodBlocco, string DescBlocco, global::System.Nullable NumX, global::System.Nullable NumY, global::System.Nullable NumZ, int Original_IdxBlocco) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; if ((CodMag == null)) { command.Parameters[0].Value = global::System.DBNull.Value; } @@ -8189,7 +8211,7 @@ SELECT IdxCella, CodCS, CodCella, IdxTipoCella, Descrizione, Attiva, IdxBlocco, [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT IdxCella, CodCS, CodCella, IdxTipoCella, Descrizione, Attiva, IdxBlocco, X" + @@ -8197,16 +8219,45 @@ SELECT IdxCella, CodCS, CodCella, IdxTipoCella, Descrizione, Attiva, IdxBlocco, 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_cellaGetByIdxBlocco"; - 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("@IdxBlocco", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].CommandText = "DELETE FROM [dbo].[Celle] WHERE ([IdxCella] = @Original_IdxCella)"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxCella", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "IdxCella", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_cellaGetByTipoCella"; + this._commandCollection[2].CommandText = "dbo.stp_cellaGetByCodMag"; 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("@IdxTipoCella", 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("@CodCS", global::System.Data.SqlDbType.VarChar, 2, 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("@CodMag", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_cellaGetByIdxBlocco"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxBlocco", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = "dbo.stp_cellaGetByTipoCella"; + this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxTipoCella", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[5].Connection = this.Connection; + this._commandCollection[5].CommandText = "UPDATE [dbo].[Celle] SET [CodCS] = @CodCS, [CodCella] = @CodCella, [IdxTipoCella]" + + " = @IdxTipoCella, [Descrizione] = @Descrizione, [Attiva] = @Attiva, [IdxBlocco] " + + "= @IdxBlocco, [X] = @X, [Y] = @Y, [Z] = @Z WHERE ([IdxCella] = @Original_IdxCell" + + "a)"; + this._commandCollection[5].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.NChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, "CodCS", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCella", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "CodCella", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxTipoCella", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "IdxTipoCella", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "Descrizione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Attiva", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 0, 0, "Attiva", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxBlocco", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "IdxBlocco", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@X", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "X", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Y", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Y", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Z", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Z", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxCella", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "IdxCella", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -8231,11 +8282,33 @@ SELECT IdxCella, CodCS, CodCella, IdxTipoCella, Descrizione, Attiva, IdxBlocco, return dataTable; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_magazzino.CelleDataTable getByCodMag(string CodCS, string CodMag) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((CodCS == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodCS)); + } + if ((CodMag == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(CodMag)); + } + DS_magazzino.CelleDataTable dataTable = new DS_magazzino.CelleDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_magazzino.CelleDataTable getByIdxBlocco(global::System.Nullable IdxBlocco) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((IdxBlocco.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxBlocco.Value)); } @@ -8251,7 +8324,7 @@ SELECT IdxCella, CodCS, CodCella, IdxTipoCella, Descrizione, Attiva, IdxBlocco, [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_magazzino.CelleDataTable getByTipoCella(global::System.Nullable IdxTipoCella) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((IdxTipoCella.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxTipoCella.Value)); } @@ -8640,6 +8713,106 @@ SELECT IdxCella, CodCS, CodCella, IdxTipoCella, Descrizione, Attiva, IdxBlocco, global::System.Nullable Original_Z) { return this.Update(CodCS, CodCella, IdxTipoCella, Descrizione, Attiva, IdxBlocco, X, Y, Z, Original_IdxCella, Original_CodCS, Original_CodCella, Original_IdxTipoCella, Original_Descrizione, Original_Attiva, Original_IdxBlocco, Original_X, Original_Y, Original_Z, Original_IdxCella); } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, false)] + public virtual int DeleteQuery(int Original_IdxCella) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + command.Parameters[0].Value = ((int)(Original_IdxCella)); + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, false)] + public virtual int UpdateQuery(string CodCS, string CodCella, global::System.Nullable IdxTipoCella, string Descrizione, global::System.Nullable Attiva, global::System.Nullable IdxBlocco, global::System.Nullable X, global::System.Nullable Y, global::System.Nullable Z, int Original_IdxCella) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; + if ((CodCS == null)) { + throw new global::System.ArgumentNullException("CodCS"); + } + else { + command.Parameters[0].Value = ((string)(CodCS)); + } + if ((CodCella == null)) { + throw new global::System.ArgumentNullException("CodCella"); + } + else { + command.Parameters[1].Value = ((string)(CodCella)); + } + if ((IdxTipoCella.HasValue == true)) { + command.Parameters[2].Value = ((int)(IdxTipoCella.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Descrizione == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(Descrizione)); + } + if ((Attiva.HasValue == true)) { + command.Parameters[4].Value = ((bool)(Attiva.Value)); + } + else { + command.Parameters[4].Value = global::System.DBNull.Value; + } + if ((IdxBlocco.HasValue == true)) { + command.Parameters[5].Value = ((int)(IdxBlocco.Value)); + } + else { + command.Parameters[5].Value = global::System.DBNull.Value; + } + if ((X.HasValue == true)) { + command.Parameters[6].Value = ((int)(X.Value)); + } + else { + command.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Y.HasValue == true)) { + command.Parameters[7].Value = ((int)(Y.Value)); + } + else { + command.Parameters[7].Value = global::System.DBNull.Value; + } + if ((Z.HasValue == true)) { + command.Parameters[8].Value = ((int)(Z.Value)); + } + else { + command.Parameters[8].Value = global::System.DBNull.Value; + } + command.Parameters[9].Value = ((int)(Original_IdxCella)); + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } } /// diff --git a/GMW/GMW_data/DS_magazzino.xsd b/GMW/GMW_data/DS_magazzino.xsd index f6644fd6..16090eb4 100644 --- a/GMW/GMW_data/DS_magazzino.xsd +++ b/GMW/GMW_data/DS_magazzino.xsd @@ -562,6 +562,17 @@ SELECT IdxBlocco, CodMag, CodCS, CodBlocco, DescBlocco, NumX, NumY, NumZ FROM Bl + + + + dbo.stp_BlocchiGetByIdx + + + + + + + @@ -683,6 +694,28 @@ SELECT IdxCella, CodCS, CodCella, IdxTipoCella, Descrizione, Attiva, IdxBlocco, + + + + DELETE FROM [dbo].[Celle] WHERE ([IdxCella] = @Original_IdxCella) + + + + + + + + + + dbo.stp_cellaGetByCodMag + + + + + + + + @@ -705,6 +738,25 @@ SELECT IdxCella, CodCS, CodCella, IdxTipoCella, Descrizione, Attiva, IdxBlocco, + + + + UPDATE [dbo].[Celle] SET [CodCS] = @CodCS, [CodCella] = @CodCella, [IdxTipoCella] = @IdxTipoCella, [Descrizione] = @Descrizione, [Attiva] = @Attiva, [IdxBlocco] = @IdxBlocco, [X] = @X, [Y] = @Y, [Z] = @Z WHERE ([IdxCella] = @Original_IdxCella) + + + + + + + + + + + + + + + diff --git a/GMW/GMW_data/DS_magazzino.xss b/GMW/GMW_data/DS_magazzino.xss index 774dc833..93c9ccd6 100644 --- a/GMW/GMW_data/DS_magazzino.xss +++ b/GMW/GMW_data/DS_magazzino.xss @@ -10,9 +10,9 @@ - - - + + + @@ -51,31 +51,31 @@ - + - 723 - 598 + 722 + 633 648 - 598 + 633 - + 1014 - 741 + 757 - 935 - 741 + 938 + 757 - + 1107 diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index bd2c628e..6dce9d00 100644 Binary files a/GMW/GMW_data/bin/Debug/GMW_data.dll and b/GMW/GMW_data/bin/Debug/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll index bd2c628e..6dce9d00 100644 Binary files a/GMW/GMW_data/obj/Debug/GMW_data.dll and b/GMW/GMW_data/obj/Debug/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll b/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll index f33d2bdf..658ed1a8 100644 Binary files a/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll and b/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll index f765c3ba..cdd29b80 100644 Binary files a/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll and b/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll differ diff --git a/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll index 10b555c3..e080dcc5 100644 Binary files a/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll and b/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll differ