Aggiunti metodi x update e caricamento TUTTI OtherItems di un CART
This commit is contained in:
Generated
+68
-6
@@ -34087,7 +34087,7 @@ SELECT RemnantID, BatchID, MatID, SheetID, DimX, DimY, Available FROM Remnants W
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
private void InitCommandCollection() {
|
||||
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[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 * from PackLog";
|
||||
@@ -34102,20 +34102,30 @@ SELECT RemnantID, BatchID, MatID, SheetID, DimX, DimY, Available FROM Remnants W
|
||||
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserName", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[2].Connection = this.Connection;
|
||||
this._commandCollection[2].CommandText = "dbo.stp_PL_acquirePaint";
|
||||
this._commandCollection[2].CommandText = "dbo.stp_PL_acquireOtherItems";
|
||||
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("@BinID", 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("@OtherItemID", 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("@CartID", 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("@MaxNum", 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("@Device", 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("@UserName", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[3].Connection = this.Connection;
|
||||
this._commandCollection[3].CommandText = "dbo.stp_PLog_getByCart";
|
||||
this._commandCollection[3].CommandText = "dbo.stp_PL_acquirePaint";
|
||||
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("@BinID", 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("@CartID", 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("@MaxNum", 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("@Device", 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("@UserName", global::System.Data.SqlDbType.NVarChar, 50, 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_PLog_getByCart";
|
||||
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("@CartID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
@@ -34147,7 +34157,7 @@ SELECT RemnantID, BatchID, MatID, SheetID, DimX, DimY, Available FROM Remnants W
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
|
||||
public virtual DS_App.PackLogDataTable getByCartId(global::System.Nullable<int> CartID) {
|
||||
this.Adapter.SelectCommand = this.CommandCollection[3];
|
||||
this.Adapter.SelectCommand = this.CommandCollection[4];
|
||||
if ((CartID.HasValue == true)) {
|
||||
this.Adapter.SelectCommand.Parameters[1].Value = ((int)(CartID.Value));
|
||||
}
|
||||
@@ -34202,8 +34212,60 @@ SELECT RemnantID, BatchID, MatID, SheetID, DimX, DimY, Available FROM Remnants W
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
public virtual int acquirePaint(global::System.Nullable<int> BinID, global::System.Nullable<int> CartID, global::System.Nullable<int> MaxNum, string Device, string UserName) {
|
||||
public virtual int acquireOtherItems(global::System.Nullable<int> OtherItemID, global::System.Nullable<int> CartID, global::System.Nullable<int> MaxNum, string Device, string UserName) {
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2];
|
||||
if ((OtherItemID.HasValue == true)) {
|
||||
command.Parameters[1].Value = ((int)(OtherItemID.Value));
|
||||
}
|
||||
else {
|
||||
command.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
if ((CartID.HasValue == true)) {
|
||||
command.Parameters[2].Value = ((int)(CartID.Value));
|
||||
}
|
||||
else {
|
||||
command.Parameters[2].Value = global::System.DBNull.Value;
|
||||
}
|
||||
if ((MaxNum.HasValue == true)) {
|
||||
command.Parameters[3].Value = ((int)(MaxNum.Value));
|
||||
}
|
||||
else {
|
||||
command.Parameters[3].Value = global::System.DBNull.Value;
|
||||
}
|
||||
if ((Device == null)) {
|
||||
command.Parameters[4].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
command.Parameters[4].Value = ((string)(Device));
|
||||
}
|
||||
if ((UserName == null)) {
|
||||
command.Parameters[5].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
command.Parameters[5].Value = ((string)(UserName));
|
||||
}
|
||||
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
|
||||
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
|
||||
!= global::System.Data.ConnectionState.Open)) {
|
||||
command.Connection.Open();
|
||||
}
|
||||
int returnValue;
|
||||
try {
|
||||
returnValue = command.ExecuteNonQuery();
|
||||
}
|
||||
finally {
|
||||
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
||||
command.Connection.Close();
|
||||
}
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
public virtual int acquirePaint(global::System.Nullable<int> BinID, global::System.Nullable<int> CartID, global::System.Nullable<int> MaxNum, string Device, string UserName) {
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
|
||||
if ((BinID.HasValue == true)) {
|
||||
command.Parameters[1].Value = ((int)(BinID.Value));
|
||||
}
|
||||
|
||||
@@ -2599,6 +2599,21 @@ FROM v_PackListDet</CommandText>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
<DbSource ConnectionRef="Sauder_NKCConnectionString (Settings)" DbObjectName="Sauder_NKC.dbo.stp_PL_acquireOtherItems" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="acquireOtherItems" Modifier="Public" Name="acquireOtherItems" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy2" UserSourceName="acquireOtherItems">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_PL_acquireOtherItems</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@OtherItemID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CartID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@MaxNum" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Device" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@UserName" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
<DbSource ConnectionRef="Sauder_NKCConnectionString (Settings)" DbObjectName="Sauder_NKC.dbo.stp_PL_acquirePaint" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="acquirePaint" Modifier="Public" Name="acquirePaint" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="acquirePaint">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="1247" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="445" ViewPortY="1247" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:BatchList" ZOrder="10" X="291" Y="375" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:StackList" ZOrder="9" X="584" Y="890" Height="381" Width="268" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
@@ -34,7 +34,7 @@
|
||||
<Shape ID="DesignTable:OtherItem" ZOrder="17" X="644" Y="1754" Height="210" Width="204" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
|
||||
<Shape ID="DesignTable:ItemSearchDetail" ZOrder="13" X="1476" Y="37" Height="305" Width="244" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:PackListDet" ZOrder="8" X="939" Y="1452" Height="324" Width="229" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:PackLog" ZOrder="7" X="1243" Y="1650" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:PackLog" ZOrder="7" X="1243" Y="1650" Height="324" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:PackCheck" ZOrder="6" X="644" Y="1492" Height="248" Width="206" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:OKIB" ZOrder="4" X="41" Y="1425" Height="324" Width="220" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:OKIB_Sum" ZOrder="3" X="50" Y="1823" Height="362" Width="237" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
|
||||
@@ -11,12 +11,9 @@
|
||||
</div>
|
||||
<div class="col-12 col-lg-4">
|
||||
<div class="row my-2">
|
||||
<div class="col-6">
|
||||
<asp:LinkButton runat="server" ID="lbtAddOne" Text="+1" CssClass="btn btn-warning btn-block" OnClick="lbtAddOne_Click" OnClientClick='return confirm("Confirm 1 part added on Cart?")'>+ 1</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="col-12">
|
||||
<asp:HiddenField runat="server" ID="hfNumAll" Value="0" />
|
||||
<asp:LinkButton runat="server" ID="lbtAddAll" Text="+All" CssClass="btn btn-success btn-block" OnClick="lbtAddAll_Click" OnClientClick='return confirm("Confirm ALL parts added on Cart?")'>+<%: hfNumAll.Value %>(ALL)</asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtAddAll" Text="+All" CssClass="btn btn-success btn-block" OnClick="lbtAddAll_Click" OnClientClick='return confirm("Confirm ALL PARTS added on Cart?")'>+<%: hfNumAll.Value %> (ALL)</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -73,7 +73,6 @@ namespace NKC_WF.WebUserControls
|
||||
cmp_KS_OkibCart.Visible = cartOk;
|
||||
}
|
||||
lbtAddAll.Visible = showBtns;
|
||||
lbtAddOne.Visible = showBtns;
|
||||
// se ho bin e cart --> mostro buttons calcolati!
|
||||
if (showBtns)
|
||||
{
|
||||
@@ -166,15 +165,9 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
}
|
||||
|
||||
protected void lbtAddOne_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataLayer.man.taPLog.acquirePaint(OtherItemID, CartID, 1, currIpAddress(), user_std.UtSn.userNameAD);
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
protected void lbtAddAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataLayer.man.taPLog.acquirePaint(OtherItemID, CartID, numMax, currIpAddress(), user_std.UtSn.userNameAD);
|
||||
DataLayer.man.taPLog.acquireOtherItems(OtherItemID, CartID, numMax, currIpAddress(), user_std.UtSn.userNameAD);
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,15 +23,6 @@ namespace NKC_WF.WebUserControls
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_KS_currOI cmp_KS_currOI;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtAddOne.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtAddOne;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfNumAll.
|
||||
/// </summary>
|
||||
|
||||
@@ -395,7 +395,7 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
}
|
||||
break;
|
||||
case codeType.ItemGeneric:
|
||||
case codeType.OtherItem:
|
||||
// recupero la tab OKOI x iniziare a controllare i dati...
|
||||
var tabOKOI = DataLayer.man.taOKOI.getByOtherItemDtmx(rawData);
|
||||
// PRIMO: verifico SE ho delle righe valide...
|
||||
|
||||
Reference in New Issue
Block a user