concluso metodi MagClass + stored

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@107 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
ermanno
2010-06-28 09:27:43 +00:00
parent 3942922fc2
commit 6df0be91e9
13 changed files with 703 additions and 527 deletions
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+95 -15
View File
@@ -10105,28 +10105,34 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitCommandCollection() {
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = @"SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura, DataFus, TurnoFus, CodImballo, CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad, CreateDate, ModDate FROM dbo.ElencoCartellini";
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_getUDC_Older";
this._commandCollection[1].CommandText = "dbo.stp_getDetailsUdcByUdc";
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("@ESPONENTE", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PARTICOLARE", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", 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_UDC_updateQty";
this._commandCollection[2].CommandText = "dbo.stp_getUDC_Older";
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("@UDC", global::System.Data.SqlDbType.VarChar, 20, 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("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 16, 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("@CodTipoDichiaraz", global::System.Data.SqlDbType.Char, 1, 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("@CodEvento", global::System.Data.SqlDbType.VarChar, 10, 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("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ESPONENTE", global::System.Data.SqlDbType.VarChar, 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("@PARTICOLARE", 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_UDC_updateQty";
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("@UDC", global::System.Data.SqlDbType.VarChar, 20, 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("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 16, 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("@CodTipoDichiaraz", global::System.Data.SqlDbType.Char, 1, 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("@CodEvento", global::System.Data.SqlDbType.VarChar, 10, 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("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -10154,8 +10160,24 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno
[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.ElencoCartelliniDataTable getOlderUDC(string ESPONENTE, string PARTICOLARE) {
public virtual DS_magazzino.ElencoCartelliniDataTable getDetailsUdcByUdc(string UDC) {
this.Adapter.SelectCommand = this.CommandCollection[1];
if ((UDC == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(UDC));
}
DS_magazzino.ElencoCartelliniDataTable dataTable = new DS_magazzino.ElencoCartelliniDataTable();
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.ElencoCartelliniDataTable getOlderUDC(string ESPONENTE, string PARTICOLARE) {
this.Adapter.SelectCommand = this.CommandCollection[2];
if ((ESPONENTE == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -10177,7 +10199,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_magazzino.ElencoCartelliniDataTable updateQty(string UDC, string CodSoggetto, string CodTipoDichiaraz, string CodEvento, global::System.Nullable<decimal> Qta) {
this.Adapter.SelectCommand = this.CommandCollection[2];
this.Adapter.SelectCommand = this.CommandCollection[3];
if ((UDC == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -17703,7 +17725,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[3];
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 CodLista, UDC, Qta, Proposto, Prelevato FROM dbo.RigheListePrelievo";
@@ -17716,11 +17738,25 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
this._commandCollection[1].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[2] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[2].Connection = this.Connection;
this._commandCollection[2].CommandText = "dbo.stp_setAnnullaUdcPrelevato";
this._commandCollection[2].CommandText = "dbo.stp_insertRigaListaNew";
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("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, 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("@UDC", 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_setAnnullaUdcPrelevato";
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("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, 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("@UDC", 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_setUdcPrelevato";
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("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, 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("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -17764,7 +17800,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
[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.RigheListePrelievoDataTable setAnnullaUdcPrelevato(string CodLista, string UDC) {
public virtual DS_magazzino.RigheListePrelievoDataTable insertRigaListaNew(string CodLista, string UDC) {
this.Adapter.SelectCommand = this.CommandCollection[2];
if ((CodLista == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
@@ -17783,6 +17819,50 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
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.RigheListePrelievoDataTable setAnnullaUdcPrelevato(string CodLista, string UDC) {
this.Adapter.SelectCommand = this.CommandCollection[3];
if ((CodLista == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodLista));
}
if ((UDC == null)) {
this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[2].Value = ((string)(UDC));
}
DS_magazzino.RigheListePrelievoDataTable dataTable = new DS_magazzino.RigheListePrelievoDataTable();
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.RigheListePrelievoDataTable setUdcPrelevato(string CodLista, string UDC) {
this.Adapter.SelectCommand = this.CommandCollection[4];
if ((CodLista == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodLista));
}
if ((UDC == null)) {
this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[2].Value = ((string)(UDC));
}
DS_magazzino.RigheListePrelievoDataTable dataTable = new DS_magazzino.RigheListePrelievoDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(DS_magazzino.RigheListePrelievoDataTable dataTable) {
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -4,9 +4,9 @@
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="307" 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="-10" ViewPortY="541" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:ElencoCartellini" ZOrder="24" X="68" Y="333" Height="449" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="368" />
<Shape ID="DesignTable:ElencoCartellini" ZOrder="24" X="68" Y="333" Height="466" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="368" />
<Shape ID="DesignTable:AnagMag" ZOrder="23" X="1014" Y="372" Height="210" Width="248" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
<Shape ID="DesignTable:PosizioneUdcCorrente" ZOrder="1" X="409" Y="544" Height="251" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:PosizioneUdcStorico" ZOrder="21" X="387" Y="322" Height="172" Width="263" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
@@ -20,7 +20,7 @@
<Shape ID="DesignTable:V_DettMagPart" ZOrder="8" X="993" Y="985" Height="362" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:ElencoListePrelievo" ZOrder="3" X="335" Y="820" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="228" />
<Shape ID="DesignTable:TipoListaPrelievo" ZOrder="2" X="697" Y="906" Height="156" Width="239" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="92" />
<Shape ID="DesignTable:RigheListePrelievo" ZOrder="6" X="59" Y="901" Height="190" Width="258" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" />
<Shape ID="DesignTable:RigheListePrelievo" ZOrder="6" X="59" Y="901" Height="224" Width="258" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" />
</Shapes>
<Connectors>
<Connector ID="DesignRelation:FK_PosizioneUdcCorrente_ElencoCartellini" ZOrder="22" LineWidth="11">
@@ -115,7 +115,7 @@
<RoutePoints>
<Point>
<X>109</X>
<Y>782</Y>
<Y>799</Y>
</Point>
<Point>
<X>109</X>
+76 -15
View File
@@ -346,6 +346,45 @@ namespace GMW_data
return answ;
}
/// <summary>
/// Verifica la corrispondenza dati tra RigheListePrelievo ed ElencoCartellini
/// </summary>
/// <param name="CodCS"></param>
/// <param name="CodLista"></param>
/// <param name="UDC"></param>
/// <returns></returns>
public bool verificaDatiUdc(string CodCS, string CodLista, string UDC)
{
bool answ = false;
DS_magazzino.ElencoListePrelievoDataTable tabellaElenco = taElencoListePrelievo.getByCodLista(CodLista);
DS_magazzino.ElencoListePrelievoRow rigaElenco = tabellaElenco[0];
DS_magazzino.ElencoCartelliniDataTable tabellaUDC = taElencoCartellini.getDetailsUdcByUdc(UDC);
DS_magazzino.ElencoCartelliniRow rigaUDC = tabellaUDC[0];
// ricavo dati da confrontare - da codlista ricavo particolare/esponente/figura
string particolareCodLista = rigaElenco.Particolare;
string esponenteCodLista = rigaElenco.Esponente;
// string figuraCodLista;
//stessi dati da UDC
string particolareUDC = rigaUDC.Particolare;
string esponenteUDC = rigaUDC.Esponente;
// string figuraUDC;
if (particolareCodLista == particolareUDC && esponenteCodLista == esponenteUDC)
{
answ = true;
}
else
{
answ = false;
}
return answ;
}
/// <summary>
/// Conferma che un dato UDC è stato prelevato per soddisfare la lista di prelievo ed aggiorna o aggiunge riga in RigheListePrelievo
/// </summary>
@@ -356,32 +395,54 @@ namespace GMW_data
public esitoOperazione confermaUdcPrelevatoPerLista(string CodCS, string CodLista, string UDC)
{
esitoOperazione answ = esitoOperazione.errore;
/* conferma solo gli udc prenotati (non da terminalino ma da terminale ...)
*
* due casi: usato da finestra web standard - confermo singola riga lista già creata e proposta e la confermo come prelevata (stored che fa update)
* altro caso: più da terminalino -> trovo un altro cassone non proposto con stesso cod particolare - il carrellista ha trovato un altro udc e lo associa alla lista di prelievo - CodLista - li spara entrambi e dà conferma che ha prelevato quello che potrebbe non essere tra le righe previste -> stored che se esiste riga fa update se no la crea come proposto = false e prelevato = true
/*
* Questa funzione va chiamata da web o da terminalino ogni volta che si fa una conferma di avvenuto prelievo, ovvero il carrellista ha DAVVERO prelevato un UDC associato ad una lista
*
* - in primis controllo: dal CodLista ottengo particolare/esponente/figura
* - controllo da UDC gli stessi dati
* - se i dati non corrispondono esco e mando falso (non è permesso scaricare x una lista di prelievo particolari "sbagliati" --> in questo caso vedere l'enum in fondo al codice ed usare esitoOperazione.errore_mismatch
*
* - se i dati corrispondono allora
* - cerco, se esiste riga x questo UDC metto solo check come prelevato
* - se non c'è riga x questo UDC la creo e metto prelevato = si, proposto = no (1/0)
*
* - se tutto ok passo esito ok
*
* */
return answ;
// ricavo dati da ta
DS_magazzino.RigheListePrelievoDataTable tabellaRighe = taRigheListePrelievo.getByCodLista(CodLista);
DS_magazzino.RigheListePrelievoRow rigaRighe = tabellaRighe[0];
// verifico che i dati corrispondano con il metodo relativo (vedi sopra)
bool datiUdcOk = verificaDatiUdc(CodCS, CodLista, UDC);
// se i dati esistono procedo - prima verifico le condizioni poi eseguo stored
if (tabellaRighe.Rows.Count > 0)
{
// se i dati non corrispondono dò errore mismatch
if (datiUdcOk)
{
// questo ok da computer vedere poi per terminalino
taRigheListePrelievo.setUdcPrelevato(CodLista, UDC);
answ = esitoOperazione.ok;
}
else
{
return answ = esitoOperazione.errore_mismatch;
}
}
else
{
// se non esiste riga la creo e setto come prelevato
taRigheListePrelievo.insertRigaListaNew(CodLista, UDC);
// restituisco ok
answ = esitoOperazione.ok;
}
return answ;
}
/// <summary>
/// annulla il prelievo di un UDC, aggiornando RigheListePrelievo (solo preventivato...)
/// </summary>
Binary file not shown.
Binary file not shown.