update x gestione dello scaricamento verso AS400

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@135 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
samuele
2010-07-19 09:32:14 +00:00
parent 1002b3af74
commit de353cedca
13 changed files with 609 additions and 559 deletions
BIN
View File
Binary file not shown.
@@ -263,11 +263,15 @@ namespace GMW.WebUserControls
/// <returns></returns>
public bool scambiaVisible(object statoPrelevata, object udc)
{
bool answ = false;
if (udcPrelevato(udc))
bool answ = false;
// 1° controllo: visibile SOLO se NON completata
if (intStatoLista < (int)statoLista.completata)
{
//answ = true;
answ = !Convert.ToBoolean(statoPrelevata);
if (udcPrelevato(udc))
{
//answ = true;
answ = !Convert.ToBoolean(statoPrelevata);
}
}
return answ;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+39 -6
View File
@@ -18497,7 +18497,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitCommandCollection() {
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT * FROM dbo.V_ElencoListePrelievo";
@@ -18542,12 +18542,18 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaTot", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, 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 = "dbo.stp_elencoListePrelievoUpdateStato";
this._commandCollection[5].CommandText = "dbo.stp_LP_exportToAs400";
this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[5].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[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NewCodSoggetto", global::System.Data.SqlDbType.NChar, 16, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodListaAttuale", global::System.Data.SqlDbType.VarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStatoLista", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[6].Connection = this.Connection;
this._commandCollection[6].CommandText = "dbo.stp_elencoListePrelievoUpdateStato";
this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[6].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[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NewCodSoggetto", global::System.Data.SqlDbType.NChar, 16, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodListaAttuale", global::System.Data.SqlDbType.VarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStatoLista", 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()]
@@ -18708,7 +18714,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_magazzino.ElencoListePrelievoDataTable updateStato(string NewCodSoggetto, string CodListaAttuale, global::System.Nullable<int> CodStatoLista) {
this.Adapter.SelectCommand = this.CommandCollection[5];
this.Adapter.SelectCommand = this.CommandCollection[6];
if ((NewCodSoggetto == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -18758,6 +18764,33 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
}
return returnValue;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_LP_exportToAs400(string CodLista) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5];
if ((CodLista == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
else {
command.Parameters[1].Value = ((string)(CodLista));
}
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;
}
}
/// <summary>
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -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="58" ViewPortY="588" 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="58" ViewPortY="668" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:ElencoCartellini" ZOrder="10" X="68" Y="333" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:AnagMag" ZOrder="26" X="1014" Y="372" Height="190" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="75" />
+4 -2
View File
@@ -494,7 +494,7 @@ namespace GMW_data
// se la lista esiste...
if (trovate > 0)
{
// se la lista è iniziata
// se la lista è completata
if (riga.CodStatoLista == (int)statoLista.completata)
{
// ricavo il codtipolista
@@ -515,7 +515,7 @@ namespace GMW_data
foreach (DS_magazzino.RigheListePrelievoRow row in tabellaRigheListaPrelievo.Rows)
{
// ricavo il codice UDC ... fai con foreach
// ricavo il codice UDC...
string UDC = row.UDC;
// mi serve per posizione udc corrente
DS_magazzino.PosizioneUdcCorrenteRow rigaUdcCorrente = taPosUdcCorr.getByUDC(UDC)[0];
@@ -528,6 +528,8 @@ namespace GMW_data
taElencoListePrelievo.updateStato(CodSoggetto, CodLista, (int)statoLista.scaricata);
// restituisce ok
answ = esitoOperazione.ok;
// ora eseguo stored x copiare in altra tabella (quella per AS...)
taElencoListePrelievo.stp_LP_exportToAs400(CodLista);
}
// se è già completata dà errore
else
Binary file not shown.
Binary file not shown.