diff --git a/GMW/GMW/Web.config b/GMW/GMW/Web.config index 9c2f4a14..8397cff1 100644 --- a/GMW/GMW/Web.config +++ b/GMW/GMW/Web.config @@ -62,7 +62,7 @@ - + diff --git a/GMW/GMW/WebUserControls/mod_main_help.ascx b/GMW/GMW/WebUserControls/mod_main_help.ascx index 632d9202..bddce619 100644 --- a/GMW/GMW/WebUserControls/mod_main_help.ascx +++ b/GMW/GMW/WebUserControls/mod_main_help.ascx @@ -18,7 +18,7 @@
- Mag 56, MP diff --git a/GMW/GMW/WebUserControls/mod_main_help.ascx.designer.cs b/GMW/GMW/WebUserControls/mod_main_help.ascx.designer.cs index fa9779da..df0c9dce 100644 --- a/GMW/GMW/WebUserControls/mod_main_help.ascx.designer.cs +++ b/GMW/GMW/WebUserControls/mod_main_help.ascx.designer.cs @@ -38,13 +38,4 @@ public partial class mod_main_help { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblMess; - - /// - /// ImageMap1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ImageMap ImageMap1; } diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index 41190e0e..c999ce04 100644 Binary files a/GMW/GMW/bin/GMW.dll and b/GMW/GMW/bin/GMW.dll differ diff --git a/GMW/GMW/bin/GMW_data.dll b/GMW/GMW/bin/GMW_data.dll index 36193349..08929d0d 100644 Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ diff --git a/GMW/GMW/mazzAppSettings.config b/GMW/GMW/mazzAppSettings.config index 6a092dcd..62e64f27 100644 --- a/GMW/GMW/mazzAppSettings.config +++ b/GMW/GMW/mazzAppSettings.config @@ -7,7 +7,7 @@ - + diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index f4e3d63b..62d6eb7a 100644 Binary files a/GMW/GMW/obj/Debug/GMW.dll and b/GMW/GMW/obj/Debug/GMW.dll differ diff --git a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache index d7f4ad14..5c4b81e1 100644 Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW/obj/Release/GMW.dll b/GMW/GMW/obj/Release/GMW.dll index 41190e0e..c999ce04 100644 Binary files a/GMW/GMW/obj/Release/GMW.dll and b/GMW/GMW/obj/Release/GMW.dll differ diff --git a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache index b4b3782c..c715228f 100644 Binary files a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_WS/Web.config b/GMW/GMW_WS/Web.config index 0304a204..ca09db2a 100644 --- a/GMW/GMW_WS/Web.config +++ b/GMW/GMW_WS/Web.config @@ -88,7 +88,7 @@ - + diff --git a/GMW/GMW_WS/bilance.asmx.cs b/GMW/GMW_WS/bilance.asmx.cs index 4bf72805..a63ca14c 100644 --- a/GMW/GMW_WS/bilance.asmx.cs +++ b/GMW/GMW_WS/bilance.asmx.cs @@ -14,7 +14,7 @@ namespace GMW_WS /// /// WebService per gestione sw bilance /// - [WebService(Namespace = "http://www.steamware.net/", Description = "Web Services che funziona da collettore di tutte le richieste delle applicazioni per le bilance integrate a GMW v.1.0.260")] + [WebService(Namespace = "http://www.steamware.net/", Description = "Web Services che funziona da collettore di tutte le richieste delle applicazioni per le bilance integrate a GMW v.1.0.270")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] public class bilance : System.Web.Services.WebService @@ -313,6 +313,16 @@ namespace GMW_WS { CodCS = memLayer.ML.confReadString("CodCS"); } + // loggo tutto! + if (logLevel > 5) + { + try + { + logger.lg.scriviLog(string.Format("UdcCall_GetNew_Tara: {0} | {1} | {2} | {3} | {4} | {5} | {6}", CodCS, CodBilancia, string.Format("{0:yy}", DateTime.Now), Tara, CodImballo, CodTipoDichiarazione, CodOperatore), tipoLog.INFO); + } + catch + { } + } // inserico riga generando il codice DS_Applicazione.ElencoCartelliniDataTable tabCartellini = DataProxy.obj.taCartellini.stp_insNew(CodCS, CodBilancia, string.Format("{0:yy}", DateTime.Now), Tara, CodImballo, CodTipoDichiarazione, CodOperatore); // leggo la riga @@ -373,6 +383,16 @@ namespace GMW_WS { IdxPosizione = memLayer.ML.confReadInt("IdxPosNewFusi"); } + // loggo tutto! + if (logLevel > 5) + { + try + { + logger.lg.scriviLog(string.Format("UdcCall_GetNew_Pesa: {0} | {1} | {2} | {3} | {4} | {5} | {6} | {7} | {8} | {9} | {10} | {11} | {12} | {13} | {14} | {15} | {16} | {17} | {18} | {19} | {20} | {21} | {22}", CodCS, CodBilancia, string.Format("{0:yy}", DateTime.Now), CodCliente, Particolare, CodImpianto, CodStampo, Esponente, Figura, DataRif, TurnoRif, CodImballo, CodSoggetto, Tara, IdxPosizione, CodTipoDichiarazione, "UDC_PESA", Quantita, PesoTot, PesoCad, CodStato, UDC_Parent, false), tipoLog.INFO); + } + catch + { } + } // creo nuovo cartellino! DS_Applicazione.ElencoCartelliniDataTable tabUdc = DataProxy.obj.taCartellini.stp_insNewFull(CodCS, CodBilancia, string.Format("{0:yy}", DateTime.Now), CodCliente, Particolare, CodImpianto, CodStampo, Esponente, Figura, DataRif, TurnoRif, CodImballo, CodSoggetto, Tara, IdxPosizione, CodTipoDichiarazione, "UDC_PESA", Quantita, PesoTot, PesoCad, CodStato, UDC_Parent, false); // ATTENZIONE: "UDC_PESA" è "hard coded" nel db... !!! // se NON richiesto di generare movimento a magazzino crea rettifica in tab batch @@ -439,6 +459,16 @@ namespace GMW_WS { IdxPosizione = memLayer.ML.confReadInt("IdxPosNewFinito"); } + // loggo tutto! + if (logLevel > 5) + { + try + { + logger.lg.scriviLog(string.Format("UdcCall_GetNew_Finito: {0} | {1} | {2} | {3} | {4} | {5} | {6} | {7} | {8} | {9} | {10} | {11} | {12} | {13} | {14} | {15} | {16} | {17} | {18} | {19} | {20} | {21} | {22}", CodCS, CodBilancia, string.Format("{0:yy}", DateTime.Now), CodCliente, Particolare, CodImpianto, CodStampo, Esponente, Figura, DataRif, TurnoRif, CodImballo, CodSoggetto, Tara, IdxPosizione, CodTipoDichiarazione, "UDC_FINITO", Quantita, PesoTot, PesoCad, CodStato, UDC_Parent, false), tipoLog.INFO); + } + catch + { } + } // creo nuovo cartellino! DS_Applicazione.ElencoCartelliniDataTable tabUdc = DataProxy.obj.taCartellini.stp_insNewFull(CodCS, CodBilancia, string.Format("{0:yy}", DateTime.Now), CodCliente, Particolare, CodImpianto, CodStampo, Esponente, Figura, DataRif, TurnoRif, CodImballo, CodSoggetto, Tara, IdxPosizione, CodTipoDichiarazione, "UDC_FINITO", Quantita, PesoTot, PesoCad, CodStato, UDC_Parent, false); // ATTENZIONE: "UDC_FINITO" è "hard coded" nel db... !!! // se NON richiesto di generare movimento a magazzino crea rettifica in tab batch @@ -450,10 +480,6 @@ namespace GMW_WS try { answ = tabUdc[0].UDC; -#if false - // salvo associazione parent-child tra UDC! - DataProxy.obj.taRelazUDC.Insert(UDC_Parent, answ); -#endif } catch { } @@ -507,6 +533,16 @@ namespace GMW_WS { IdxPosizione = memLayer.ML.confReadInt("IdxPosNewWip"); } + // loggo tutto! + if (logLevel > 5) + { + try + { + logger.lg.scriviLog(string.Format("UdcCall_GetNew_WIP: {0} | {1} | {2} | {3} | {4} | {5} | {6} | {7} | {8} | {9} | {10} | {11} | {12} | {13} | {14} | {15} | {16} | {17} | {18} | {19} | {20} | {21} | {22}", CodCS, CodBilancia, string.Format("{0:yy}", DateTime.Now), CodCliente, Particolare, CodImpianto, CodStampo, Esponente, Figura, DataRif, TurnoRif, CodImballo, CodSoggetto, Tara, IdxPosizione, CodTipoDichiarazione, "UDC_WIP", Quantita, PesoTot, PesoCad, CodStato, UDC_Parent, false), tipoLog.INFO); + } + catch + { } + } // creo nuovo cartellino! DS_Applicazione.ElencoCartelliniDataTable tabUdc = DataProxy.obj.taCartellini.stp_insNewFull(CodCS, CodBilancia, string.Format("{0:yy}", DateTime.Now), CodCliente, Particolare, CodImpianto, CodStampo, Esponente, Figura, DataRif, TurnoRif, CodImballo, CodSoggetto, Tara, IdxPosizione, CodTipoDichiarazione, "UDC_WIP", Quantita, PesoTot, PesoCad, CodStato, UDC_Parent, false); // ATTENZIONE: "UDC_WIP" è "hard coded" nel db... !!! // se NON richiesto di generare movimento a magazzino crea rettifica in tab batch @@ -544,7 +580,16 @@ namespace GMW_WS string CodCS = memLayer.ML.confReadString("CodCS"); // posizione x WIP int IdxPosizione = memLayer.ML.confReadInt("IdxPosNewWip"); - + // loggo tutto! + if (logLevel > 5) + { + try + { + logger.lg.scriviLog(string.Format("UdcCall_AssociaUdcPerConsumo: {0} | {1} | {2}", UDC_Parent, UDC_Child, CodSoggetto), tipoLog.INFO); + } + catch + { } + } try { // salvo associazioen parent-child tra UDC! @@ -582,7 +627,7 @@ namespace GMW_WS /// Codice dello stato del pezzo (da anagrafica: sabbiato, ...) /// UDC del nuovo cartellino [WebMethod(Description = "Modifica (se possibile poiché sbloccato) un cartellino esistente dato il suo UDC e salva i dati, restituendo conferma avvenuta modifica (true/false)")] - public bool UdcCall_ModificaCartellino(string UDC_edit, string CodBilancia, string CodCliente, string Particolare, string CodImpianto, string CodStampo, string Esponente, string Figura, string UDC_Parent, double Tara, string CodImballo, string CodTipoDichiarazione, string CodSoggetto, int Quantita, float PesoTot, float PesoCad, DateTime DataRif, int TurnoRif, string CodStato) + public bool UdcCall_ModificaCartellino(string UDC_edit, string CodBilancia, string CodCliente, string Particolare, string CodImpianto, string CodStampo, string Esponente, string Figura, string UDC_Parent, double Tara, string CodImballo, string CodTipoDichiarazione, string CodSoggetto, int Quantita, float PesoTot, float PesoCad, DateTime DataRif, int TurnoRif, string CodStato, int CodMag) { // ricavo cod company... string CodCS = "ND"; @@ -606,7 +651,25 @@ namespace GMW_WS { CodCS = memLayer.ML.confReadString("CodCS"); } - int IdxPosizione = memLayer.ML.confReadInt("IdxPosNewFusi"); + int IdxPosizione = 0; + if (CodMag > 0) + { + IdxPosizione = CodMag; + } + else + { + IdxPosizione = memLayer.ML.confReadInt("IdxPosNewFusi"); + } + // loggo tutto! + if (logLevel > 5) + { + try + { + logger.lg.scriviLog(string.Format("UdcCall_ModificaCartellino: {0} | {1} | {2} | {3} | {4} | {5} | {6} | {7} | {8} | {9} | {10} | {11} | {12} | {13} | {14} | {15} | {16} | {17} | {18} | {19} | {20} | {21} | {22}", UDC_edit, CodCS, CodBilancia, string.Format("{0:yy}", DateTime.Now), CodCliente, Particolare, CodImpianto, CodStampo, Esponente, Figura, DataRif, TurnoRif, CodImballo, CodSoggetto, Tara, IdxPosizione, CodTipoDichiarazione, "UDC_MOD", Quantita, PesoTot, PesoCad, CodStato, UDC_Parent), tipoLog.INFO); + } + catch + { } + } // faccio update! DS_Applicazione.ElencoCartelliniDataTable tabUdc = DataProxy.obj.taCartellini.stp_updateUDC(UDC_edit, CodCS, CodBilancia, string.Format("{0:yy}", DateTime.Now), CodCliente, Particolare, CodImpianto, CodStampo, Esponente, Figura, DataRif, TurnoRif, CodImballo, CodSoggetto, Tara, IdxPosizione, CodTipoDichiarazione, "UDC_MOD", Quantita, PesoTot, PesoCad, CodStato, UDC_Parent); // ATTENZIONE: "UDC_MOD" è "hard coded" nel db... !!! // leggo la riga @@ -635,6 +698,16 @@ namespace GMW_WS { // init bool answ = false; + // loggo tutto! + if (logLevel > 5) + { + try + { + logger.lg.scriviLog(string.Format("UdcCall_annullaUDC: {0} | {1}", UDC_req, CodSoggetto), tipoLog.INFO); + } + catch + { } + } try { GMW_data.DataProxy.obj.taCartellini.stp_annullaUDC(UDC_req, CodSoggetto); @@ -661,6 +734,16 @@ namespace GMW_WS string passkeyOk = memLayer.ML.confReadString("passkey"); if (passkeyOk == passkey) { + // loggo tutto! + if (logLevel > 5) + { + try + { + logger.lg.scriviLog(string.Format("UdcCall_sbloccaUDC: {0} | {1}", UDC_req, CodSoggetto), tipoLog.INFO); + } + catch + { } + } GMW_data.DataProxy.obj.taCartellini.stp_sbloccaUdc(UDC_req, CodSoggetto); answ = true; } @@ -682,57 +765,20 @@ namespace GMW_WS public bool UdcCall_PrintLabel(string place, tipoCartellino cartellino, string UDC) { bool answ = false; - //answ = doPrintLabel(cartellino, UDC, answ); + // loggo tutto! + if (logLevel > 5) + { + try + { + logger.lg.scriviLog(string.Format("UdcCall_PrintLabel: {0} | {1} | {2}", place, cartellino, UDC), tipoLog.INFO); + } + catch + { } + } answ = reportPrinter.obj.stampaCartellino(cartellino, UDC); return answ; } -#if false - public bool doPrintLabel(tipoCartellino cartellino, string UDC, bool answ) - { - string printerName = ""; - string outForm = ""; - string pagWidth = ""; - string pagHeigth = ""; - string margin = ""; - reportRichiesto report = reportRichiesto.CartellinoPesa; - switch (cartellino) - { - case tipoCartellino.soloTara: - printerName = memLayer.ML.confReadString("printerCartTara"); - outForm = "EMF"; - pagWidth = memLayer.ML.confReadString("PageWidthCartTara"); - pagHeigth = memLayer.ML.confReadString("PageHeightCartTara"); - margin = memLayer.ML.confReadString("MarginTara"); - report = reportRichiesto.CartellinoTara; - break; - case tipoCartellino.completo: - printerName = memLayer.ML.confReadString("printerCartCompleto"); - outForm = "EMF"; - pagWidth = memLayer.ML.confReadString("PageWidthCartCompleto"); - pagHeigth = memLayer.ML.confReadString("PageHeightCartCompleto"); - margin = memLayer.ML.confReadString("MarginCompleto"); - report = reportRichiesto.CartellinoPesa; - break; - default: - break; - } - devInfoParam deviceInfo = new devInfoParam(outForm, pagHeigth, pagWidth, margin, margin, margin, margin); - try - { - if (logLevel > 5) logger.lg.scriviLog(String.Format("Sto per inviare un report alla stampante {0}", printerName), tipoLog.INFO); - reportPrinter.obj.printReport(report, printerName, UDC, deviceInfo); - if (logLevel > 5) logger.lg.scriviLog(String.Format("inviato comando print alla stampante {0}", printerName), tipoLog.INFO); - answ = true; - } - catch (Exception e) - { - logger.lg.scriviLog(String.Format("Errore in fase di creazione e stampa report: stampante {0}, errore riscontrato {1}", printerName, e), tipoLog.EXCEPTION); - } - return answ; - } - -#endif #endregion } } diff --git a/GMW/GMW_WS/bin/GMW.dll b/GMW/GMW_WS/bin/GMW.dll index ecf65bce..c999ce04 100644 Binary files a/GMW/GMW_WS/bin/GMW.dll and b/GMW/GMW_WS/bin/GMW.dll differ diff --git a/GMW/GMW_WS/bin/GMW_WS.dll b/GMW/GMW_WS/bin/GMW_WS.dll index 01834ff0..5f72085b 100644 Binary files a/GMW/GMW_WS/bin/GMW_WS.dll and b/GMW/GMW_WS/bin/GMW_WS.dll differ diff --git a/GMW/GMW_WS/bin/GMW_data.dll b/GMW/GMW_WS/bin/GMW_data.dll index 47bc8e0f..08929d0d 100644 Binary files a/GMW/GMW_WS/bin/GMW_data.dll and b/GMW/GMW_WS/bin/GMW_data.dll differ diff --git a/GMW/GMW_WS/bin/SteamWare.dll b/GMW/GMW_WS/bin/SteamWare.dll index 4792c30b..d2716eb5 100644 Binary files a/GMW/GMW_WS/bin/SteamWare.dll and b/GMW/GMW_WS/bin/SteamWare.dll differ diff --git a/GMW/GMW_WS/mazzAppSettings.config b/GMW/GMW_WS/mazzAppSettings.config index 8e9984ad..bdd3db07 100644 --- a/GMW/GMW_WS/mazzAppSettings.config +++ b/GMW/GMW_WS/mazzAppSettings.config @@ -6,7 +6,7 @@ - + diff --git a/GMW/GMW_WS/obj/Debug/GMW_WS.dll b/GMW/GMW_WS/obj/Debug/GMW_WS.dll index b77535e5..32168fc9 100644 Binary files a/GMW/GMW_WS/obj/Debug/GMW_WS.dll and b/GMW/GMW_WS/obj/Debug/GMW_WS.dll differ diff --git a/GMW/GMW_WS/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW_WS/obj/Debug/ResolveAssemblyReference.cache index 766818f4..80ac405c 100644 Binary files a/GMW/GMW_WS/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW_WS/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_WS/obj/Release/GMW_WS.dll b/GMW/GMW_WS/obj/Release/GMW_WS.dll index 01834ff0..5f72085b 100644 Binary files a/GMW/GMW_WS/obj/Release/GMW_WS.dll and b/GMW/GMW_WS/obj/Release/GMW_WS.dll differ diff --git a/GMW/GMW_WS/obj/Release/ResolveAssemblyReference.cache b/GMW/GMW_WS/obj/Release/ResolveAssemblyReference.cache index 2f41a3d6..bcd2e5d4 100644 Binary files a/GMW/GMW_WS/obj/Release/ResolveAssemblyReference.cache and b/GMW/GMW_WS/obj/Release/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_WS_installer/GMW_WS_installer.vdproj b/GMW/GMW_WS_installer/GMW_WS_installer.vdproj index 6bda6df6..525bbb78 100644 --- a/GMW/GMW_WS_installer/GMW_WS_installer.vdproj +++ b/GMW/GMW_WS_installer/GMW_WS_installer.vdproj @@ -344,14 +344,14 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:GMW_WS" - "ProductCode" = "8:{09427394-A176-4B2D-A2C2-ABD5D89F2D23}" - "PackageCode" = "8:{832BA545-3FD5-4E36-8DFC-1842B8BBC669}" + "ProductCode" = "8:{3898BCD2-D214-4E59-A4C9-88F2CE095349}" + "PackageCode" = "8:{17C3C513-8A05-4A9C-9EF8-BE74F46E8DF3}" "UpgradeCode" = "8:{BA470335-3D4B-4C20-8152-90A5F0F14FE0}" "RestartWWWService" = "11:TRUE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.0.260" + "ProductVersion" = "8:1.0.270" "Manufacturer" = "8:SteamWare s.r.l." "ARPHELPTELEPHONE" = "8:+39-035460560" "ARPHELPLINK" = "8:http://www.steamware.net" @@ -824,7 +824,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_C1E28C0CBEB3498E83D9B97B28568D55" { - "SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Release\\IISConsoleVB.exe" + "SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Debug\\IISConsoleVB.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_B61BA0CAC3474474B971A8F12A1C93F2" @@ -852,7 +852,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D67ABEB91C7F428EB3C512E4A505628A" { - "SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Release\\SetDirectoryPermission.exe" + "SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Debug\\SetDirectoryPermission.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_B61BA0CAC3474474B971A8F12A1C93F2" diff --git a/GMW/GMW_WS_installer/Release/GMW_WS_installer.msi b/GMW/GMW_WS_installer/Release/GMW_WS_installer.msi index 63e8fd9f..52878b7e 100644 Binary files a/GMW/GMW_WS_installer/Release/GMW_WS_installer.msi and b/GMW/GMW_WS_installer/Release/GMW_WS_installer.msi differ diff --git a/GMW/GMW_data/GMW_data.csproj b/GMW/GMW_data/GMW_data.csproj index f741bdc6..1d138929 100644 --- a/GMW/GMW_data/GMW_data.csproj +++ b/GMW/GMW_data/GMW_data.csproj @@ -160,6 +160,7 @@ SettingsSingleFileGenerator Settings.Designer.cs + diff --git a/GMW/GMW_data/SqlScripts/GMW_00270.sql b/GMW/GMW_data/SqlScripts/GMW_00270.sql new file mode 100644 index 00000000..c4a72242 --- /dev/null +++ b/GMW/GMW_data/SqlScripts/GMW_00270.sql @@ -0,0 +1,425 @@ +-- svuoto tab x procedere... +delete from AS400_BatchMovimenti +GO + + + +set xact_abort on +go + +begin transaction +go + +alter table AS400_BatchMovimenti drop + constraint FK_AS400_BatchMovimenti_AS400_MagCont , + constraint FK_AS400_BatchMovimenti_AnagTipoEvento +go + +exec sp_rename 'PK_AS400_BatchMovimenti', 'tmp__PK_AS400_BatchMovimenti', 'OBJECT' +go + +exec sp_rename 'AS400_BatchMovimenti', 'tmp__AS400_BatchMovimenti_1', 'OBJECT' +go + +create table AS400_BatchMovimenti( + DataIns datetime not null, + CodEvento nvarchar(10) not null, + Particolare nvarchar(15) not null, + UDC nvarchar(50) not null, + CodMagAS nvarchar(50) not null, + Quantita decimal(10,2) not null, + DataBatch datetime, + DataVerifica datetime, + + constraint PK_AS400_BatchMovimenti primary key(DataIns,CodEvento,Particolare,UDC,CodMagAS) +) +go + +alter table AS400_BatchMovimenti add + constraint FK_AS400_BatchMovimenti_AnagTipoEvento foreign key(CodEvento) references AnagTipoEvento(CodEvento) on update cascade, + constraint FK_AS400_BatchMovimenti_AS400_MagCont foreign key(CodMagAS) references AS400_MagCont(CodMagAS) on update cascade +go + +exec sp_addextendedproperty 'MS_Description', 'dataora inserimento in coda caricamento', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataIns' +go + +exec sp_addextendedproperty 'MS_Description', 'NON MODIFICARE: nel codice si usano questi campi x chiamate...', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'CodEvento' +go + +exec sp_addextendedproperty 'MS_Description', 'dataora di caricamento batch verso AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataBatch' +go + +exec sp_addextendedproperty 'MS_Description', N'dataora in cui è stato verificato il caricamento su AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataVerifica' +go + +insert into AS400_BatchMovimenti(DataIns,CodEvento,Particolare,UDC,CodMagAS,Quantita,DataBatch,DataVerifica) select DataIns,CodEvento,Particolare,N'',CodMagAS,Quantita,DataBatch,DataVerifica from tmp__AS400_BatchMovimenti_1 +go + +drop table tmp__AS400_BatchMovimenti_1 +go + +commit +go + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +-- ============================================= +-- Author: Samuele E. Locatelli +-- Create date: 2009-09-20 +-- Description: trigger x inserimento movimenti +-- nella coda di trasferimento batch +-- verso AS400 x UPDATE UDC +-- ============================================= +alter TRIGGER trg_updMovAS + ON ElencoCartellini + AFTER UPDATE +AS +BEGIN + + -- setup variabili e verbosità + SET NOCOUNT ON; + DECLARE @partOk AS BIT + DECLARE @IdxPosFrom AS INT + DECLARE @IdxPosTo AS INT + DECLARE @magFrom AS NVARCHAR(50) + DECLARE @magTo AS NVARCHAR(50) + DECLARE @qta AS DECIMAL(10,2) + + -- controllo che CI SIA il particolare (altrimenti non eseguo) + SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM deleted) + + IF(@partOk = 1) + SET @qta = (SELECT Qta FROM inserted) + -- se c'è stata modifica di quantità inizio a rettificare quella + IF UPDATE(Qta) + BEGIN + INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita) + ( + SELECT GETDATE(), 'UDC_MOD', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), @qta-Qta + FROM deleted + WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) + ) + END + + -- controllo poi se sia cambiato il magazzino, altrimenti non lo inserisco + IF UPDATE(IdxPosizione) + BEGIN + -- Prendo le posizioni di magazzino precedente e nuova + SET @IdxPosFrom = (SELECT IdxPosizione FROM deleted) + SET @IdxPosTo = (SELECT IdxPosizione FROM inserted) + -- Le trasformo nelle equivalenti stringhe del codMag SE attive + SET @magFrom = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosFrom AS NVARCHAR(50))) + SET @magTo = (SELECT ISNULL(CodMagAS,'---') FROM AS400_MagCont WHERE Attivo = 1 AND CodMagAs = CAST(@IdxPosTo AS NVARCHAR(50))) + + -- inserisco un movimento di deposito verso mag nuovo (SE attivo) + IF (@magFrom <> '---') + BEGIN + INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita) + ( + SELECT GETDATE(), 'UDC_MOV', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), -@qta + FROM deleted + WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) + ) + END + -- inserisco un movimento di prelievo verso mag vecchio (SE attivo) + IF (@magTo <> '---') + BEGIN + INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita) + ( + SELECT GETDATE(), 'UDC_MOV', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), @qta + FROM inserted + WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) + ) + END + END + +END +go + +-- ============================================= +-- Author: Samuele E. Locatelli +-- Create date: 2009-09-20 +-- Description: trigger x inserimento movimenti +-- nella coda di trasferimento batch +-- verso AS400 x INSERT UDC +-- ============================================= +alter TRIGGER trg_InsMovAS + ON ElencoCartellini + AFTER INSERT +AS +BEGIN + + -- setup variabili e verbosità + SET NOCOUNT ON; + DECLARE @partOk AS BIT + + -- controllo che CI SIA il particoalre (altrimenti non eseguo) + SET @partOk = (SELECT CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END FROM inserted) + + IF(@partOk = 1) + BEGIN + -- metto in storico la posizione attuale dell'UDC (SE esiste) CANCELLATO + INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita) + ( + SELECT GETDATE(), 'UDC_NEW', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), Qta + FROM inserted + WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) + ) + END + +END +go + +-- ============================================= +-- Author: Samuele E. Locatelli +-- Create date: 2009-09-20 +-- Description: trigger x inserimento movimenti +-- nella coda di trasferimento batch +-- verso AS400 x DELETE UDC +-- ============================================= +alter TRIGGER trg_DelMovAS + ON ElencoCartellini + AFTER DELETE +AS +BEGIN + + -- setup variabili e verbosità + SET NOCOUNT ON; + -- inserisco movimenti AS + INSERT INTO AS400_BatchMovimenti(DataIns, CodEvento, Particolare, UDC, CodMagAS, Quantita) + ( + SELECT GETDATE(), 'UDC_DEL', Particolare, UDC, CAST(IdxPosizione AS NVARCHAR(50)), -Qta + FROM deleted + WHERE CAST(IdxPosizione AS NVARCHAR(50)) IN (SELECT CodMagAS FROM AS400_MagCont WHERE Attivo = 1) AND ((CASE WHEN ISNULL(Particolare,'n.d.') = 'n.d.' THEN 0 ELSE 1 END) = 1) + ) + +END +go + +commit +go + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*************************************** +* STORED stp_batch_RapQual_S01 +* +* Esegue lo step 1 (caricamento dati RAW da AS400) per la tab dei rapporti di qualità +* +* Steamware, S.E.L. +* mod: 2010.09.23 +* +****************************************/ +alter PROCEDURE BatchQueue.stp_batch_RapQual_S01 +( + @minData DATETIME +) +AS + -- BOZZA DA COMPLETARE A CURA MAZZUCCONI!!! + + DECLARE @SQL AS NVARCHAR(1000) + DECLARE @dataAs400 AS VARCHAR(8) + + SET @dataAs400 = (SELECT dbo.dateToAsFormat(@minData)) + + -- svuoto tab raw attuale + /* + DELETE FROM RawData.XOGIX00F + */ + + + -- INSERISCO DA AS400 + /* + INSERT INTO RawData.XOGIX00F + ( + SET @SQL = + N'SELECT + XRPQLN + ,XRPQLD + ,XNRETI + ,XCDFOR + ,XCDTER + ,XCDPAR + ,XDTPRO + ,XTRPRO + ,XQTPRO + ,XDESMT + ,XMATSC + ,XBENQL + FROM OPENQUERY( P65220DC, ''SELECT * FROM MAZZT_DTV3.XOGIX00F WHERE XRPQLD >= ' + SET @SQL = @SQL + @dataAs400 + ''' )' + + EXEC sp_executesql @SQL + ) + */ + +RETURN +go + +commit +go + + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*************************************** +* STORED stp_rappQualSuntoGetByDataRange +* +* Ottiene l'elenco dei record di rapp qualità di AS dato il range delle date +* +* Steamware, S.E.L. +* mod: 2010.09.29 +* +****************************************/ +create PROCEDURE stp_rappQualSuntoGetByDataRange +( + @dataFrom DATETIME, + @dataTo DATETIME +) +AS + -- restituisce le righe richieste + SELECT * + FROM v_RapQualSunto + WHERE (DataRapQual > dbo.dateToAsFormat(@dataFrom)) AND (DataRapQual < dbo.dateToAsFormat(@dataTo)) + ORDER BY nRapQual +RETURN +go + +/*************************************** +* STORED stp_rappQualSuntoGetByNumRap +* +* Ottiene il record di rapp qualità di AS dato il numero del rapporto di qualità +* +* Steamware, S.E.L. +* mod: 2010.09.29 +* +****************************************/ +create PROCEDURE stp_rappQualSuntoGetByNumRap +( + @nRapQual NVARCHAR(20) +) +AS + -- restituisce le righe richieste + SELECT * + FROM v_RapQualSunto + WHERE (nRapQual = @nRapQual) +RETURN +go + +commit +go + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*************************************** +* STORED stp_spostaUdc +* +* sposta un UDC, salvandone la posizione precedente (se esiste) nella tab storica +* +* Steamware, S.E.L. +* mod: 2010.06.11 +* +****************************************/ +alter PROCEDURE stp_spostaUdc +( + @CodCS VARCHAR(2), + @UDC VARCHAR(50), + @IdxCellaTo INT +) +AS + +BEGIN TRAN + + -- DICHIARAZIONI iniziali variabili + DECLARE @IdxCellaFrom INT + DECLARE @capienza INT + DECLARE @numUdc INT + + -- controllo cella di partenza + SET @IdxCellaFrom = (SELECT IdxCella FROM PosizioneUdcCorrente WHERE UDC = @UDC) + -- controllo se la cella di dest vada indicata come piena + SET @capienza = ( + SELECT tc.Capienza + FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella + WHERE c.IdxCella = @IdxCellaFrom + ) + SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaFrom) + -- se capienza raggiunta aggiorno... + IF(@numUdc -1 < @capienza) + BEGIN + EXEC stp_celle_updPiena @IdxCellaFrom, 0 + END + + -- cancello posizione occupata + DELETE + FROM PosizioneUdcCorrente + WHERE UDC = @UDC + + -- creo una nuova posizione per l'UDC + INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif) + VALUES(@UDC, @IdxCellaTo, @CodCS, GETDATE()) + + -- controllo se la cella di dest vada indicata come piena + SET @capienza = ( + SELECT tc.Capienza + FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella + WHERE c.IdxCella = @IdxCellaTo + ) + SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaTo) + -- se capienza raggiunta aggiorno... + IF(@numUdc >= @capienza) + BEGIN + EXEC stp_celle_updPiena @IdxCellaTo, 1 + END + +COMMIT TRAN + +RETURN +go + +commit +go + + + + + + + + + + +-- registro versione... +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(270, GETDATE()) +GO diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index 476b12a5..c727976f 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/bin/Release/GMW_data.dll b/GMW/GMW_data/bin/Release/GMW_data.dll index 36193349..08929d0d 100644 Binary files a/GMW/GMW_data/bin/Release/GMW_data.dll and b/GMW/GMW_data/bin/Release/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 476b12a5..c727976f 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/Release/GMW_data.dll b/GMW/GMW_data/obj/Release/GMW_data.dll index 36193349..08929d0d 100644 Binary files a/GMW/GMW_data/obj/Release/GMW_data.dll and b/GMW/GMW_data/obj/Release/GMW_data.dll differ diff --git a/GMW/GMW_installer/GMW_installer.vdproj b/GMW/GMW_installer/GMW_installer.vdproj index 2e03f40c..887b10d9 100644 --- a/GMW/GMW_installer/GMW_installer.vdproj +++ b/GMW/GMW_installer/GMW_installer.vdproj @@ -349,14 +349,14 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:GMW" - "ProductCode" = "8:{C178FA46-1964-4FE3-A031-C28112FD65A2}" - "PackageCode" = "8:{D437872E-91C9-498D-908E-CC83CBC11297}" + "ProductCode" = "8:{E63FF8D2-6DEB-49CF-9B41-4AD933056FD7}" + "PackageCode" = "8:{86396A27-22B8-4B2E-91A9-F00EE5047BCB}" "UpgradeCode" = "8:{C9BC0732-DC92-4336-BAC9-A05A5D2A97C0}" "RestartWWWService" = "11:TRUE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.0.265" + "ProductVersion" = "8:1.0.270" "Manufacturer" = "8:SteamWare s.r.l." "ARPHELPTELEPHONE" = "8:+39-035460560" "ARPHELPLINK" = "8:http://www.steamware.net" @@ -829,7 +829,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_4FD0E5B75A7F47B79080EC0983BE6583" { - "SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Release\\SetDirectoryPermission.exe" + "SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Debug\\SetDirectoryPermission.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_5606017201AE45B480A8ABD8B8D68264" @@ -857,7 +857,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_8BDD7AA9D46A46EC80880F83F13C902E" { - "SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Release\\IISConsoleVB.exe" + "SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Debug\\IISConsoleVB.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_5606017201AE45B480A8ABD8B8D68264"