diff --git a/MP-ADM/FileUpload/.placeHolder.file b/MP-ADM/FileUpload/.placeHolder.file new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/MP-ADM/FileUpload/.placeHolder.file @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MP-ADM/MP-ADM.csproj b/MP-ADM/MP-ADM.csproj index 16801f11..e693e337 100644 --- a/MP-ADM/MP-ADM.csproj +++ b/MP-ADM/MP-ADM.csproj @@ -507,6 +507,9 @@ + + Always + @@ -591,9 +594,13 @@ + + + + @@ -893,6 +900,13 @@ MoonPro_noAjax.master + + cmp_fileUpload.ascx + ASPXCodeBehind + + + cmp_fileUpload.ascx + cmp_HwSwInfo.ascx ASPXCodeBehind @@ -914,6 +928,27 @@ cmp_numRow.ascx + + cmp_ST_detail.ascx + ASPXCodeBehind + + + cmp_ST_detail.ascx + + + cmp_ST_objView.ascx + ASPXCodeBehind + + + cmp_ST_objView.ascx + + + cmp_ST_preview.ascx + ASPXCodeBehind + + + cmp_ST_preview.ascx + cmp_TechSheetArt.ascx ASPXCodeBehind diff --git a/MP-ADM/WebUserControls/cmp_ImageArchive.ascx b/MP-ADM/WebUserControls/cmp_ImageArchive.ascx index e6289bc6..a191516f 100644 --- a/MP-ADM/WebUserControls/cmp_ImageArchive.ascx +++ b/MP-ADM/WebUserControls/cmp_ImageArchive.ascx @@ -1,7 +1,10 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_ImageArchive.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_ImageArchive" %> - + + <%--Carica --%> + + Ricerca [ALT-T] @@ -12,7 +15,7 @@ - + col @@ -21,14 +24,14 @@ - + - + - max + show max diff --git a/MP-ADM/WebUserControls/cmp_ImageArchive.ascx.cs b/MP-ADM/WebUserControls/cmp_ImageArchive.ascx.cs index c30f18ce..129fb403 100644 --- a/MP-ADM/WebUserControls/cmp_ImageArchive.ascx.cs +++ b/MP-ADM/WebUserControls/cmp_ImageArchive.ascx.cs @@ -72,7 +72,7 @@ namespace MP_ADM.WebUserControls List answ = new List(); try { - searchVal = string.IsNullOrEmpty(searchVal) ? "*" : searchVal; + searchVal = string.IsNullOrEmpty(searchVal) ? "*" : $"*{searchVal}*"; var tabFiles = Directory.GetFiles(dirPath, searchVal); foreach (var item in tabFiles) { diff --git a/MP-ADM/WebUserControls/cmp_ST_detail.ascx b/MP-ADM/WebUserControls/cmp_ST_detail.ascx new file mode 100644 index 00000000..ed00be92 --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_ST_detail.ascx @@ -0,0 +1,26 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_ST_detail.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_ST_detail" %> +<%@ Register Src="~/WebUserControls/cmp_ST_objView.ascx" TagPrefix="uc1" TagName="cmp_ST_objView" %> + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MP-ADM/WebUserControls/cmp_ST_detail.ascx.cs b/MP-ADM/WebUserControls/cmp_ST_detail.ascx.cs new file mode 100644 index 00000000..27bf27c0 --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_ST_detail.ascx.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace MP_ADM.WebUserControls +{ + public partial class cmp_ST_detail : BaseUserControl + { + #region Public Properties + + public string CodArticolo + { + get + { + return hfCodArticolo.Value.Trim(); + } + set + { + hfCodArticolo.Value = value.Trim(); + } + } + + public string CodGruppo + { + get + { + return hfCodGruppo.Value.Trim(); + } + set + { + hfCodGruppo.Value = value.Trim(); + } + } + + #endregion Public Properties + + #region Private Methods + + /// + /// check ODL presente + /// + private void fixWarning() + { + if (idxMacchina == "") + { + lblWarning.Text = traduci("MancaMacchina"); + lblWarning.Visible = true; + } + else if (idxOdl == 0) + { + lblWarning.Text = traduci("MancaOdl"); + lblWarning.Visible = true; + } + else + { + lblWarning.Text = ""; + lblWarning.Visible = false; + } + } + + #endregion Private Methods + + #region Protected Methods + + protected void Page_Load(object sender, EventArgs e) + { + fixWarning(); + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP-ADM/WebUserControls/cmp_ST_detail.ascx.designer.cs b/MP-ADM/WebUserControls/cmp_ST_detail.ascx.designer.cs new file mode 100644 index 00000000..50fef289 --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_ST_detail.ascx.designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace MP_ADM.WebUserControls +{ + + + public partial class cmp_ST_detail + { + + /// + /// Controllo lblWarning. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblWarning; + + /// + /// Controllo repDetail. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Repeater repDetail; + + /// + /// Controllo ods. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// Controllo hfCodGruppo. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfCodGruppo; + + /// + /// Controllo hfCodArticolo. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfCodArticolo; + } +} diff --git a/MP-ADM/WebUserControls/cmp_ST_objView.ascx b/MP-ADM/WebUserControls/cmp_ST_objView.ascx new file mode 100644 index 00000000..5faf2d40 --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_ST_objView.ascx @@ -0,0 +1,24 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_ST_objView.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_ST_objView" %> + + + + + + + + <%: hfLabel.Value %> + + + <%: hfValue.Value %> + + + + + + + <%: hfLabel.Value %> + + + + + \ No newline at end of file diff --git a/MP-ADM/WebUserControls/cmp_ST_objView.ascx.cs b/MP-ADM/WebUserControls/cmp_ST_objView.ascx.cs new file mode 100644 index 00000000..53c5c869 --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_ST_objView.ascx.cs @@ -0,0 +1,188 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace MP_ADM.WebUserControls +{ + public partial class cmp_ST_objView : BaseUserControl + { + #region Public Properties + + public string dataCss + { + get + { + string answ = ""; + if (required) + { + if (dataValue != extCode) + { + answ = " text-danger"; + } + else + { + answ = " text-success"; + } + } + return answ; + } + } + + public string dataLabel + { + get + { + return hfLabel.Value.Trim(); + } + set + { + hfLabel.Value = value.Trim(); + } + } + + public string dataType + { + get + { + return hfType.Value.Trim(); + } + set + { + hfType.Value = value.Trim(); + fixDisplay(); + } + } + + public string dataValue + { + get + { + return hfValue.Value.Trim(); + } + set + { + hfValue.Value = value.Trim(); + } + } + + public string extCode + { + get + { + return hfExtCode.Value.Trim(); + } + set + { + hfExtCode.Value = value.Trim(); + fixDisplay(); + } + } + + /// + /// Url immagine SE richiesta + /// + public string imageUrl + { + get + { + string imgPath = ""; + string fullPath = ""; + //check type... + if (dataType == "IMG") + { + imgPath = dataValue; + if (!Path.IsPathRooted(imgPath)) + { + // aggiungo base path + imgPath = $"~\\images\\ST_img\\{imgPath}"; + } + fullPath = Server.MapPath(imgPath); + // verifico esistenza file... + if (!File.Exists(fullPath)) + { + // metto segnaposto empty + imgPath = "~\\images\\ST_img\\Steamware.png"; + } + } + return imgPath; + } + } + + public bool required + { + get + { + bool answ = false; + bool.TryParse(hfRequired.Value.Trim(), out answ); + return answ; + } + set + { + hfRequired.Value = value.ToString(); + fixDisplay(); + } + } + + public bool showCheckedData + { + get + { + bool answ = false; + if (required && (dataValue == extCode)) + { + answ = true; + } + return answ; + } + } + + public bool showMissingData + { + get + { + bool answ = false; + if (required && (dataValue != extCode)) + { + answ = true; + } + return answ; + } + } + + #endregion Public Properties + + #region Private Methods + + private void fixDisplay() + { + divImg.Visible = false; + divTxt.Visible = false; + switch (dataType) + { + case "IMG": + divImg.Visible = true; + break; + + case "TXT": + default: + divTxt.Visible = true; + break; + } + lblError.Visible = showMissingData; + lblChecked.Visible = showCheckedData; + } + + #endregion Private Methods + + #region Protected Methods + + protected void Page_Load(object sender, EventArgs e) + { + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP-ADM/WebUserControls/cmp_ST_objView.ascx.designer.cs b/MP-ADM/WebUserControls/cmp_ST_objView.ascx.designer.cs new file mode 100644 index 00000000..41053352 --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_ST_objView.ascx.designer.cs @@ -0,0 +1,107 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace MP_ADM.WebUserControls +{ + + + public partial class cmp_ST_objView + { + + /// + /// Controllo hfType. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfType; + + /// + /// Controllo hfLabel. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfLabel; + + /// + /// Controllo hfValue. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfValue; + + /// + /// Controllo hfRequired. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfRequired; + + /// + /// Controllo hfExtCode. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfExtCode; + + /// + /// Controllo divTxt. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTxt; + + /// + /// Controllo lblError. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblError; + + /// + /// Controllo lblChecked. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblChecked; + + /// + /// Controllo divImg. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divImg; + + /// + /// Controllo imgData. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Image imgData; + } +} diff --git a/MP-ADM/WebUserControls/cmp_ST_preview.ascx b/MP-ADM/WebUserControls/cmp_ST_preview.ascx new file mode 100644 index 00000000..7c527af9 --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_ST_preview.ascx @@ -0,0 +1,36 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_ST_preview.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_ST_preview" %> +<%@ Register Src="~/WebUserControls/cmp_ST_detail.ascx" TagPrefix="uc1" TagName="cmp_ST_detail" %> + + + + + + Scheda Tecnica + + + reset + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs b/MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs new file mode 100644 index 00000000..dc979584 --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace MP_ADM.WebUserControls +{ + public partial class cmp_ST_preview : BaseUserControl + { + #region Public Properties + + public string CodArticolo + { + get + { + return hfCodArticolo.Value.Trim(); + } + set + { + string newVal = value.Trim(); + hfCodArticolo.Value = newVal; + cmp_ST_objCheck.CodArticolo = newVal; + // se ho articolo FIX DISPLAY! + if (!string.IsNullOrEmpty(newVal)) + { + repGroup.DataBind(); + } + } + } + + #endregion Public Properties + + #region Private Methods + + /// + /// Verifica visibilità reset + /// + private void checkReset() + { + // condizioni booleane + bool inAttr = false; + // SOLO SE ho articolo sennò niente reset... + if (!string.IsNullOrEmpty(CodArticolo)) + { + // controllo se la macchina è in attrezzaggio... + DS_applicazione.StatoMacchineRow rigaStato = null; + try + { + // se è multi controllo parent... + if (isMulti) + { + rigaStato = selData.mng.rigaStato(idxMaccParent); + } + else + { + rigaStato = selData.mng.rigaStato(idxMacchinaFix); + } + if (rigaStato != null) + { + inAttr = (rigaStato.IdxStato == 2); + } + } + catch + { } + } + lbtClearOdl.Visible = inAttr; + } + + private void cmp_ST_objCheck_eh_doUpdate(object sender, EventArgs e) + { + repGroup.DataBind(); + checkReset(); + } + + #endregion Private Methods + + #region Protected Methods + + protected void lbtClearOdl_Click(object sender, EventArgs e) + { + // chiamo stored x ripulire dati check già caricati + DataLayerObj.taSTChk.cleanByOdl(idxOdl); + // sollevo evento + repGroup.DataBind(); + reportUpdate(); + checkReset(); + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + lbtClearOdl.DataBind(); + } + cmp_ST_objCheck.eh_doUpdate += cmp_ST_objCheck_eh_doUpdate; + checkReset(); + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP-ADM/WebUserControls/cmp_ST_preview.ascx.designer.cs b/MP-ADM/WebUserControls/cmp_ST_preview.ascx.designer.cs new file mode 100644 index 00000000..58fef493 --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_ST_preview.ascx.designer.cs @@ -0,0 +1,53 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace MP_ADM.WebUserControls +{ + + + public partial class cmp_ST_preview + { + + /// + /// Controllo lbtClearOdl. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtClearOdl; + + /// + /// Controllo repGroup. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Repeater repGroup; + + /// + /// Controllo odsGroup. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsGroup; + + /// + /// Controllo hfCodArticolo. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfCodArticolo; + } +} diff --git a/MP-ADM/WebUserControls/cmp_TechSheetDetail.ascx b/MP-ADM/WebUserControls/cmp_TechSheetDetail.ascx index a9604d54..e88def01 100644 --- a/MP-ADM/WebUserControls/cmp_TechSheetDetail.ascx +++ b/MP-ADM/WebUserControls/cmp_TechSheetDetail.ascx @@ -42,12 +42,12 @@ + <%----%> <%----%> -