From 0a9b07fb9a3bc677a238a1435c8f4532977bcfa0 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 15 Mar 2021 19:06:43 +0100 Subject: [PATCH] spostamento procedura plan (preliminare) --- MP-ADM/WebUserControls/cmp_PODL_OUT.ascx | 6 +- MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.cs | 12 +- MP-ADM/WebUserControls/cmp_planSchedule.ascx | 20 ++++ .../WebUserControls/cmp_planSchedule.ascx.cs | 107 ++++++++++++++++++ .../cmp_planSchedule.ascx.designer.cs | 53 +++++++++ 5 files changed, 190 insertions(+), 8 deletions(-) create mode 100644 MP-ADM/WebUserControls/cmp_planSchedule.ascx create mode 100644 MP-ADM/WebUserControls/cmp_planSchedule.ascx.cs create mode 100644 MP-ADM/WebUserControls/cmp_planSchedule.ascx.designer.cs diff --git a/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx b/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx index 72a8caa4..c1448d32 100644 --- a/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx +++ b/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx @@ -114,10 +114,10 @@
- - - + + +
diff --git a/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.cs b/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.cs index 7eccd990..867c0dfc 100644 --- a/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.cs +++ b/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.cs @@ -76,7 +76,7 @@ namespace MP_ADM.WebUserControls /// /// IdxMacchina filtrata /// - public string IdxMacchina + public string IdxMacchinaFilt { get { @@ -357,7 +357,7 @@ namespace MP_ADM.WebUserControls /// public bool checkChgPrio(string IdxMacchina, string priorStr, int delta) { - bool answ = false; + bool enableChgPrio = false; int priorita = 0; int.TryParse(priorStr, out priorita); // calcolo i limiti priorità x macchina (0 --> max x macchina)... LPI/LPS liminte priorità inferiore / superiore @@ -369,9 +369,11 @@ namespace MP_ADM.WebUserControls LPS = tabella[0].Priorita; } // è ok SE sono ENTRO i 2 limiti - answ = ((priorita + delta) >= LPI && (priorita + delta) <= LPS); - //return - return answ; + enableChgPrio = ((priorita + delta) >= LPI && (priorita + delta) <= LPS); + + bool onlyProgrammed = chkUnassigned.Checked; + bool singleMachine = !string.IsNullOrEmpty(IdxMacchinaFilt) && IdxMacchinaFilt == IdxMacchina; + return enableChgPrio && onlyProgrammed && singleMachine; } public string cssByAtt(object currAtt) diff --git a/MP-ADM/WebUserControls/cmp_planSchedule.ascx b/MP-ADM/WebUserControls/cmp_planSchedule.ascx new file mode 100644 index 00000000..c1c68113 --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_planSchedule.ascx @@ -0,0 +1,20 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_planSchedule.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_planSchedule" %> +<%@ Register Src="~/WebUserControls/cmp_PODL_OUT.ascx" TagPrefix="uc1" TagName="cmp_PODL_OUT" %> + +
+
+
+
+
Pianificazione
+
+
+
+
+ +
+
+
+
+ +
+
\ No newline at end of file diff --git a/MP-ADM/WebUserControls/cmp_planSchedule.ascx.cs b/MP-ADM/WebUserControls/cmp_planSchedule.ascx.cs new file mode 100644 index 00000000..18198b59 --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_planSchedule.ascx.cs @@ -0,0 +1,107 @@ +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_planSchedule : BaseUserControl + { + #region Public Properties + + /// + /// CodArticoloo selezionato in GridView + /// + public string CodArticolo + { + set + { + cmp_PODL_OUT.CodArticolo = value; + } + } + + /// + /// CodCliente selezionato in GridView + /// + public string CodCliente + { + set + { + cmp_PODL_OUT.CodCliente = value; + } + } + + /// + /// CodFase selezionato in GridView + /// + public string CodFase + { + set + { + cmp_PODL_OUT.CodGruppo = value; + } + } + + /// + /// IdxMacchina selezionato in GridView + /// + public string IdxMacchina + { + set + { + cmp_PODL_OUT.IdxMacchinaFilt = value; + } + } + + #endregion Public Properties + + #region Private Methods + + private void Cmp_PODL_OUT_eh_nuovoValore(object sender, EventArgs e) + { + raiseNewVal(); + } + + private void toggleVisibility() + { + divPromOUT.Visible = !divPromOUT.Visible; + tgIcon.Attributes["class"] = divPromOUT.Visible ? "fa fa-chevron-up" : "fa fa-chevron-down"; + } + + #endregion Private Methods + + #region Protected Methods + + protected void lbtToggle_Click(object sender, EventArgs e) + { + toggleVisibility(); + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + toggleVisibility(); + } + cmp_PODL_OUT.eh_nuovoValore += Cmp_PODL_OUT_eh_nuovoValore; + } + + #endregion Protected Methods + + #region Public Methods + + public void doReset() + { + cmp_PODL_OUT.resetSelezione(); + } + + public void doUpdate() + { + cmp_PODL_OUT.doUpdate(); + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/MP-ADM/WebUserControls/cmp_planSchedule.ascx.designer.cs b/MP-ADM/WebUserControls/cmp_planSchedule.ascx.designer.cs new file mode 100644 index 00000000..7407451d --- /dev/null +++ b/MP-ADM/WebUserControls/cmp_planSchedule.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_planSchedule + { + + /// + /// Controllo lbtToggle. + /// + /// + /// 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 lbtToggle; + + /// + /// Controllo tgIcon. + /// + /// + /// 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 tgIcon; + + /// + /// Controllo divPromOUT. + /// + /// + /// 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 divPromOUT; + + /// + /// Controllo cmp_PODL_OUT. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MP_ADM.WebUserControls.cmp_PODL_OUT cmp_PODL_OUT; + } +}