Aggiornata gestione recycle x UDC già utilizzati

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@120 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
samuele
2010-07-06 16:41:18 +00:00
parent a82f5eb355
commit 38d54a4098
14 changed files with 189 additions and 100 deletions
-16
View File
@@ -141,13 +141,6 @@
<Compile Include="StatoMag.aspx.designer.cs">
<DependentUpon>StatoMag.aspx</DependentUpon>
</Compile>
<Compile Include="Test.aspx.cs">
<DependentUpon>Test.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Test.aspx.designer.cs">
<DependentUpon>Test.aspx</DependentUpon>
</Compile>
<Compile Include="unauthorized.aspx.cs">
<DependentUpon>unauthorized.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -372,13 +365,6 @@
<Compile Include="WebUserControls\mod_filtro.ascx.designer.cs">
<DependentUpon>mod_filtro.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_funzioniVarieTest.ascx.cs">
<DependentUpon>mod_funzioniVarieTest.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_funzioniVarieTest.ascx.designer.cs">
<DependentUpon>mod_funzioniVarieTest.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_lemmiVocab.ascx.cs">
<DependentUpon>mod_lemmiVocab.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -749,7 +735,6 @@
<Content Include="SearchMag.aspx" />
<Content Include="StatoMag.aspx" />
<Content Include="Style.css" />
<Content Include="Test.aspx" />
<Content Include="vocabolario.aspx" />
<Content Include="WebMasterPages\Ajax.master" />
<Content Include="WebMasterPages\AjaxSearch.master" />
@@ -836,7 +821,6 @@
<Content Include="WebMasterPages\TermPageAjax.Master" />
<Content Include="WebMasterPages\TermPage.Master" />
<Content Include="WebUserControls\mod_elencoListePrelievo.ascx" />
<Content Include="WebUserControls\mod_funzioniVarieTest.ascx" />
<Content Include="WebUserControls\mod_operazioniUdc.ascx" />
<Content Include="WebUserControls\mod_periodoAnalisi.ascx" />
<Content Include="WebUserControls\mod_unauthorized.ascx" />
@@ -566,15 +566,13 @@ namespace GMW.WebUserControls
parametroLista.PropertyName = "valore";
parametroLista.Name = "CodStato";
parametroLista.DefaultValue = "0";
ods.FilterParameters.Add(parametroLista);
ods.FilterParameters.Add(parametroLista);
}
#if false
// chiamo procedura che aggiorna ods principale
ods.DataBind();
grView.SelectedIndex = -1;
updateOds();
// ridisegno controllo child!
aggiornaElencoRighe();
#endif
}
/// <summary>
/// restituisce URL immagine del codice da mostrare
@@ -326,7 +326,7 @@ namespace GMW.WebUserControls
// controllo SE sia ancora prelevabile questo UDC...
if (!udcPrelevato(UDC))
{
GMW_data.MagClass.magazzino.confermaUdcPrelevatoPerLista(memLayer.ML.StringSessionObj("CodCS"), codLista, UDC);
GMW_data.MagClass.magazzino.confermaUdcPrelevatoPerLista(codLista, UDC);
}
updateOdsDaFiltro();
grView.EditIndex = -1;
@@ -340,7 +340,7 @@ namespace GMW.WebUserControls
e.Cancel = true;
break;
case "annullaPrelievo":
GMW_data.MagClass.magazzino.annullaUdcPrelevatoPerLista(memLayer.ML.StringSessionObj("CodCS"), codLista, UDC);
GMW_data.MagClass.magazzino.annullaUdcPrelevatoPerLista(codLista, UDC);
updateOdsDaFiltro();
grView.EditIndex = -1;
grView.DataBind();
@@ -353,7 +353,7 @@ namespace GMW.WebUserControls
e.Cancel = true;
break;
case "scambiaFifo":
//GMW_data.MagClass.magazzino.annullaUdcPrelevatoPerLista(memLayer.ML.StringSessionObj("CodCS"), codLista, UDC);
GMW_data.MagClass.magazzino.scambiaUdcPerLista(codLista);
updateOdsDaFiltro();
grView.EditIndex = -1;
grView.DataBind();
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+68 -13
View File
@@ -10120,7 +10120,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
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 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";
@@ -10141,14 +10141,20 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosizione", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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].CommandText = "dbo.stp_getUDC_UnusedOlder";
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, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.VarChar, 12, 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_UDC_updateQty";
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("@UDC", global::System.Data.SqlDbType.VarChar, 20, 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("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 16, 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("@CodTipoDichiaraz", global::System.Data.SqlDbType.Char, 1, 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("@CodEvento", global::System.Data.SqlDbType.VarChar, 10, 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("@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()]
@@ -10220,8 +10226,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 updateQty(string UDC, string CodSoggetto, string CodTipoDichiaraz, string CodEvento, global::System.Nullable<decimal> Qta) {
public virtual DS_magazzino.ElencoCartelliniDataTable getUdcUnusedOlder(string CodLista) {
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));
}
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 updateQty(string UDC, string CodSoggetto, string CodTipoDichiaraz, string CodEvento, global::System.Nullable<decimal> Qta) {
this.Adapter.SelectCommand = this.CommandCollection[4];
if ((UDC == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -16835,7 +16857,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[5];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6];
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";
@@ -16861,11 +16883,17 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
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_UDC_upsertPrelevato";
this._commandCollection[4].CommandText = "dbo.stp_RigheListePrelievo_eliminaNonPrelevate";
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, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.VarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, 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_UDC_upsertPrelevato";
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("@CodLista", global::System.Data.SqlDbType.NVarChar, 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("@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()]
@@ -16948,7 +16976,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.RigheListePrelievoDataTable upsertPrelevato(string CodLista, string UDC) {
this.Adapter.SelectCommand = this.CommandCollection[4];
this.Adapter.SelectCommand = this.CommandCollection[5];
if ((CodLista == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -17165,6 +17193,33 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
public virtual int Update(decimal Qta, global::System.Nullable<bool> Proposto, global::System.Nullable<bool> Prelevato, string Original_CodLista, string Original_UDC, decimal Original_Qta, global::System.Nullable<bool> Original_Proposto, global::System.Nullable<bool> Original_Prelevato) {
return this.Update(Original_CodLista, Original_UDC, Qta, Proposto, Prelevato, Original_CodLista, Original_UDC, Original_Qta, Original_Proposto, Original_Prelevato);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_RigheListePrelievo_eliminaNonPrelevate(string CodLista) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4];
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>
+22
View File
@@ -241,6 +241,17 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_getUDC_UnusedOlder" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getUdcUnusedOlder" GetMethodModifier="Public" GetMethodName="getUdcUnusedOlder" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getUdcUnusedOlder" UserSourceName="getUdcUnusedOlder">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_getUDC_UnusedOlder</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="varchar" DbType="AnsiString" Direction="Input" ParameterName="@CodLista" Precision="0" ProviderType="VarChar" Scale="0" Size="12" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_UDC_updateQty" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="updateQty" GetMethodModifier="Public" GetMethodName="updateQty" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="updateQty" UserSourceName="updateQty">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
@@ -1532,6 +1543,17 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_RigheListePrelievo_eliminaNonPrelevate" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="stp_RigheListePrelievo_eliminaNonPrelevate" Modifier="Public" Name="stp_RigheListePrelievo_eliminaNonPrelevate" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="stp_RigheListePrelievo_eliminaNonPrelevate">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_RigheListePrelievo_eliminaNonPrelevate</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="varchar" DbType="AnsiString" Direction="Input" ParameterName="@CodLista" Precision="0" ProviderType="VarChar" Scale="0" Size="12" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_UDC_upsertPrelevato" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="upsertPrelevato" GetMethodModifier="Public" GetMethodName="upsertPrelevato" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="upsertPrelevato" UserSourceName="upsertPrelevato">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
+4 -4
View File
@@ -6,7 +6,7 @@
</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="411" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:ElencoCartellini" ZOrder="5" X="68" Y="333" Height="326" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="228" />
<Shape ID="DesignTable:ElencoCartellini" ZOrder="5" X="68" Y="333" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:AnagMag" ZOrder="24" X="1014" Y="372" Height="190" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="75" />
<Shape ID="DesignTable:PosizioneUdcCorrente" ZOrder="6" X="409" Y="544" Height="207" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="92" />
<Shape ID="DesignTable:PosizioneUdcStorico" ZOrder="22" X="387" Y="322" Height="156" Width="257" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" />
@@ -19,7 +19,7 @@
<Shape ID="DesignTable:V_MagazziniOverview" ZOrder="2" X="704" Y="1109" Height="276" Width="232" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
<Shape ID="DesignTable:V_DettMagPart" ZOrder="10" X="993" Y="985" Height="326" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="228" />
<Shape ID="DesignTable:TipoListaPrelievo" ZOrder="7" X="697" Y="906" Height="156" Width="239" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="92" />
<Shape ID="DesignTable:RigheListePrelievo" ZOrder="9" X="83" Y="846" Height="257" Width="280" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="130" />
<Shape ID="DesignTable:RigheListePrelievo" ZOrder="9" X="83" Y="846" Height="257" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="130" />
<Shape ID="DesignTable:ElencoListePrelievo" ZOrder="1" X="393" Y="900" Height="343" Width="218" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
</Shapes>
<Connectors>
@@ -103,7 +103,7 @@
<RoutePoints>
<Point>
<X>133</X>
<Y>659</Y>
<Y>714</Y>
</Point>
<Point>
<X>133</X>
@@ -118,7 +118,7 @@
<Y>949</Y>
</Point>
<Point>
<X>363</X>
<X>325</X>
<Y>949</Y>
</Point>
</RoutePoints>
+90 -60
View File
@@ -94,6 +94,66 @@ namespace GMW_data
#endregion
#region metodi protected
/// <summary>
/// aggiunge le righe liste di prelievo necessarie a soddisfare la richiesta in logica FIFO dato un elenco di cartellini, la qta totale da allocare e la lista attuale
/// </summary>
/// <param name="QtaTot"></param>
/// <param name="codListaAttuale"></param>
/// <param name="tabellaElencoCartellini"></param>
private void allocaRigheListaPrelievo(decimal QtaTot, string codListaAttuale, DS_magazzino.ElencoCartelliniDataTable tabellaElencoCartellini)
{
//ricavo il valore UDC della riga del più vecchio
string udcAttuale;
bool qtaOk = false;
bool dataFinished = false;
int progrUdc = 0;
int numUdcDisponibili = tabellaElencoCartellini.Rows.Count;
// contiene la quantità della riga attuale
decimal qtaRiga;
// somma progressiva della qta allocata - calcolo da db!
decimal qtaAllocata = taElencoListePrelievo.getByCodLista(codListaAttuale)[0].Prelevato;
//ciclo WHILE per lo riempimento FIFO con UDC secondo richiesta a partire da elenco fornito
while (!qtaOk && !dataFinished)
{
/*
* crea una riga in righelistaprelievo passando come valori
* il codlista attuale ricavato da sopr
* l'UDC dal primo della tabella getOlderUDC
*
*
* recupero quantità dalla riga corrente;
*
* imposto proposto a 1;
* imposto prelevato 0;
* taRighelistePreliveo.Insert;
*
* qtaAllocata = qtaAllocata + Qta di questa riga (riuso il valore della colonna QTA
* tabella[contatore]; contatore++;
* qtaOk = (qtaAllocata >= qtaRichiesta)
* dataFinished = (contatore >= numRighe);
*
* */
// ricavo la riga più vecchia
qtaRiga = tabellaElencoCartellini[progrUdc].Qta;
udcAttuale = tabellaElencoCartellini[progrUdc].UDC;
// eseguo query di insert
taRigheListePrelievo.Insert(codListaAttuale, udcAttuale, qtaRiga, true, false);
//incremento qta allocata
qtaAllocata = (qtaAllocata + qtaRiga);
//incremento contatore
progrUdc++;
// verifico le condizioni, false se non cambia nulla true se cambia e si esce dal while
qtaOk = (qtaAllocata >= QtaTot);
dataFinished = (progrUdc >= numUdcDisponibili);
}
}
#endregion
#region Metodi esposti
/// <summary>
@@ -243,64 +303,13 @@ namespace GMW_data
if (codListaAttuale != "")
{
answ = codListaAttuale;
// stored per ricavare il più vecchio in ordine ASC per Data Fusione - TABELLA
DS_magazzino.ElencoCartelliniDataTable tabellaElencoCartellini = taElencoCartellini.getOlderUDC(Esponente, Particolare, idxPosizione);
//ricavo il valore UDC della riga del più vecchio
string udcAttuale;
bool qtaOk = false;
bool dataFinished = false;
int progrUdc = 0;
int numUdcDisponibili = tabellaElencoCartellini.Rows.Count;
// contiene la quantità della riga attuale
decimal qtaRiga;
// somma progressiva della qta allocata
decimal qtaAllocata = 0;
while (!qtaOk && !dataFinished)
{
/*
* crea una riga in righelistaprelievo passando come valori
* il codlista attuale ricavato da sopr
* l'UDC dal primo della tabella getOlderUDC
*
*
* recupero quantità dalla riga corrente;
*
* imposto proposto a 1;
* imposto prelevato 0;
* taRighelistePreliveo.Insert;
*
* qtaAllocata = qtaAllocata + Qta di questa riga (riuso il valore della colonna QTA
* tabella[contatore]; contatore++;
* qtaOk = (qtaAllocata >= qtaRichiesta)
* dataFinished = (contatore >= numRighe);
*
* */
// ricavo la riga più vecchia
qtaRiga = tabellaElencoCartellini[progrUdc].Qta;
udcAttuale = tabellaElencoCartellini[progrUdc].UDC;
// eseguo query di insert
taRigheListePrelievo.Insert(codListaAttuale, udcAttuale, qtaRiga, true, false);
//incremento qta allocata
qtaAllocata = (qtaAllocata + qtaRiga);
//incremento contatore
progrUdc++;
// verifico le condizioni, false se non cambia nulla true se cambia e si esce dal while
qtaOk = (qtaAllocata >= QtaTot);
dataFinished = (progrUdc >= numUdcDisponibili);
}
allocaRigheListaPrelievo(QtaTot, codListaAttuale, tabellaElencoCartellini);
}
return answ;
}
/// <summary>
/// indica presa in carico di una lista di prelievo
/// </summary>
@@ -479,11 +488,10 @@ namespace GMW_data
/// <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)
public bool verificaDatiUdc(string CodLista, string UDC)
{
bool answ = false;
@@ -521,20 +529,18 @@ namespace GMW_data
return answ;
}
/// <summary>
/// Conferma che un dato UDC è stato prelevato per soddisfare la lista di prelievo ed aggiorna o aggiunge riga in RigheListePrelievo
/// </summary>
/// <param name="CodCS">Codice company/sito</param>
/// <param name="CodLista">codice della lista di prelievo</param>
/// <param name="UDC">Codice UDC</param>
/// <returns>esito comando</returns>
public esitoOperazione confermaUdcPrelevatoPerLista(string CodCS, string CodLista, string UDC)
public esitoOperazione confermaUdcPrelevatoPerLista(string CodLista, string UDC)
{
esitoOperazione answ = esitoOperazione.errore;
// verifico che i dati corrispondano con il metodo relativo (vedi sopra)
bool datiUdcOk = verificaDatiUdc(CodCS, CodLista, UDC);
bool datiUdcOk = verificaDatiUdc(CodLista, UDC);
if (datiUdcOk)
{
@@ -554,11 +560,10 @@ namespace GMW_data
/// <summary>
/// annulla il prelievo di un UDC, aggiornando RigheListePrelievo (solo preventivato...)
/// </summary>
/// <param name="CodCS">Codice company/sito</param>
/// <param name="CodLista">codice della lista di prelievo</param>
/// <param name="UDC">Codice UDC</param>
/// <returns>esito comando</returns>
public esitoOperazione annullaUdcPrelevatoPerLista(string CodCS, string CodLista, string UDC)
public esitoOperazione annullaUdcPrelevatoPerLista(string CodLista, string UDC)
{
esitoOperazione answ = esitoOperazione.errore;
@@ -595,7 +600,32 @@ namespace GMW_data
{ }
return answ;
}
/// <summary>
/// Rigenera una Lista di prelievo togliendo gli UDC non ancora prelevati rimettendo in logica FIFO gli UDC "liberi" disponibili
/// </summary>
/// <param name="CodLista">codice della lista di prelievo</param>
/// <returns>esito comando</returns>
public esitoOperazione scambiaUdcPerLista(string CodLista)
{
esitoOperazione answ = esitoOperazione.errore;
/*
* Questa funzione va chiamata da web o da terminalino ogni volta che si fa una richiesta di cambio per un UDC già prelevato, ovvero un altro carrellista prelevato un UDC associato alla mia lista corrente - rigenera UDC da prelevare
* */
try
{
// ricavo dati
DS_magazzino.ElencoListePrelievoRow riga = taElencoListePrelievo.getByCodLista(CodLista)[0];
// svuoto PRIMA gli UDC non prelevati
taRigheListePrelievo.stp_RigheListePrelievo_eliminaNonPrelevate(CodLista);
// rigenero righe UDC da prelevare
DS_magazzino.ElencoCartelliniDataTable tabellaElencoCartellini = taElencoCartellini.getUdcUnusedOlder(CodLista);
allocaRigheListaPrelievo(riga.QtaTot, CodLista, tabellaElencoCartellini);
}
catch
{ }
return answ;
}
#endregion
}
Binary file not shown.
Binary file not shown.