diff --git a/GMW/GMW_Term/WebUserControls/mod_barcode.ascx.cs b/GMW/GMW_Term/WebUserControls/mod_barcode.ascx.cs index b5c5c5d7..d1a8df26 100644 --- a/GMW/GMW_Term/WebUserControls/mod_barcode.ascx.cs +++ b/GMW/GMW_Term/WebUserControls/mod_barcode.ascx.cs @@ -40,6 +40,7 @@ namespace GMW_Term.WebUserControls verificaOperatoreInSessione(); if (_validUserInSession) { + btnLoginPage.Text = "[7]-LogOut"; btnLoginPage.Visible = true; btnButtonsHome.Visible = true; lblData.Text = "Inserire Dati..."; diff --git a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx index bcb77cf2..3eae947b 100644 --- a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx +++ b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx @@ -1,8 +1,9 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_execUdc.ascx.cs" Inherits="GMW_Term.WebUserControls.mod_execUdc" %>
- - + + <%-- UDC:
@@ -67,6 +68,59 @@ Text="Update" />   +
--%> + + UDC: + +
+ Particolare: + +
+ + DisegnoGrezzo: + +
+ Esponente: + +
+ Qta: + + + + + + +
+ CodMag: + + + CodBlocco: + +
+ CodCella: + + + + + + + +
+ X: + + + Y: + + + Z: + +
+
+ +   +
UDC: @@ -83,9 +137,6 @@ Qta: -
- DescStato: -
@@ -182,7 +233,13 @@ + SelectMethod="getByFullUdc" + TypeName="GMW_data.DS_magazzinoTableAdapters.v_UdcDetailTableAdapter" + onupdating="ods_Updating" UpdateMethod="getByFullUdc"> + + + + @@ -200,7 +257,7 @@
- + diff --git a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.cs b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.cs index 0aa69a60..f63680ef 100644 --- a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.cs +++ b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx.cs @@ -11,6 +11,8 @@ namespace GMW_Term.WebUserControls { public partial class mod_execUdc : System.Web.UI.UserControl { + #region variabili globali controllo + /// /// codice company/sito in sessione /// @@ -35,6 +37,38 @@ namespace GMW_Term.WebUserControls memLayer.ML.setSessionVal("UDC_sel", value); } } + /// + /// testo contenuto nella textbox + /// + public string txtScansione + { + get + { + return txtInput.Text.Trim(); + } + set + { + txtInput.Text = value; + } + } + /// + /// valore della scansione barcode + /// + public string valoreScanUdc + { + get + { + return memLayer.ML.StringSessionObj("scannedValueUdc"); + } + set + { + memLayer.ML.setSessionVal("scannedValueUdc", value, false); + } + } + +#endregion + + #region setup modulo /// /// caricamento pagina @@ -98,9 +132,9 @@ namespace GMW_Term.WebUserControls btnChiudi.Text = "[0] - Home"; btnChiudi.AccessKey = "0"; // buttons secondari - btnConferma.Text = "[5] - Conferma"; + btnConferma.Text = "[5] - OK"; btnConferma.AccessKey = "5"; - btnCellaPiena.Text = "[6] - Conf.+Cella Piena"; + btnCellaPiena.Text = "[6] - OK+Piena"; btnCellaPiena.AccessKey = "6"; } /// @@ -112,17 +146,39 @@ namespace GMW_Term.WebUserControls { return user_std.UtSn.Traduci(lemma); } + + #endregion + + #region metodi operativi interni + /// - /// click button deposito + /// effettua salvataggio, mostra cella updated, eventuale set piena della cella /// - /// - /// - protected void btnDeposita_Click(object sender, EventArgs e) + /// + private void depositaUdc(bool setCellaPiena) { - // nasconde/mostra panels - pnlButtons.Visible = false; - pnlInput.Visible = true; + // cerco id della cella... + int idxCella = MagClass.magazzino.IdxCellaByCodCella(memLayer.ML.StringSessionObj("CodCS"), valoreScanUdc); + // salva le info facendo caricamento + MagClass.magazzino.caricaUDC(memLayer.ML.StringSessionObj("CodCS"), UDC, idxCella); + if (setCellaPiena) + { + MagClass.magazzino.taCelle.stp_celle_updPiena(idxCella, true); + } + // sistema visibilità + pnlButtons.Visible = true; + pnlInput.Visible = false; + btnConferma.Visible = false; + // aggiorna dati + frmView.DataBind(); + // sistemo buttons + setupBtn(); } + + #endregion + + #region gestione input barcode + /// /// inserito testo nella TextBox /// @@ -174,33 +230,45 @@ namespace GMW_Term.WebUserControls } + #endregion + + #region gestione interazione (buttons & update...) + /// - /// testo contenuto nella textbox + /// ritorna alla home /// - public string txtScansione + /// + /// + protected void btnChiudi_Click(object sender, EventArgs e) { - get - { - return txtInput.Text.Trim(); - } - set - { - txtInput.Text = value; - } + // svuoto da session l'UDC corrente... e pure il barcode corrente... + memLayer.ML.emptySessionVal("scannedValue"); + //memLayer.ML.emptySessionVal("UDC_sel"); + UDC = ""; + memLayer.ML.emptySessionVal("activeTask"); + Response.Redirect("Home.aspx"); } /// - /// valore della scansione barcode + /// richiesta rettifica dati UDC: qta /// - public string valoreScanUdc + /// + /// + protected void btnRettifica_Click(object sender, EventArgs e) { - get - { - return memLayer.ML.StringSessionObj("scannedValueUdc"); - } - set - { - memLayer.ML.setSessionVal("scannedValueUdc", value, false); - } + frmView.ChangeMode(FormViewMode.Edit); + // nascondo i bottoni... + pnlButtons.Visible = false; + } + /// + /// click button deposito + /// + /// + /// + protected void btnDeposita_Click(object sender, EventArgs e) + { + // nasconde/mostra panels + pnlButtons.Visible = false; + pnlInput.Visible = true; } /// /// richiesto caricamento UDC @@ -223,43 +291,53 @@ namespace GMW_Term.WebUserControls depositaUdc(cellaPiena); } /// - /// effettua salvataggio, mostra cella updated, eventuale set piena della cella - /// - /// - private void depositaUdc(bool setCellaPiena) - { - // cerco id della cella... - int idxCella = MagClass.magazzino.IdxCellaByCodCella(memLayer.ML.StringSessionObj("CodCS"), valoreScanUdc); - // salva le info facendo caricamento - MagClass.magazzino.caricaUDC(memLayer.ML.StringSessionObj("CodCS"), UDC, idxCella); - if (setCellaPiena) - { - MagClass.magazzino.taCelle.stp_celle_updPiena(idxCella, true); - } - // sistema visibilità - pnlButtons.Visible = true; - pnlInput.Visible = false; - btnConferma.Visible = false; - // aggiorna dati - frmView.DataBind(); - // sistemo buttons - setupBtn(); - } - /// - /// ritorna alla home + /// eseguo alla chiusura della fase di update /// /// /// - protected void btnChiudi_Click(object sender, EventArgs e) + protected void frmView_ItemUpdated(object sender, FormViewUpdatedEventArgs e) { - // svuoto da session l'UDC corrente... e pure il barcode corrente... - memLayer.ML.emptySessionVal("scannedValue"); - //memLayer.ML.emptySessionVal("UDC_sel"); - UDC = ""; - memLayer.ML.emptySessionVal("activeTask"); - Response.Redirect("Home.aspx"); + //fixBtnPostUpdateQta(); + } + /// + /// mostra di nuovo buttons post fase di editing + /// + private void fixBtnPostUpdateQta() + { + // aggiorno frmView + frmView.DataBind(); + // mostro di nuovo i buttons... + pnlButtons.Visible = true; + setupBtn(); + } + /// + /// alla chiusura fase di editing + /// + /// + /// + protected void frmView_ModeChanged(object sender, EventArgs e) + { + // se sono in item mode mostro di nuovo i buttons... + if (frmView.CurrentMode == FormViewMode.ReadOnly) + { + fixBtnPostUpdateQta(); + } + } + /// + /// evento on update + /// + /// + /// + 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"])); + // annullo update! + e.Cancel = true; } - + #endregion + + } } \ No newline at end of file diff --git a/GMW/GMW_Term/bin/GMW_Term.dll b/GMW/GMW_Term/bin/GMW_Term.dll index 7b69719e..e0bceb5e 100644 Binary files a/GMW/GMW_Term/bin/GMW_Term.dll and b/GMW/GMW_Term/bin/GMW_Term.dll differ diff --git a/GMW/GMW_Term/bin/GMW_data.dll b/GMW/GMW_Term/bin/GMW_data.dll index bac0ae6d..ecfa1cbd 100644 Binary files a/GMW/GMW_Term/bin/GMW_data.dll and b/GMW/GMW_Term/bin/GMW_data.dll differ diff --git a/GMW/GMW_Term/obj/Debug/GMW_Term.dll b/GMW/GMW_Term/obj/Debug/GMW_Term.dll index 7b69719e..e0bceb5e 100644 Binary files a/GMW/GMW_Term/obj/Debug/GMW_Term.dll and b/GMW/GMW_Term/obj/Debug/GMW_Term.dll differ diff --git a/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache index 20b98cb3..89b195f5 100644 Binary files a/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_data/DS_magazzino.xsd b/GMW/GMW_data/DS_magazzino.xsd index 91535fa5..96623d30 100644 --- a/GMW/GMW_data/DS_magazzino.xsd +++ b/GMW/GMW_data/DS_magazzino.xsd @@ -2019,273 +2019,127 @@ SELECT IdxPosizione, DescPosizione FROM AnagPosizioni WHERE (IdxPosizione = @Idx - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - - - - + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2300,17 +2154,17 @@ SELECT IdxPosizione, DescPosizione FROM AnagPosizioni WHERE (IdxPosizione = @Idx - - - - - - - + + + + + + + - + @@ -2320,14 +2174,271 @@ SELECT IdxPosizione, DescPosizione FROM AnagPosizioni WHERE (IdxPosizione = @Idx - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2341,101 +2452,319 @@ SELECT IdxPosizione, DescPosizione FROM AnagPosizioni WHERE (IdxPosizione = @Idx - + + + + + + + + + + - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + - + + + + + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2452,350 +2781,21 @@ SELECT IdxPosizione, DescPosizione FROM AnagPosizioni WHERE (IdxPosizione = @Idx - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -2808,8 +2808,8 @@ SELECT IdxPosizione, DescPosizione FROM AnagPosizioni WHERE (IdxPosizione = @Idx - - + + @@ -2819,20 +2819,20 @@ SELECT IdxPosizione, DescPosizione FROM AnagPosizioni WHERE (IdxPosizione = @Idx - + - - + + - - - + + + diff --git a/GMW/GMW_data/MagClass.cs b/GMW/GMW_data/MagClass.cs index c3a36da7..b71fa219 100644 --- a/GMW/GMW_data/MagClass.cs +++ b/GMW/GMW_data/MagClass.cs @@ -242,7 +242,7 @@ namespace GMW_data /// esito comando public bool rettificaQtaUDC(string UDC, decimal qta) { - string CodSoggetto = CodSoggCurrUser(); + string CodSoggetto = CodSoggCurrUser; bool answ = false; try { @@ -338,19 +338,22 @@ namespace GMW_data /// restituisce codice soggetto dell'user corrente /// /// - public string CodSoggCurrUser() + public string CodSoggCurrUser { - // ricavo da session... - string codSoggetto = ""; - try + get { - codSoggetto = DataProxy.obj.taSogg2Oper.getByUserDominio(user_std.UtSn.utente, user_std.UtSn.dominio)[0].CodSoggetto; + // ricavo da session... + string codSoggetto = ""; + try + { + codSoggetto = DataProxy.obj.taSogg2Oper.getByUserDominio(user_std.UtSn.utente, user_std.UtSn.dominio)[0].CodSoggetto; + } + catch (Exception e) + { + logger.lg.scriviLog(string.Format("Non sono riuscito a recuperare il codice soggetto per l'utente loggato: {0}, errore {1}{2}", user_std.UtSn.userNameAD, Environment.NewLine, e), tipoLog.ERROR); + } + return codSoggetto; } - catch (Exception e) - { - logger.lg.scriviLog(string.Format("Non sono riuscito a recuperare il codice soggetto per l'utente loggato: {0}, errore {1}{2}", user_std.UtSn.userNameAD, Environment.NewLine, e), tipoLog.ERROR); - } - return codSoggetto; } /// /// restituisce l'IdxCella dato il CodCella @@ -470,7 +473,7 @@ namespace GMW_data string RagioneSociale = ""; // ricavo da session... - string codSoggetto = CodSoggCurrUser(); + string codSoggetto = CodSoggCurrUser; // proseguo SOLO se ho trovato cod soggetto... if (codSoggetto != "") { diff --git a/GMW/GMW_data/StateMachine.cs b/GMW/GMW_data/StateMachine.cs index 299c054f..2a092dd5 100644 --- a/GMW/GMW_data/StateMachine.cs +++ b/GMW/GMW_data/StateMachine.cs @@ -49,7 +49,7 @@ namespace GMW_data { try { - utils.obj.taSTP.stp_UDC_delibera(CodTipoDelibera, UDC, MagClass.magazzino.CodSoggCurrUser()); + utils.obj.taSTP.stp_UDC_delibera(CodTipoDelibera, UDC, MagClass.magazzino.CodSoggCurrUser); } catch (Exception e) { diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index bac0ae6d..ecfa1cbd 100644 Binary files a/GMW/GMW_data/bin/Debug/GMW_data.dll and b/GMW/GMW_data/bin/Debug/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll index bac0ae6d..ecfa1cbd 100644 Binary files a/GMW/GMW_data/obj/Debug/GMW_data.dll and b/GMW/GMW_data/obj/Debug/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll b/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll index 5fb7c02e..01cd8506 100644 Binary files a/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll and b/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll index c374aecf..32ce7495 100644 Binary files a/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll and b/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll differ