MOdifica x gestione num èz da ODL
This commit is contained in:
@@ -45,8 +45,7 @@
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click"
|
||||
Visible="true" />
|
||||
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click" CausesValidation="false" Visible="true" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<%--<span style="padding-right: 2px;">
|
||||
|
||||
@@ -60,10 +60,11 @@ namespace MoonPro_site.WebUserControls
|
||||
SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false);
|
||||
// mostro edit quantità...
|
||||
divEditQta.Visible = true;
|
||||
btnNewOdl.Visible = true;
|
||||
mod_newOdl1.Visible = false;
|
||||
var riga = DataLayer.obj.taODL.getByIdx(idxOdlSel, false)[0];
|
||||
numPz = riga.NumPezzi;
|
||||
pzPallet = riga.PzPallet;
|
||||
//txtNewQta.Text = DataLayer.obj.taODL.getByIdx(idxOdlSel, false)[0].NumPezzi.ToString();
|
||||
}
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
@@ -191,6 +192,9 @@ namespace MoonPro_site.WebUserControls
|
||||
SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView));
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
divEditQta.Visible = false;
|
||||
mod_newOdl1.Visible = false;
|
||||
btnNewOdl.Visible = true;
|
||||
lblWarning.Visible = false;
|
||||
if (eh_resetSelezione != null)
|
||||
{
|
||||
@@ -278,7 +282,10 @@ namespace MoonPro_site.WebUserControls
|
||||
{
|
||||
// mostro controllo creazione ODL
|
||||
mod_newOdl1.Visible = true;
|
||||
divEditQta.Visible = false;
|
||||
btnNewOdl.Visible = false;
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// formatot url x stampa ODL
|
||||
@@ -339,7 +346,7 @@ namespace MoonPro_site.WebUserControls
|
||||
{
|
||||
if (idxOdlSel > 0)
|
||||
{
|
||||
DataLayer.obj.taODL.updateQta(numPz, idxOdlSel);
|
||||
DataLayer.obj.taODL.updateQta(numPz, pzPallet, idxOdlSel);
|
||||
}
|
||||
updateCtrl();
|
||||
}
|
||||
@@ -395,13 +402,15 @@ namespace MoonPro_site.WebUserControls
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
int answ = 1;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNewPzPallet.Text.Trim());
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo sia > 0...
|
||||
if (answ < 1) answ = 1;
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
|
||||
@@ -342,6 +342,7 @@ ORDER BY idxODL DESC</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="@NumPezzi" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@PzPallet" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Original_IdxODL" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
|
||||
Generated
+10
-3
@@ -13862,6 +13862,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile
|
||||
this._commandCollection[14].CommandType = global::System.Data.CommandType.StoredProcedure;
|
||||
this._commandCollection[14].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[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PzPallet", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[15] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[15].Connection = this.Connection;
|
||||
@@ -14330,7 +14331,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile
|
||||
[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 updateQta(global::System.Nullable<int> NumPezzi, global::System.Nullable<int> Original_IdxODL) {
|
||||
public virtual int updateQta(global::System.Nullable<int> NumPezzi, global::System.Nullable<int> PzPallet, global::System.Nullable<int> Original_IdxODL) {
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[14];
|
||||
if ((NumPezzi.HasValue == true)) {
|
||||
command.Parameters[1].Value = ((int)(NumPezzi.Value));
|
||||
@@ -14338,12 +14339,18 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile
|
||||
else {
|
||||
command.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
if ((Original_IdxODL.HasValue == true)) {
|
||||
command.Parameters[2].Value = ((int)(Original_IdxODL.Value));
|
||||
if ((PzPallet.HasValue == true)) {
|
||||
command.Parameters[2].Value = ((int)(PzPallet.Value));
|
||||
}
|
||||
else {
|
||||
command.Parameters[2].Value = global::System.DBNull.Value;
|
||||
}
|
||||
if ((Original_IdxODL.HasValue == true)) {
|
||||
command.Parameters[3].Value = ((int)(Original_IdxODL.Value));
|
||||
}
|
||||
else {
|
||||
command.Parameters[3].Value = global::System.DBNull.Value;
|
||||
}
|
||||
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
|
||||
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
|
||||
!= global::System.Data.ConnectionState.Open)) {
|
||||
|
||||
Reference in New Issue
Block a user