OK insert/modifica/del x ricambi

This commit is contained in:
Samuele E. Locatelli
2015-11-26 19:25:00 +01:00
parent 5fca8a14ce
commit 4dda399b61
15 changed files with 167 additions and 38 deletions
+42 -19
View File
@@ -7111,7 +7111,7 @@ namespace GIM_data.DS_MagTableAdapters {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
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 *\r\nFROM dbo.v_StatoMag";
@@ -7124,26 +7124,15 @@ namespace GIM_data.DS_MagTableAdapters {
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxItem", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[2].Connection = this.Connection;
this._commandCollection[2].CommandText = "dbo.stp_StatoMag_insert";
this._commandCollection[2].CommandText = "dbo.stp_StatoMag_getByDescr";
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("@Descrizione", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NomeCostruttore", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCostruttore", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSomaschini", 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("@QtaMin", 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("@QtaLotto", 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("@Valore", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Giacenza", 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("@CodLocazione", 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("@Note", global::System.Data.SqlDbType.NVarChar, 2147483647, 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_StatoMag_update";
this._commandCollection[3].CommandText = "dbo.stp_StatoMag_insert";
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("@Original_idxItem", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Famiglia", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NomeCostruttore", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCostruttore", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
@@ -7151,8 +7140,25 @@ namespace GIM_data.DS_MagTableAdapters {
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaMin", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaLotto", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Valore", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Giacenza", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLocazione", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2147483647, global::System.Data.ParameterDirection.Input, 0, 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_StatoMag_update";
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("@Original_idxItem", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Famiglia", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NomeCostruttore", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCostruttore", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodInterno", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaMin", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaLotto", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Valore", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLocazione", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -7179,6 +7185,23 @@ namespace GIM_data.DS_MagTableAdapters {
return dataTable;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_Mag.StatoMagDataTable getByDescr(string Descrizione) {
this.Adapter.SelectCommand = this.CommandCollection[2];
if ((Descrizione == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(Descrizione));
}
DS_Mag.StatoMagDataTable dataTable = new DS_Mag.StatoMagDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
@@ -7210,8 +7233,8 @@ namespace GIM_data.DS_MagTableAdapters {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int insertQuery(string Descrizione, string NomeCostruttore, string CodCostruttore, string CodSomaschini, global::System.Nullable<int> QtaMin, global::System.Nullable<int> QtaLotto, global::System.Nullable<decimal> Valore, global::System.Nullable<int> Giacenza, string CodLocazione, string Note) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2];
public virtual int insertQuery(string Descrizione, string NomeCostruttore, string CodCostruttore, string CodInterno, global::System.Nullable<int> QtaMin, global::System.Nullable<int> QtaLotto, global::System.Nullable<decimal> Valore, global::System.Nullable<int> Giacenza, string CodLocazione, string Note) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
if ((Descrizione == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -7230,11 +7253,11 @@ namespace GIM_data.DS_MagTableAdapters {
else {
command.Parameters[3].Value = ((string)(CodCostruttore));
}
if ((CodSomaschini == null)) {
if ((CodInterno == null)) {
command.Parameters[4].Value = global::System.DBNull.Value;
}
else {
command.Parameters[4].Value = ((string)(CodSomaschini));
command.Parameters[4].Value = ((string)(CodInterno));
}
if ((QtaMin.HasValue == true)) {
command.Parameters[5].Value = ((int)(QtaMin.Value));
@@ -7293,7 +7316,7 @@ namespace GIM_data.DS_MagTableAdapters {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int updateQuery(global::System.Nullable<int> Original_idxItem, string Famiglia, string Descrizione, string NomeCostruttore, string CodCostruttore, string CodInterno, global::System.Nullable<int> QtaMin, global::System.Nullable<int> QtaLotto, global::System.Nullable<decimal> Valore, string CodLocazione, string Note) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4];
if ((Original_idxItem.HasValue == true)) {
command.Parameters[1].Value = ((int)(Original_idxItem.Value));
}
+12 -1
View File
@@ -315,6 +315,17 @@ FROM dbo.v_StatoMag</CommandText>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GIMConnectionString (Web.config)" DbObjectName="GIM.dbo.stp_StatoMag_getByDescr" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByDescr" GetMethodModifier="Public" GetMethodName="getByDescr" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByDescr" UserSourceName="getByDescr">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_StatoMag_getByDescr</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Descrizione" Precision="0" ProviderType="NVarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GIMConnectionString (Web.config)" DbObjectName="GIM.dbo.stp_StatoMag_insert" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="insertQuery" Modifier="Public" Name="insertQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="insertQuery">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
@@ -324,7 +335,7 @@ FROM dbo.v_StatoMag</CommandText>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Descrizione" Precision="0" ProviderType="NVarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@NomeCostruttore" Precision="0" ProviderType="NVarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@CodCostruttore" Precision="0" ProviderType="NVarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@CodSomaschini" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@CodInterno" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@QtaMin" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@QtaLotto" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="decimal" DbType="Decimal" Direction="Input" ParameterName="@Valore" Precision="18" ProviderType="Decimal" Scale="6" Size="9" SourceColumnNullMapping="false" SourceVersion="Current" />
+2 -2
View File
@@ -10,8 +10,8 @@
<Shape ID="DesignTable:MagRic" ZOrder="16" X="250" Y="300" Height="172" Width="188" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:MovMagRic" ZOrder="12" X="555" Y="58" Height="172" Width="214" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:AnagItems" ZOrder="4" X="538" Y="292" Height="267" Width="207" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
<Shape ID="DesignTable:StatoMag" ZOrder="2" X="927" Y="12" Height="362" Width="266" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:AnagTags" ZOrder="1" X="759" Y="553" Height="210" Width="172" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
<Shape ID="DesignTable:StatoMag" ZOrder="1" X="927" Y="12" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:AnagTags" ZOrder="2" X="759" Y="553" Height="210" Width="172" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
<Shape ID="DesignTable:Tag2Item" ZOrder="5" X="961" Y="468" Height="153" Width="158" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:Tag2Macc" ZOrder="6" X="529" Y="599" Height="134" Width="158" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:AnagMacchine" ZOrder="3" X="254" Y="521" Height="324" Width="189" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
Binary file not shown.
Binary file not shown.
@@ -11,10 +11,10 @@
<div class="col-xs-6">
<asp:Label runat="server" ID="lblNewTag"><%: traduci("lblNewTag") %></asp:Label>
<asp:TextBox runat="server" ID="txtNewTag"></asp:TextBox>
<asp:Label runat="server" ID="lblError" ForeColor="Red" Text="" />
</div>
<div class="col-xs-6">
<asp:LinkButton runat="server" ID="lbtAddNew" CssClass="btn btn-success" OnClick="lbtAddNew_Click"><%: traduci("addNewTag") %></asp:LinkButton>
<asp:Label runat="server" ID="lblError" ForeColor="Red" Text="" />
</div>
</div>
</div>
@@ -39,15 +39,6 @@ namespace GIM_site.WebUserControls {
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtNewTag;
/// <summary>
/// lblError control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblError;
/// <summary>
/// lbtAddNew control.
/// </summary>
@@ -57,6 +48,15 @@ namespace GIM_site.WebUserControls {
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtAddNew;
/// <summary>
/// lblError control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblError;
/// <summary>
/// grView control.
/// </summary>
@@ -4,6 +4,19 @@
<div class="row">
<div class="col-xs-9" style="font-size: 0.8em; padding: 0px;">
<div runat="server" id="divNewItem" visible="false">
<div class="row">
<div class="col-xs-6">
<asp:Label runat="server" ID="lblNewDescr"><%: traduci("lblNewDescr") %></asp:Label>
<asp:TextBox runat="server" ID="txtNewDescr"></asp:TextBox>
<asp:DropDownList runat="server" ID="ddlCodLocazioneNew" DataSourceID="odsLocazione" DataTextField="CodLocazione" DataValueField="CodLocazione"></asp:DropDownList>
</div>
<div class="col-xs-6">
<asp:LinkButton runat="server" ID="lbtAddNew" CssClass="btn btn-success" OnClick="lbtAddNew_Click"><%: traduci("addNewItem") %></asp:LinkButton>
<asp:Label runat="server" ID="lblError" ForeColor="Red" Text="" />
</div>
</div>
</div>
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="20" DataKeyNames="idxItem" DataSourceID="ods" OnDataBound="grView_DataBound" OnRowEditing="grView_RowEditing" CssClass="table table-striped" OnSelectedIndexChanged="grView_SelectedIndexChanged">
<PagerStyle CssClass="active GridPager" />
<PagerSettings Mode="NumericFirstLast" />
@@ -86,10 +86,7 @@ namespace GIM_site.WebUserControls
{
// reset selezione...
resetSelezione();
// i primi valori ("0") di default sono "ND"... li inserisco come standard...
GIM_data.DS_MagTableAdapters.AnagLocazioniTableAdapter taAnagLoc = new GIM_data.DS_MagTableAdapters.AnagLocazioniTableAdapter();
taAnagLoc.Insert("ND00", memLayer.ML.confReadString("newLocazione"));
grView.DataBind();
divNewItem.Visible = true;
}
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
@@ -112,5 +109,35 @@ namespace GIM_site.WebUserControls
}
}
}
protected void lbtAddNew_Click(object sender, EventArgs e)
{
lblError.Text = "";
// verifico tag sia NUOVO...
string newDescr = txtNewDescr.Text.Trim();
if (TA_app.obj.taStatoMag.getByDescr(newDescr).Rows.Count == 0)
{
// i primi valori ("0") di default sono "ND"... li inserisco come standard...
try
{
TA_app.obj.taStatoMag.insertQuery(newDescr, "", "", "", 0, 1, 0, 0, ddlCodLocazioneNew.SelectedValue, "");
}
catch(Exception exc)
{
logger.lg.scriviLog(string.Format("Errore ins nuovo ITEM ricambi:{0}{1}", Environment.NewLine, exc));
}
// salvo in ricerca...
((FullPage)(this.Page.Master)).searchVal = newDescr;
// update visualizzazioni
divNewItem.Visible = false;
grView.DataBind();
}
else
{
// indico tag duplicato
lblError.Text = traduci("RecordDuplicato");
}
}
}
}
@@ -12,6 +12,60 @@ namespace GIM_site.WebUserControls {
public partial class mod_magRic {
/// <summary>
/// divNewItem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divNewItem;
/// <summary>
/// lblNewDescr control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblNewDescr;
/// <summary>
/// txtNewDescr control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtNewDescr;
/// <summary>
/// ddlCodLocazioneNew control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlCodLocazioneNew;
/// <summary>
/// lbtAddNew control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtAddNew;
/// <summary>
/// lblError control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblError;
/// <summary>
/// grView control.
/// </summary>
@@ -16,7 +16,7 @@
</asp:ObjectDataSource>
</div>
</div>
<asp:GridView ID="grViewTags" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="10" DataKeyNames="idxItem,TagCode" DataSourceID="odsByItem" OnDataBound="grViewTags_DataBound" OnRowEditing="grViewTags_RowEditing" OnRowDeleted="grViewTags_RowDeleted">
<asp:GridView ID="grViewTags" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="10" CssClass="table table-striped" DataKeyNames="idxItem,TagCode" DataSourceID="odsByItem" OnDataBound="grViewTags_DataBound" OnRowEditing="grViewTags_RowEditing" OnRowDeleted="grViewTags_RowDeleted">
<PagerStyle CssClass="active GridPager" />
<PagerSettings Mode="NumericFirstLast" />
<SelectedRowStyle CssClass="info" />
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -135,4 +135,5 @@ exec voc.stp_insNewLemma 'lblNewTag', 'Nuova Etichetta'
exec voc.stp_insNewLemma 'addNewTag', 'Aggiungi Etichetta'
exec voc.stp_insNewLemma 'RecordDuplicato', 'Record Duplicato'
exec voc.stp_insNewLemma 'RicambiImpiegati', 'Ricambi Impiegati'
exec voc.stp_insNewLemma 'lblNewDescr', 'Nuovo Ricambio'
exec voc.stp_insNewLemma 'addNewItem', 'Aggiungi Record'