Completate fasi di spostamento da terminali

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@188 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
samuele
2010-08-04 08:44:07 +00:00
parent 4ffe8d4509
commit f3d0795ca8
23 changed files with 74 additions and 6368 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,12 +11,13 @@ namespace GMW_Term.WebUserControls
{
public partial class mod_execUdc : System.Web.UI.UserControl
{
#region variabili globali controllo
/// <summary>
/// codice company/sito in sessione
/// </summary>
protected string _CodCs
protected string _CodCS
{
get
{
@@ -26,7 +27,7 @@ namespace GMW_Term.WebUserControls
/// <summary>
/// UDC correntemente selezionato
/// </summary>
protected string UDC
protected string _UDC
{
get
{
@@ -66,9 +67,21 @@ namespace GMW_Term.WebUserControls
}
}
/// <summary>
/// tipologia di edit attivo
/// tipologia di edit attivo (in session...)
/// </summary>
protected tipoEditUdc editAttivo = tipoEditUdc.nd;
protected tipoEditUdc editAttivo
{
get
{
return (tipoEditUdc)memLayer.ML.objSessionObj("EditAttivo");
}
set
{
memLayer.ML.setSessionVal("EditAttivo", value, false);
}
}
#endregion
@@ -98,12 +111,12 @@ namespace GMW_Term.WebUserControls
bool posizAssegn = false;
try
{
DS_magazzino.v_UdcDetailRow rigaUdc = MagClass.magazzino.taDettUDC.getByFullUdc(UDC, _CodCs)[0];
DS_magazzino.v_UdcDetailRow rigaUdc = MagClass.magazzino.taDettUDC.getByFullUdc(_UDC, _CodCS)[0];
posizAssegn = (rigaUdc.CodCella != "");
}
catch
{ }
// in base a che sia in una posizioen amgazzino o meno scelgo che buttons abilitare
// in base a che sia in una posizione magazzino o meno scelgo che buttons abilitare
if (posizAssegn)
{
btnDeposita.Enabled = false;
@@ -162,17 +175,20 @@ namespace GMW_Term.WebUserControls
private void depositaUdc(bool setCellaPiena)
{
// cerco id della cella...
int idxCella = MagClass.magazzino.IdxCellaByCodCella(memLayer.ML.StringSessionObj("CodCS"), valoreScanUdc);
int idxCella = MagClass.magazzino.IdxCellaByCodCella(_CodCS, valoreScanUdc);
// salva le info facendo caricamento
MagClass.magazzino.caricaUDC(memLayer.ML.StringSessionObj("CodCS"), UDC, idxCella);
MagClass.magazzino.caricaUDC(_CodCS, _UDC, idxCella);
if (setCellaPiena)
{
MagClass.magazzino.taCelle.stp_celle_updPiena(idxCella, true);
}
// svuoto dati temporanei
valoreScanUdc = "";
txtScansione = "";
editAttivo = tipoEditUdc.nd;
// sistema visibilità
pnlButtons.Visible = true;
pnlInput.Visible = false;
btnConferma.Visible = false;
// aggiorna dati
frmView.DataBind();
// sistemo buttons
@@ -185,20 +201,23 @@ namespace GMW_Term.WebUserControls
private void spostaUdc(bool setCellaPiena)
{
// cerco id delle celle...
int idxCellaFrom = MagClass.magazzino.IdxCellaByCodCella(memLayer.ML.StringSessionObj("CodCS"), UDC);
int idxCellaTo = MagClass.magazzino.IdxCellaByCodCella(memLayer.ML.StringSessionObj("CodCS"), valoreScanUdc);
int idxCellaFrom = MagClass.magazzino.taDettUDC.getByFullUdc(_UDC, _CodCS)[0].IdxCella;
int idxCellaTo = MagClass.magazzino.IdxCellaByCodCella(_CodCS, valoreScanUdc);
// salva le info facendo caricamento
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), UDC, idxCellaFrom, idxCellaTo);
// la cella di aprtenza la indico come disponibile (comunque ho tolto un UDC...)
MagClass.magazzino.spostaUDC(_CodCS, _UDC, idxCellaFrom, idxCellaTo);
// la cella di partenza la indico come disponibile (comunque ho tolto un UDC...)
MagClass.magazzino.taCelle.stp_celle_updPiena(idxCellaFrom, false);
if (setCellaPiena)
{
MagClass.magazzino.taCelle.stp_celle_updPiena(idxCellaTo, true);
}
// svuoto dati temporanei
valoreScanUdc = "";
txtScansione = "";
editAttivo = tipoEditUdc.nd;
// sistema visibilità
pnlButtons.Visible = true;
pnlInput.Visible = false;
btnConferma.Visible = false;
// aggiorna dati
frmView.DataBind();
// sistemo buttons
@@ -255,7 +274,6 @@ namespace GMW_Term.WebUserControls
// controllo se la cella sia "papabile" per indicazione "piena"
bool alertCapa = false;
bool cellaPiena = false;
string _CodCS = memLayer.ML.StringSessionObj("CodCS");
try
{
DS_magazzino.V_statoCelleCapienzaAssegnatiRow rigaStato = MagClass.magazzino.taStatoCelle.getByCodCella(valoreScanUdc)[0];
@@ -330,7 +348,7 @@ namespace GMW_Term.WebUserControls
protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
// intercetto l'evento e chiamo una stored ad hoc!
MagClass.magazzino.taElencoCartellini.updateQty(UDC, MagClass.magazzino.CodSoggCurrUser, "U", "UDC_QTY", Convert.ToDecimal(e.InputParameters["Qta"]));
MagClass.magazzino.taElencoCartellini.updateQty(_UDC, MagClass.magazzino.CodSoggCurrUser, "U", "UDC_QTY", Convert.ToDecimal(e.InputParameters["Qta"]));
// annullo update!
e.Cancel = true;
}
@@ -349,7 +367,7 @@ namespace GMW_Term.WebUserControls
// svuoto da session l'UDC corrente... e pure il barcode corrente...
memLayer.ML.emptySessionVal("scannedValue");
//memLayer.ML.emptySessionVal("UDC_sel");
UDC = "";
_UDC = "";
memLayer.ML.emptySessionVal("activeTask");
Response.Redirect("Home.aspx");
}
@@ -372,10 +390,32 @@ namespace GMW_Term.WebUserControls
protected void btnDeposita_Click(object sender, EventArgs e)
{
// nasconde/mostra panels
pnlButtons.Visible = false;
pnlInput.Visible = true;
resetinputPanel();
editAttivo = tipoEditUdc.deposito;
}
/// <summary>
/// resetta panel input
/// </summary>
private void resetinputPanel()
{
pnlButtons.Visible = false;
pnlInput.Visible = true;
lblData.Text = "";
btnConferma.Enabled = false;
btnCellaPiena.Enabled = false;
}
/// <summary>
/// richiesta di spostamento di un UDC: mostro input x nuova posizione!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSposta_Click(object sender, EventArgs e)
{
// nasconde/mostra panels
resetinputPanel();
editAttivo = tipoEditUdc.spostamento;
}
/// <summary>
/// richiesto caricamento UDC
/// </summary>
@@ -424,26 +464,12 @@ namespace GMW_Term.WebUserControls
break;
}
}
/// <summary>
/// richiesta di spostamento di un UDC: mostro input x nuova posizione!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSposta_Click(object sender, EventArgs e)
{
// nasconde/mostra panels
pnlButtons.Visible = false;
pnlInput.Visible = true;
editAttivo = tipoEditUdc.spostamento;
}
#endregion
#endregion
}
}
/// <summary>
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
+3 -10
View File
@@ -14000,7 +14000,6 @@ SELECT UDC, IdxCella, CodCS, DataRif FROM PosizioneUdcCorrente WHERE (IdxCella =
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("@CodCS", global::System.Data.SqlDbType.VarChar, 2, 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("@UDC", global::System.Data.SqlDbType.VarChar, 50, 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("@IdxCellaFrom", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxCellaTo", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
@@ -14315,7 +14314,7 @@ SELECT UDC, IdxCella, CodCS, DataRif FROM PosizioneUdcCorrente WHERE (IdxCella =
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_spostaUdc(string CodCS, string UDC, global::System.Nullable<int> IdxCellaFrom, global::System.Nullable<int> IdxCellaTo) {
public virtual int stp_spostaUdc(string CodCS, string UDC, global::System.Nullable<int> IdxCellaTo) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6];
if ((CodCS == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
@@ -14329,18 +14328,12 @@ SELECT UDC, IdxCella, CodCS, DataRif FROM PosizioneUdcCorrente WHERE (IdxCella =
else {
command.Parameters[2].Value = ((string)(UDC));
}
if ((IdxCellaFrom.HasValue == true)) {
command.Parameters[3].Value = ((int)(IdxCellaFrom.Value));
if ((IdxCellaTo.HasValue == true)) {
command.Parameters[3].Value = ((int)(IdxCellaTo.Value));
}
else {
command.Parameters[3].Value = global::System.DBNull.Value;
}
if ((IdxCellaTo.HasValue == true)) {
command.Parameters[4].Value = ((int)(IdxCellaTo.Value));
}
else {
command.Parameters[4].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)) {
-1
View File
@@ -515,7 +515,6 @@ SELECT UDC, IdxCella, CodCS, DataRif FROM PosizioneUdcCorrente WHERE (IdxCella =
<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="@CodCS" Precision="0" ProviderType="VarChar" Scale="0" Size="2" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="varchar" DbType="AnsiString" Direction="Input" ParameterName="@UDC" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@IdxCellaFrom" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@IdxCellaTo" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
+9 -9
View File
@@ -4,27 +4,27 @@
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="692" 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="-47" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:ElencoCartellini" ZOrder="16" X="68" Y="333" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:AnagMag" ZOrder="29" X="1014" Y="372" Height="190" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="75" />
<Shape ID="DesignTable:PosizioneUdcCorrente" ZOrder="8" X="409" Y="544" Height="265" Width="252" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:PosizioneUdcCorrente" ZOrder="1" X="409" Y="544" Height="265" Width="252" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:PosizioneUdcStorico" ZOrder="27" X="412" Y="310" Height="168" Width="257" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:Blocchi" ZOrder="22" X="1014" Y="652" Height="325" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="181" />
<Shape ID="DesignTable:Celle" ZOrder="6" X="712" Y="420" Height="438" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
<Shape ID="DesignTable:Celle" ZOrder="7" X="712" Y="420" Height="438" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
<Shape ID="DesignTable:TipoCella" ZOrder="9" X="1008" Y="-2" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
<Shape ID="DesignTable:v_UdcDetail" ZOrder="7" X="693" Y="9" Height="381" Width="212" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:v_UdcDetail" ZOrder="8" X="693" Y="9" Height="381" Width="212" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:AnagImballi" ZOrder="21" X="93" Y="43" Height="156" Width="211" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="75" />
<Shape ID="DesignTable:V_ParticolariOverview" ZOrder="20" X="95" Y="1131" Height="265" Width="272" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="138" />
<Shape ID="DesignTable:V_MagazziniOverview" ZOrder="11" X="733" Y="1102" Height="286" Width="232" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
<Shape ID="DesignTable:V_DettMagPart" ZOrder="19" X="993" Y="985" Height="326" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="228" />
<Shape ID="DesignTable:TipoListaPrelievo" ZOrder="3" X="735" Y="891" Height="172" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:TipoListaPrelievo" ZOrder="4" X="735" Y="891" Height="172" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:RigheListePrelievo" ZOrder="18" X="83" Y="846" Height="257" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="130" />
<Shape ID="DesignTable:ElencoListePrelievo" ZOrder="2" X="393" Y="879" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:ElencoListePrelievo" ZOrder="3" X="393" Y="879" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:v_righeListePrelievoPosizione" ZOrder="13" X="406" Y="1283" Height="324" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
<Shape ID="DesignTable:v_particolariEsponenteFigura" ZOrder="12" X="829" Y="1437" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:AnagPosizioni" ZOrder="5" X="375" Y="103" Height="115" Width="227" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:V_statoCelleCapienzaAssegnati" ZOrder="1" X="111" Y="1437" Height="229" Width="225" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:AnagPosizioni" ZOrder="6" X="375" Y="103" Height="115" Width="227" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:V_statoCelleCapienzaAssegnati" ZOrder="2" X="111" Y="1437" Height="229" Width="225" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
</Shapes>
<Connectors>
<Connector ID="DesignRelation:FK_PosizioneUdcCorrente_ElencoCartellini" ZOrder="28" LineWidth="11">
@@ -135,7 +135,7 @@
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_ElencoCartellini_AnagPosizioni" ZOrder="4" LineWidth="11">
<Connector ID="DesignRelation:FK_ElencoCartellini_AnagPosizioni" ZOrder="5" LineWidth="11">
<RoutePoints>
<Point>
<X>392</X>
+2 -2
View File
@@ -178,7 +178,7 @@ namespace GMW_data
bool answ = false;
try
{
taPosUdcCorr.stp_spostaUdc(CodCS, UDC, 0, IdxCellaTo);
taPosUdcCorr.stp_spostaUdc(CodCS, UDC, IdxCellaTo);
// cerco nuova posizione...
if (taPosUdcCorr.getByCellaUdc(UDC, IdxCellaTo).Rows.Count > 0)
{
@@ -202,7 +202,7 @@ namespace GMW_data
bool answ = false;
try
{
taPosUdcCorr.stp_spostaUdc(CodCS, UDC, IdxCellaFrom, IdxCellaTo);
taPosUdcCorr.stp_spostaUdc(CodCS, UDC, IdxCellaTo);
// cerco nuova posizione...
if (taPosUdcCorr.getByCellaUdc(UDC, IdxCellaTo).Rows.Count > 0)
{
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.