diff --git a/GMW/GMW.suo b/GMW/GMW.suo index 7d15c2c1..a2e8570e 100644 Binary files a/GMW/GMW.suo and b/GMW/GMW.suo differ diff --git a/GMW/GMW/GMW.csproj b/GMW/GMW/GMW.csproj index e0cd6b7e..7f5451cd 100644 --- a/GMW/GMW/GMW.csproj +++ b/GMW/GMW/GMW.csproj @@ -817,6 +817,8 @@ + + diff --git a/GMW/GMW/Style.css b/GMW/GMW/Style.css index abe38a00..eb8ec1fd 100644 --- a/GMW/GMW/Style.css +++ b/GMW/GMW/Style.css @@ -132,6 +132,15 @@ border: solid 1px #777777; } .cellaOccupata +{ + text-align: center; + font-size: 8pt; + height: 40px; + background-image: url(images/arancio_80.png); + color: White; + border: solid 1px #777777; +} +.cellaPiena { text-align: center; font-size: 8pt; diff --git a/GMW/GMW/WebUserControls/mod_dettCelleBlocco.ascx.cs b/GMW/GMW/WebUserControls/mod_dettCelleBlocco.ascx.cs index 28578dab..a5c9a3be 100644 --- a/GMW/GMW/WebUserControls/mod_dettCelleBlocco.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_dettCelleBlocco.ascx.cs @@ -17,7 +17,11 @@ namespace GMW.WebUserControls protected GMW_data.Type.BlockMap[,] BloccoCelle; public event EventHandler eh_selValore; - + /// + /// evento caricamento pagina... + /// + /// + /// protected void Page_Load(object sender, EventArgs e) { doUpdate(); @@ -41,26 +45,37 @@ namespace GMW.WebUserControls DS_magazzino.BlocchiRow rigaBlocco = MagClass.magazzino.taBlocchi.getByIdx(IdxBlocco)[0]; numX = rigaBlocco.NumX; numY = rigaBlocco.NumY; + // carico TUTTE le celle del blocco... + DS_magazzino.CelleDataTable tabCelleAll = MagClass.magazzino.taCelle.getByIdxBlocco(IdxBlocco); + DS_magazzino.CelleRow rigaCelle; + // carico i tipi cella... + DS_magazzino.TipoCellaDataTable tabTipoCelle = MagClass.magazzino.taTipoCella.GetData(); // inizializzo il mio array... BloccoCelle = new GMW_data.Type.BlockMap[numX, numY]; + // per calcolo capacità di OGNI cella + int capa = 0; // carico i dati nell'array: di default tutto VUOTO, con posizione attiva... for (int pos_y = 0; pos_y < numY; pos_y++) { for (int pos_x = 0; pos_x < numX; pos_x++) { - BloccoCelle[pos_x, pos_y] = new GMW_data.Type.BlockMap("-", "libera", "cellaLibera", "", ""); + // calcolo la capacità della cella... + rigaCelle = (DS_magazzino.CelleRow)tabCelleAll.Select(string.Format("X={0} AND Y={1}", pos_x + 1, pos_y + 1))[0]; + capa = tabTipoCelle.FindByIdxTipoCella(rigaCelle.IdxTipoCella).Capienza; + BloccoCelle[pos_x, pos_y] = new GMW_data.Type.BlockMap("-", "", "cellaLibera", rigaCelle.IdxCella, rigaCelle.CodCella, capa, 0, rigaCelle.Piena, rigaCelle.Attiva); } } // cerco elenco delle celle NON Attive - DS_magazzino.CelleDataTable tabCelle = MagClass.magazzino.taCelle.getNonAttiveByIdxBlocco(IdxBlocco); + DS_magazzino.CelleDataTable tabCelleInattive = MagClass.magazzino.taCelle.getNonAttiveByIdxBlocco(IdxBlocco); // se ce ne sono ... - if (tabCelle.Rows.Count > 0) + if (tabCelleInattive.Rows.Count > 0) { // ...sovrascrivo valori di default - foreach (DS_magazzino.CelleRow riga in tabCelle) + foreach (DS_magazzino.CelleRow riga in tabCelleInattive) { + // sistemo layout BloccoCelle[riga.X - 1, riga.Y - 1].Css = "cellaInattiva"; - BloccoCelle[riga.X - 1, riga.Y - 1].Label = "X"; + BloccoCelle[riga.X - 1, riga.Y - 1].Label = string.Format("X / {0}", BloccoCelle[riga.X - 1, riga.Y - 1].Capacita); BloccoCelle[riga.X - 1, riga.Y - 1].ToolTip = "non attiva"; } } @@ -81,6 +96,8 @@ namespace GMW.WebUserControls // ...sovrascrivo valori di default foreach (DS_magazzino.v_UdcDetailRow riga in tabUdc) { + // salvo che ho 1 UDC in + nella cella... + BloccoCelle[riga.X - 1, riga.Y - 1].NumUdc++; // controllo se nella cella ci sia il particolare selezionato... if (ParticolareSel == riga.Particolare) { @@ -96,13 +113,18 @@ namespace GMW.WebUserControls } else { - // se NON C'E' alcun particolare selezionato ... - BloccoCelle[riga.X - 1, riga.Y - 1].Css = "cellaOccupata"; + // se NON C'E' alcun particolare selezionato ... controllo il blocco! + if (BloccoCelle[riga.X - 1, riga.Y - 1].Piena) + { + BloccoCelle[riga.X - 1, riga.Y - 1].Css = "cellaPiena"; + } + else + { + BloccoCelle[riga.X - 1, riga.Y - 1].Css = "cellaOccupata"; + } } - BloccoCelle[riga.X - 1, riga.Y - 1].Label = string.Format("{0:#}", riga.Qta); - BloccoCelle[riga.X - 1, riga.Y - 1].ToolTip = string.Format("{2} - {0} {1:#}pz", riga.UDC, riga.Qta, riga.Particolare); - BloccoCelle[riga.X - 1, riga.Y - 1].KeyVal = riga.UDC; - BloccoCelle[riga.X - 1, riga.Y - 1].CellCode = riga.CodCella; + BloccoCelle[riga.X - 1, riga.Y - 1].Label = string.Format("{0} / {1}", BloccoCelle[riga.X - 1, riga.Y - 1].NumUdc, BloccoCelle[riga.X - 1, riga.Y - 1].Capacita); + BloccoCelle[riga.X - 1, riga.Y - 1].ToolTip += string.Format("{2} - {0} {1:#}pz{3}", riga.UDC, riga.Qta, riga.Particolare, Environment.NewLine); } } } @@ -163,7 +185,12 @@ namespace GMW.WebUserControls eh_selValore(this, new EventArgs()); } } - + /// + /// crea una cella per il numero dei livelli + /// + /// + /// + /// private static TableCell setupCellaConteggioY(int pos_y, TableRow riga) { TableCell cell; @@ -174,7 +201,9 @@ namespace GMW.WebUserControls riga.Cells.Add(cell); return cell; } - + /// + /// crea la riga del numero delle colonne + /// private void setupRigaConteggioX() { TableRow riga = new TableRow(); diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index 049f950b..df7dc4ac 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 f213ad3c..ce5bf255 100644 Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ diff --git a/GMW/GMW/images/arancio_20.png b/GMW/GMW/images/arancio_20.png new file mode 100644 index 00000000..ca21b078 Binary files /dev/null and b/GMW/GMW/images/arancio_20.png differ diff --git a/GMW/GMW/images/arancio_80.png b/GMW/GMW/images/arancio_80.png new file mode 100644 index 00000000..b3c3b7a1 Binary files /dev/null and b/GMW/GMW/images/arancio_80.png differ diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index 85f96a79..df7dc4ac 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 4e2cef82..abeaaa67 100644 Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_data/DS_magazzino.Designer.cs b/GMW/GMW_data/DS_magazzino.Designer.cs index 644167b7..fed10080 100644 --- a/GMW/GMW_data/DS_magazzino.Designer.cs +++ b/GMW/GMW_data/DS_magazzino.Designer.cs @@ -3376,6 +3376,8 @@ namespace GMW_data { private global::System.Data.DataColumn columnZ; + private global::System.Data.DataColumn columnIdxCella; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public v_UdcDetailDataTable() { this.TableName = "v_UdcDetail"; @@ -3539,6 +3541,13 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn IdxCellaColumn { + get { + return this.columnIdxCella; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Browsable(false)] public int Count { @@ -3587,7 +3596,8 @@ namespace GMW_data { string CodCella, int X, int Y, - int Z) { + int Z, + int IdxCella) { v_UdcDetailRow rowv_UdcDetailRow = ((v_UdcDetailRow)(this.NewRow())); object[] columnValuesArray = new object[] { UDC, @@ -3608,7 +3618,8 @@ namespace GMW_data { CodCella, X, Y, - Z}; + Z, + IdxCella}; rowv_UdcDetailRow.ItemArray = columnValuesArray; this.Rows.Add(rowv_UdcDetailRow); return rowv_UdcDetailRow; @@ -3653,6 +3664,7 @@ namespace GMW_data { this.columnX = base.Columns["X"]; this.columnY = base.Columns["Y"]; this.columnZ = base.Columns["Z"]; + this.columnIdxCella = base.Columns["IdxCella"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -3695,6 +3707,8 @@ namespace GMW_data { base.Columns.Add(this.columnY); this.columnZ = new global::System.Data.DataColumn("Z", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnZ); + this.columnIdxCella = new global::System.Data.DataColumn("IdxCella", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIdxCella); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnUDC}, true)); this.columnUDC.AllowDBNull = false; @@ -3717,6 +3731,7 @@ namespace GMW_data { this.columnX.ReadOnly = true; this.columnY.ReadOnly = true; this.columnZ.ReadOnly = true; + this.columnIdxCella.ReadOnly = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -8708,6 +8723,21 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public int IdxCella { + get { + try { + return ((int)(this[this.tablev_UdcDetail.IdxCellaColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'IdxCella\' in table \'v_UdcDetail\' is DBNull.", e); + } + } + set { + this[this.tablev_UdcDetail.IdxCellaColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public bool IsRagSocialeNull() { return this.IsNull(this.tablev_UdcDetail.RagSocialeColumn); @@ -8887,6 +8917,16 @@ namespace GMW_data { public void SetZNull() { this[this.tablev_UdcDetail.ZColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool IsIdxCellaNull() { + return this.IsNull(this.tablev_UdcDetail.IdxCellaColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void SetIdxCellaNull() { + this[this.tablev_UdcDetail.IdxCellaColumn] = global::System.Convert.DBNull; + } } /// @@ -16205,6 +16245,7 @@ SELECT IdxTipoCella, CodMag, CodCS, Quantita, Capienza, Max_X, Max_Y, Max_Z, Max tableMapping.ColumnMappings.Add("X", "X"); tableMapping.ColumnMappings.Add("Y", "Y"); tableMapping.ColumnMappings.Add("Z", "Z"); + tableMapping.ColumnMappings.Add("IdxCella", "IdxCella"); this._adapter.TableMappings.Add(tableMapping); } @@ -16219,9 +16260,7 @@ SELECT IdxTipoCella, CodMag, CodCS, Quantita, Capienza, Max_X, Max_Y, Max_Z, Max this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT UDC, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, D" + - "escImpianto, DataFus, TurnoFus, CodImballo, Qta, DescStato, ModDate, CodMag, Cod" + - "Blocco, CodCella, X, Y, Z FROM dbo.v_UdcDetail"; + this._commandCollection[0].CommandText = "SELECT * FROM dbo.v_UdcDetail"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; diff --git a/GMW/GMW_data/DS_magazzino.xsd b/GMW/GMW_data/DS_magazzino.xsd index 038c40e5..2e7046a6 100644 --- a/GMW/GMW_data/DS_magazzino.xsd +++ b/GMW/GMW_data/DS_magazzino.xsd @@ -1071,10 +1071,10 @@ SELECT IdxTipoCella, CodMag, CodCS, Quantita, Capienza, Max_X, Max_Y, Max_Z, Max - + - - SELECT UDC, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, DescImpianto, DataFus, TurnoFus, CodImballo, Qta, DescStato, ModDate, CodMag, CodBlocco, CodCella, X, Y, Z FROM dbo.v_UdcDetail + + SELECT * FROM dbo.v_UdcDetail @@ -1100,6 +1100,7 @@ SELECT IdxTipoCella, CodMag, CodCS, Quantita, Capienza, Max_X, Max_Y, Max_Z, Max + @@ -1840,273 +1841,127 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - - - - + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2121,17 +1976,17 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - - - - - - - + + + + + + + - + @@ -2141,14 +1996,271 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2162,100 +2274,307 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - + + + + + + + + + + - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + - + + + + + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2272,338 +2591,21 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/GMW/GMW_data/DS_magazzino.xss b/GMW/GMW_data/DS_magazzino.xss index 9fb29a96..65c9af21 100644 --- a/GMW/GMW_data/DS_magazzino.xss +++ b/GMW/GMW_data/DS_magazzino.xss @@ -6,23 +6,23 @@ --> - + - + - - - - - - - - - - - - + + + + + + + + + + + + @@ -61,7 +61,7 @@ - + 694 @@ -97,7 +97,7 @@ - + 133 @@ -109,7 +109,7 @@ - + 393 @@ -121,7 +121,7 @@ - + 724 diff --git a/GMW/GMW_data/Type/BlockMap.cs b/GMW/GMW_data/Type/BlockMap.cs index f229d582..41eef26d 100644 --- a/GMW/GMW_data/Type/BlockMap.cs +++ b/GMW/GMW_data/Type/BlockMap.cs @@ -13,21 +13,33 @@ namespace GMW_data.Type /// label da mostrare /// tooltip da mostrare /// css da applicare - /// chiave associata al blocco + /// chiave associata al blocco (idx INT) /// cella associata al blocco - public BlockMap(string label, string tooltip, string css, string key, string cell) + /// capacità blocco + /// num UDC del blocco + /// determina se sia indicata come piena + /// determina se sia attivo + public BlockMap(string label, string tooltip, string css, int key, string cell, int capa, int numUdc, bool piena, bool attiva) { Label = label; ToolTip = tooltip; Css = css; KeyVal = key; CellCode = cell; + Capacita = capa; + NumUdc = numUdc; + Piena = piena; + Attiva = attiva; } public string Label { get; set; } public string ToolTip { get; set; } public string Css { get; set; } - public string KeyVal { get; set; } + public int KeyVal { get; set; } public string CellCode { get; set; } + public int Capacita { get; set; } + public int NumUdc { get; set; } + public bool Piena { get; set; } + public bool Attiva { get; set; } } } diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index 4ff55889..ce5bf255 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 4ff55889..ce5bf255 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/TempPE/DS_magazzino.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll index 2f2a91fa..bd7a1841 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 diff --git a/GMW/GMW_installer/Release/GMW_installer.msi b/GMW/GMW_installer/Release/GMW_installer.msi index 75ae827f..cf030244 100644 Binary files a/GMW/GMW_installer/Release/GMW_installer.msi and b/GMW/GMW_installer/Release/GMW_installer.msi differ