From 08de3c40ced12cd6afd4e67f008bbc651303b6ec Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 31 Dec 2019 10:11:30 +0100 Subject: [PATCH] Continuo aggiunta pagine a progetto... mancano conf web.config... --- ES3/ES3.csproj | 88 +++ ES3/HwSwInfo.aspx | 7 + ES3/HwSwInfo.aspx.cs | 17 + ES3/HwSwInfo.aspx.designer.cs | 26 + ES3/Planner.aspx | 41 ++ ES3/Planner.aspx.cs | 78 ++ ES3/Planner.aspx.designer.cs | 87 +++ ES3/WebUserControls/mod_gestPromODL_OUT.ascx | 248 +++++++ .../mod_gestPromODL_OUT.ascx.cs | 693 ++++++++++++++++++ .../mod_gestPromODL_OUT.ascx.designer.cs | 231 ++++++ ES3/WebUserControls/mod_login.ascx | 74 ++ ES3/WebUserControls/mod_login.ascx.cs | 309 ++++++++ .../mod_login.ascx.designer.cs | 140 ++++ ES3/WebUserControls/mod_main_help.ascx | 91 +++ ES3/WebUserControls/mod_main_help.ascx.cs | 63 ++ .../mod_main_help.ascx.designer.cs | 112 +++ ES3/WebUserControls/mod_newPromessaODL.ascx | 193 +++++ .../mod_newPromessaODL.ascx.cs | 308 ++++++++ .../mod_newPromessaODL.ascx.designer.cs | 204 ++++++ ES3/WebUserControls/mod_planCreate.ascx | 171 +++++ ES3/WebUserControls/mod_planCreate.ascx.cs | 313 ++++++++ .../mod_planCreate.ascx.designer.cs | 177 +++++ ES3/WebUserControls/mod_planStats.ascx | 199 +++++ ES3/WebUserControls/mod_planStats.ascx.cs | 202 +++++ .../mod_planStats.ascx.designer.cs | 159 ++++ ES3/login.aspx | 8 + ES3/login.aspx.cs | 48 ++ ES3/login.aspx.designer.cs | 24 + ES3/menu.aspx | 8 + ES3/menu.aspx.cs | 6 + ES3/menu.aspx.designer.cs | 24 + ES3/test.aspx | 46 ++ ES3/test.aspx.cs | 9 + ES3/test.aspx.designer.cs | 59 ++ 34 files changed, 4463 insertions(+) create mode 100644 ES3/HwSwInfo.aspx create mode 100644 ES3/HwSwInfo.aspx.cs create mode 100644 ES3/HwSwInfo.aspx.designer.cs create mode 100644 ES3/Planner.aspx create mode 100644 ES3/Planner.aspx.cs create mode 100644 ES3/Planner.aspx.designer.cs create mode 100644 ES3/WebUserControls/mod_gestPromODL_OUT.ascx create mode 100644 ES3/WebUserControls/mod_gestPromODL_OUT.ascx.cs create mode 100644 ES3/WebUserControls/mod_gestPromODL_OUT.ascx.designer.cs create mode 100644 ES3/WebUserControls/mod_login.ascx create mode 100644 ES3/WebUserControls/mod_login.ascx.cs create mode 100644 ES3/WebUserControls/mod_login.ascx.designer.cs create mode 100644 ES3/WebUserControls/mod_main_help.ascx create mode 100644 ES3/WebUserControls/mod_main_help.ascx.cs create mode 100644 ES3/WebUserControls/mod_main_help.ascx.designer.cs create mode 100644 ES3/WebUserControls/mod_newPromessaODL.ascx create mode 100644 ES3/WebUserControls/mod_newPromessaODL.ascx.cs create mode 100644 ES3/WebUserControls/mod_newPromessaODL.ascx.designer.cs create mode 100644 ES3/WebUserControls/mod_planCreate.ascx create mode 100644 ES3/WebUserControls/mod_planCreate.ascx.cs create mode 100644 ES3/WebUserControls/mod_planCreate.ascx.designer.cs create mode 100644 ES3/WebUserControls/mod_planStats.ascx create mode 100644 ES3/WebUserControls/mod_planStats.ascx.cs create mode 100644 ES3/WebUserControls/mod_planStats.ascx.designer.cs create mode 100644 ES3/login.aspx create mode 100644 ES3/login.aspx.cs create mode 100644 ES3/login.aspx.designer.cs create mode 100644 ES3/menu.aspx create mode 100644 ES3/menu.aspx.cs create mode 100644 ES3/menu.aspx.designer.cs create mode 100644 ES3/test.aspx create mode 100644 ES3/test.aspx.cs create mode 100644 ES3/test.aspx.designer.cs diff --git a/ES3/ES3.csproj b/ES3/ES3.csproj index 367d3d32..0bd8712a 100644 --- a/ES3/ES3.csproj +++ b/ES3/ES3.csproj @@ -222,6 +222,10 @@ + + + + @@ -245,13 +249,20 @@ + + + + + + + @@ -401,6 +412,34 @@ Global.asax + + HwSwInfo.aspx + ASPXCodeBehind + + + HwSwInfo.aspx + + + login.aspx + ASPXCodeBehind + + + login.aspx + + + menu.aspx + ASPXCodeBehind + + + menu.aspx + + + Planner.aspx + ASPXCodeBehind + + + Planner.aspx + Site.Master @@ -416,6 +455,13 @@ Site.Mobile.Master + + test.aspx + ASPXCodeBehind + + + test.aspx + ViewSwitcher.ascx ASPXCodeBehind @@ -437,6 +483,27 @@ mod_footer.ascx + + mod_gestPromODL_OUT.ascx + ASPXCodeBehind + + + mod_gestPromODL_OUT.ascx + + + mod_login.ascx + ASPXCodeBehind + + + mod_login.ascx + + + mod_main_help.ascx + ASPXCodeBehind + + + mod_main_help.ascx + mod_menuTop.ascx ASPXCodeBehind @@ -479,6 +546,13 @@ mod_menuBottom.ascx + + mod_newPromessaODL.ascx + ASPXCodeBehind + + + mod_newPromessaODL.ascx + mod_pageTitleAndSearch.ascx ASPXCodeBehind @@ -486,6 +560,20 @@ mod_pageTitleAndSearch.ascx + + mod_planCreate.ascx + ASPXCodeBehind + + + mod_planCreate.ascx + + + mod_planStats.ascx + ASPXCodeBehind + + + mod_planStats.ascx + mod_ricercaGenerica.ascx ASPXCodeBehind diff --git a/ES3/HwSwInfo.aspx b/ES3/HwSwInfo.aspx new file mode 100644 index 00000000..cc11a45e --- /dev/null +++ b/ES3/HwSwInfo.aspx @@ -0,0 +1,7 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" CodeBehind="HwSwInfo.aspx.cs" Inherits="ES3.HwSwInfo" %> + +<%@ Register Src="~/WebUserControls/cmp_HwSwInfo.ascx" TagPrefix="uc1" TagName="cmp_HwSwInfo" %> + + + + diff --git a/ES3/HwSwInfo.aspx.cs b/ES3/HwSwInfo.aspx.cs new file mode 100644 index 00000000..4873e218 --- /dev/null +++ b/ES3/HwSwInfo.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace ES3 +{ + public partial class HwSwInfo : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/ES3/HwSwInfo.aspx.designer.cs b/ES3/HwSwInfo.aspx.designer.cs new file mode 100644 index 00000000..7b4d6db0 --- /dev/null +++ b/ES3/HwSwInfo.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 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 ES3 +{ + + + public partial class HwSwInfo + { + + /// + /// Controllo cmp_HwSwInfo. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::ES3.WebUserControls.cmp_HwSwInfo cmp_HwSwInfo; + } +} diff --git a/ES3/Planner.aspx b/ES3/Planner.aspx new file mode 100644 index 00000000..736689e8 --- /dev/null +++ b/ES3/Planner.aspx @@ -0,0 +1,41 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" CodeBehind="Planner.aspx.cs" Inherits="ES3.Planner" %> + +<%@ Register Src="~/WebUserControls/mod_planStats.ascx" TagPrefix="uc1" TagName="mod_planStats" %> +<%@ Register Src="~/WebUserControls/mod_planCreate.ascx" TagPrefix="uc1" TagName="mod_planCreate" %> +<%@ Register Src="~/WebUserControls/mod_gestPromODL_OUT.ascx" TagPrefix="uc1" TagName="mod_gestPromODL_OUT" %> + + + + + + + + +
+ + +
+
+
+
+
Pianificazione
+
+
+
+
+ +
+
+
+
+ <%--
+ rivedere il discorso dei FREEPASS autogenerati... x filtrare x TIPO creazione +
+ ordinare SEMPRE x priorità ASC (FIFO) e indicarlo!!! +
+ togliere filtri da header e/o gestione toggle e/o nascondere creazione promessa?--%> + +
+
+
+
diff --git a/ES3/Planner.aspx.cs b/ES3/Planner.aspx.cs new file mode 100644 index 00000000..d32adde3 --- /dev/null +++ b/ES3/Planner.aspx.cs @@ -0,0 +1,78 @@ +using SteamWare; +using System; + +namespace ES3 +{ + public partial class Planner : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + toggleVisibility(); + } + checkEnabled(); + string codPre = memLayer.ML.CRS("OptAdmKit_CodPre"); + mod_planStats.eh_reset += Mod_planStats_eh_reset; + mod_planStats.eh_selVal += Mod_planStats_eh_selVal; + mod_planCreate.eh_ucev += Mod_planCreate_eh_ucev; + } + + private void Mod_planCreate_eh_ucev(object sender, EventArgs e) + { + // se trovo evento select/reset mostro/nascondo dettagli... + ucEvent evento = (ucEvent)e; + switch (evento.tipoEvento) + { + case ucEvType.ReqUpdateParent: + mod_planStats.doReset(); + mod_gestPromODL_OUT.resetSelezione(); + break; + default: + break; + } + } + + protected void lbtToggle_Click(object sender, EventArgs e) + { + toggleVisibility(); + } + + private void toggleVisibility() + { + divPromOUT.Visible = !divPromOUT.Visible; + tgIcon.Attributes["class"] = divPromOUT.Visible ? "fa fa-chevron-up" : "fa fa-chevron-down"; + } + private void Mod_planStats_eh_selVal(object sender, EventArgs e) + { + fixSelStat(); + } + + private void Mod_planStats_eh_reset(object sender, EventArgs e) + { + fixSelStat(); + } + + protected void fixSelStat() + { + mod_planCreate.CodGruppo = mod_planStats.CodGruppo; + mod_planCreate.IdxMacchina = mod_planStats.IdxMacchina; + mod_planCreate.CodArticolo = mod_planStats.CodArticolo; + mod_planCreate.doUpdate(); + } + + private void checkEnabled() + { + bool optPar = memLayer.ML.CRB("OptAdmKitEnabled"); + divContent.Visible = optPar; + lblDataImportOut.Visible = !optPar; + string messaggio = ""; + if (!optPar) + { + messaggio = "Attenzione: Gestione KIT disabilitata"; + lblDataImportOut.Text = messaggio; + } + } + + } +} \ No newline at end of file diff --git a/ES3/Planner.aspx.designer.cs b/ES3/Planner.aspx.designer.cs new file mode 100644 index 00000000..fd505004 --- /dev/null +++ b/ES3/Planner.aspx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// +// 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 ES3 { + + + public partial class Planner { + + /// + /// Controllo lblDataImportOut. + /// + /// + /// 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 lblDataImportOut; + + /// + /// Controllo divContent. + /// + /// + /// 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 divContent; + + /// + /// Controllo mod_planStats. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::ES3.WebUserControls.mod_planStats mod_planStats; + + /// + /// Controllo mod_planCreate. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::ES3.WebUserControls.mod_planCreate mod_planCreate; + + /// + /// 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 mod_gestPromODL_OUT. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::ES3.WebUserControls.mod_gestPromODL_OUT mod_gestPromODL_OUT; + } +} diff --git a/ES3/WebUserControls/mod_gestPromODL_OUT.ascx b/ES3/WebUserControls/mod_gestPromODL_OUT.ascx new file mode 100644 index 00000000..7bdf234a --- /dev/null +++ b/ES3/WebUserControls/mod_gestPromODL_OUT.ascx @@ -0,0 +1,248 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestPromODL_OUT.ascx.cs" Inherits="ES3.WebUserControls.mod_gestPromODL_OUT" %> + +<%@ Register Src="~/WebUserControls/mod_newPromessaODL.ascx" TagPrefix="uc1" TagName="mod_newPromessaODL" %> + +
+
+
+
+

Filtri attivi

+
+
+ REPARTO +
+ + + + +
+
+
+
+ Articolo + + +
+
+
+
+
+
+ Macchina + + +
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+ PROMESSA ODL +
+
+
+ +
+
+
+
+ Modifica +
+
+ # Pezzi Richiesti: + +
+
+ Pezzi Pallet: + +
+
+ Annulla +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + <%# Eval("CodArticolo") %> + +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ + + + + <%# Eval("Nome") %> +
<%# Eval("CodMacchina") %>
+
+
+
+ + + + + + + + + + + +
+ + (m:s) +
+
+
+ + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ diff --git a/ES3/WebUserControls/mod_gestPromODL_OUT.ascx.cs b/ES3/WebUserControls/mod_gestPromODL_OUT.ascx.cs new file mode 100644 index 00000000..537fea35 --- /dev/null +++ b/ES3/WebUserControls/mod_gestPromODL_OUT.ascx.cs @@ -0,0 +1,693 @@ +using MapoDb; +using SteamWare; +using System; +using System.Data; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace ES3.WebUserControls +{ + public partial class mod_gestPromODL_OUT : System.Web.UI.UserControl + { + /// + /// Determina se sia solo readonly il controllo... + /// + public bool readOnly; + /// + /// Chiave PRE selezione tipo richiesta ordine + /// + public string codOrdPre + { + get + { + return hfCodPre.Value.Trim(); + } + set + { + hfCodPre.Value = value; + } + } + /// + /// dimensione pagina + /// + public int pageSize + { + get + { + int answ = 10; + try + { + answ = Convert.ToInt32(txtPageSize.Text); + } + catch + { } + return answ; + } + set + { + txtPageSize.Text = value.ToString(); + } + } + + /// + /// Abilitazione modifica selettore fase + /// + public bool enableSelFase + { + get + { + return ddlCodGruppo.Enabled; + } + set + { + ddlCodGruppo.Enabled = value; + } + } + /// + /// Gruppo selezionato + /// + public string CodGruppo + { + get + { + return ddlCodGruppo.SelectedValue; + } + set + { + ddlCodGruppo.SelectedValue = value; + } + } + + #region area da NON modificare + + #region area protected + + protected string _idxGridView; + + /// + /// reset della selezione + /// + /// + /// + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + + /// + /// salvo comando + /// + /// + /// + protected void lbt_Command(object sender, CommandEventArgs e) + { + SteamWare.memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument); + } + /// + /// gestione cambio selezione valore + /// + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // salvo in session il valore selezionato... + memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false); + bool doClone = false; + bool doEdit = false; + // gestione buttons richieste + string _comando = ""; + if (memLayer.ML.isInSessionObject("nextObjCommand")) + { + _comando = memLayer.ML.StringSessionObj("nextObjCommand"); + memLayer.ML.emptySessionVal("nextObjCommand"); + } + switch (_comando) + { + case "Clona": + doClone = true; + break; + case "Edit": + doEdit = true; + break; + default: + break; + } + if (doClone) + { + memLayer.ML.setSessionVal("idxProm2Clone", grView.SelectedValue, false); + showAddNewPODL(); + mod_newPromessaODL.doSelPODL(); + } + else if (doEdit) + { + memLayer.ML.setSessionVal("idxProm2Edit", grView.SelectedValue, false); + showAddNewPODL(); + mod_newPromessaODL.doSelPODL(); + } + else + { + // mostro edit quantità... + divEditQta.Visible = true; + lbtNewPODL.Visible = true; + mod_newPromessaODL.Visible = false; + var riga = DataLayer.obj.taPODL.getByKey(idxPOdlSel)[0]; + numPz = riga.NumPezzi; + pzPallet = riga.PzPallet; + } + } + /// + /// traduce gli header delle colonne + /// + /// + /// + protected void grView_DataBound(object sender, EventArgs e) + { + if (grView.Rows.Count > 0) + { + LinkButton lb; + // aggiorno gli headers + foreach (TableCell cella in grView.HeaderRow.Cells) + { + try + { + lb = (LinkButton)cella.Controls[0]; + lb.Text = traduci(lb.Text); + } + catch + { } + } + int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); + lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); + } + else + { + lblNumRec.Text = ""; + } + } + /// + /// recupera i dati di un nuovo record contenuti nel footer di un gridView; + /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...) + /// + /// + /// + protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e) + { + //recupero la riga footer... + DataColumnCollection colonne = colonneObj(); + string nomeCol; + string tipoColonna = ""; + foreach (DataColumn colonna in colonne) + { + nomeCol = colonna.ColumnName; + // cerco un textbox o quello che sia... + if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null) + { + tipoColonna = "textBox"; + } + else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null) + { + tipoColonna = "dropDownList"; + } + else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null) + { + tipoColonna = "checkBox"; + } + else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null) + { + tipoColonna = "selAjax"; + } + // in base al tipo salvo negli inputparameters dell'ODS + switch (tipoColonna) + { + case "textBox": + e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text; + break; + case "dropDownList": + e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue; + break; + case "checkBox": + e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked; + break; + //case "selAjax": + // e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore; + // break; + default: + break; + } + tipoColonna = ""; + } + } + /// + /// svuoto da cache post update + /// + /// + /// + protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) + { + // evento come nuovo... + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } + } + + #endregion + + #region are public + + /// + /// effettua traduzione del lemma + /// + /// + /// + public string traduci(string lemma) + { + return user_std.UtSn.Traduci(lemma); + } + /// + /// effettua traduzione in inglese del lemma + /// + /// + /// + public string traduciEn(string lemma) + { + return user_std.UtSn.TraduciEn(lemma); + } + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); + grView.SelectedIndex = -1; + grView.DataBind(); + divEditQta.Visible = false; + mod_newPromessaODL.Visible = false; + lbtNewPODL.Visible = true; + lblWarning.Visible = false; + if (eh_resetSelezione != null) + { + eh_resetSelezione(this, new EventArgs()); + } + + } + #endregion + + #endregion + + #region gestione eventi + + public event EventHandler eh_resetSelezione; + public event EventHandler eh_nuovoValore; + + #endregion + + #region area da modificare + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + if (!Page.IsPostBack) + { + mod_newPromessaODL.Visible = false; + grView.PageSize = pageSize; + // se ho in sessione selezione la recupero... + if (memLayer.ML.isInSessionObject("selFaseBCode") && enableSelFase) + { + ddlCodGruppo.SelectedValue = memLayer.ML.StringSessionObj("selFaseBCode"); + } + } + mod_newPromessaODL.eh_nuovoValore += new EventHandler(mod_newOdl1_eh_nuovoValore); + } + + /// inizializzazione valori di default + /// + /// + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + _idxGridView = "IdxODL"; + } + /// + /// nuovo valore creato... + /// + /// + /// + void mod_newOdl1_eh_nuovoValore(object sender, EventArgs e) + { + // nascondo controllo e mostro button + mod_newPromessaODL.Visible = false; + lbtNewPODL.Visible = true; + // aggiorno! + resetSelezione(); + } + + /// + /// elenco colonne del datagrid + /// + /// + protected DataColumnCollection colonneObj() + { + MapoDb.DS_ProdTempi.ODLDataTable tabella = new MapoDb.DS_ProdTempi.ODLDataTable(); + DataColumnCollection colonne = tabella.Columns; + return colonne; + } + public bool delEnabled(object _idxOdl) + { + bool answ = false; + int idxOdl = 0; + // controllo non sia già stata iniziata la produzione sennò non posso cancellare... + try + { + idxOdl = Convert.ToInt32(_idxOdl); + answ = (MapoDb.DataLayer.obj.taODL.getByIdx(idxOdl, true).Count > 0); + } + catch + { } + return answ; + } + /// + /// mostra creazione nuovo ODL + /// + /// + /// + protected void lbtNewPODL_Click(object sender, EventArgs e) + { + showAddNewPODL(); + } + + private void showAddNewPODL() + { + // mostro controllo creazione ODL + mod_newPromessaODL.Visible = true; + divEditQta.Visible = false; + lbtNewPODL.Visible = false; + grView.SelectedIndex = -1; + grView.DataBind(); + } + + /// + /// formatot url x stampa ODL + /// + /// + /// + public string formattaUrlOdl(object idx) + { + string answ = String.Format(memLayer.ML.CRS("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx); + return answ; + } + + /// + /// cambio dim pagina + /// + /// + /// + protected void txtPageSize_TextChanged(object sender, EventArgs e) + { + grView.PageSize = pageSize; + } + + + /// + /// elimina commento + /// + /// + /// + protected void lbtDel_Click(object sender, EventArgs e) + { + LinkButton imgBtn = (LinkButton)sender; + int IdxProm = 0; + int.TryParse(imgBtn.CommandArgument, out IdxProm); + DataLayer.obj.taPODL.deleteQuery(IdxProm); + doUpdate(); + } + + protected void doUpdate() + { + updateGrView(); + } + + #endregion + + protected void btnOk_Click(object sender, EventArgs e) + { + if (idxPOdlSel > 0) + { + DataLayer.obj.taPODL.updateQta(numPz, pzPallet, idxPOdlSel); + } + updateCtrl(); + } + + private void updateCtrl() + { + divEditQta.Visible = false; + grView.SelectedIndex = -1; + grView.DataBind(); + } + /// + /// idxOdl selezionato + /// + protected int idxPOdlSel + { + get + { + int answ = 0; + try + { + answ = Convert.ToInt32(grView.SelectedValue); + } + catch + { } + return answ; + } + } + /// + /// Nuovo num pz + /// + protected int numPz + { + get + { + int answ = 0; + try + { + answ = Convert.ToInt32(txtNewQta.Text.Trim()); + } + catch + { } + return answ; + } + set + { + txtNewQta.Text = value.ToString(); + } + } + /// + /// Nuovo num pz per pallet + /// + protected int pzPallet + { + get + { + int answ = 1; + try + { + answ = Convert.ToInt32(txtNewPzPallet.Text.Trim()); + } + catch + { } + // controllo sia > 0... + if (answ < 1) + { + answ = 1; + } + + return answ; + } + set + { + txtNewPzPallet.Text = value.ToString(); + } + } + protected void btnCancel_Click(object sender, EventArgs e) + { + updateCtrl(); + } + + protected void chkUnassigned_CheckedChanged(object sender, EventArgs e) + { + updateGrView(); + } + /// + /// Aggiorno Gridview + /// + private void updateGrView() + { + grView.DataBind(); + } + /// + /// IdxMacchina filtrata + /// + protected string idxMacc + { + get + { + return lblIdxMacc.Text; + } + set + { + lblIdxMacc.Text = value; + } + } + /// + /// Nome filtrata + /// + protected string NomeMacc + { + get + { + return lblNomeMacc.Text; + } + set + { + lblNomeMacc.Text = value; + } + } + /// + /// CodArt filtrato + /// + protected string CodArt + { + get + { + return lblCodArt.Text; + } + set + { + lblCodArt.Text = value; + } + } + /// + /// CodArt filtrato + /// + protected string DescArt + { + get + { + return lblDescArt.Text; + } + set + { + lblDescArt.Text = value; + } + } + + /// + /// Selezionato un condominio --> riporto selezione + /// + /// + /// + protected void lbtSelArt_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo, splittando + string[] artData = lb.CommandArgument.Split('|'); + CodArt = artData[0]; + DescArt = artData[1]; + updateGrView(); + } + /// + /// Selezionato un condominio --> riporto selezione + /// + /// + /// + protected void lbtSelMacc_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo, splittando + string[] maccData = lb.CommandArgument.Split('|'); + idxMacc = maccData[0]; + NomeMacc = maccData[1]; + updateGrView(); + } + + /// + /// Richiesto abbassamento priorità = ANTICIPA + /// + /// + /// + protected void lnkMoveDown_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo, splittando + int IdxPromessa = 0; + int.TryParse(lb.CommandArgument, out IdxPromessa); + // chiamo stored + DataLayer.obj.taPromOut.movePrio(IdxPromessa, -1); + //update! + updateGrView(); + } + /// + /// Richiesto aumento priorità = RITARDA + /// + /// + /// + protected void lnkMoveUp_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo, splittando + int IdxPromessa = 0; + int.TryParse(lb.CommandArgument, out IdxPromessa); + // chiamo stored + DataLayer.obj.taPromOut.movePrio(IdxPromessa, 1); + //update! + updateGrView(); + } + + + protected void lbtResArt_Click(object sender, EventArgs e) + { + CodArt = ""; + DescArt = ""; + updateGrView(); + } + + protected void lbtResMacc_Click(object sender, EventArgs e) + { + idxMacc = ""; + NomeMacc = ""; + updateGrView(); + } + + protected void ddlCodGruppo_SelectedIndexChanged(object sender, EventArgs e) + { + // salvo in sessione selezione... + memLayer.ML.setSessionVal("selFaseBCode", ddlCodGruppo.SelectedValue); + } + /// + /// Verifica se sia permesso cambio priorità (NON può andare a 0 ne oltre il max x macchina) + /// + /// + /// + /// + /// + public bool checkChgPrio(string IdxMacchina, string priorStr, int delta) + { + bool answ = 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 + int LPI = 1; + int LPS = 1; + var tabella = DataLayer.obj.taPromOut.getMaxPrioByMacc(IdxMacchina, true); + if (tabella.Rows.Count > 0) + { + LPS = tabella[0].Priorita; + } + // è ok SE sono ENTRO i 2 limiti + answ = ((priorita + delta) >= LPI && (priorita + delta) <= LPS); + //return + return answ; + } + } +} \ No newline at end of file diff --git a/ES3/WebUserControls/mod_gestPromODL_OUT.ascx.designer.cs b/ES3/WebUserControls/mod_gestPromODL_OUT.ascx.designer.cs new file mode 100644 index 00000000..e1e56c26 --- /dev/null +++ b/ES3/WebUserControls/mod_gestPromODL_OUT.ascx.designer.cs @@ -0,0 +1,231 @@ +//------------------------------------------------------------------------------ +// +// 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 ES3.WebUserControls { + + + public partial class mod_gestPromODL_OUT { + + /// + /// Controllo ddlCodGruppo. + /// + /// + /// 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.DropDownList ddlCodGruppo; + + /// + /// Controllo odsCodGruppo. + /// + /// + /// 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 odsCodGruppo; + + /// + /// Controllo lbtResArt. + /// + /// + /// 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 lbtResArt; + + /// + /// Controllo lblCodArt. + /// + /// + /// 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 lblCodArt; + + /// + /// Controllo lblDescArt. + /// + /// + /// 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 lblDescArt; + + /// + /// Controllo lbtResMacc. + /// + /// + /// 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 lbtResMacc; + + /// + /// Controllo lblNomeMacc. + /// + /// + /// 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 lblNomeMacc; + + /// + /// Controllo lblIdxMacc. + /// + /// + /// 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 lblIdxMacc; + + /// + /// Controllo chkUnassigned. + /// + /// + /// 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.CheckBox chkUnassigned; + + /// + /// Controllo lblUnass. + /// + /// + /// 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 lblUnass; + + /// + /// Controllo lbtNewPODL. + /// + /// + /// 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 lbtNewPODL; + + /// + /// Controllo mod_newPromessaODL. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::ES3.WebUserControls.mod_newPromessaODL mod_newPromessaODL; + + /// + /// Controllo divEditQta. + /// + /// + /// 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 divEditQta; + + /// + /// Controllo lbtOk. + /// + /// + /// 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 lbtOk; + + /// + /// Controllo txtNewQta. + /// + /// + /// 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.TextBox txtNewQta; + + /// + /// Controllo txtNewPzPallet. + /// + /// + /// 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.TextBox txtNewPzPallet; + + /// + /// Controllo lbtCancel. + /// + /// + /// 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 lbtCancel; + + /// + /// Controllo grView. + /// + /// + /// 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.GridView grView; + + /// + /// 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 hfCodPre. + /// + /// + /// 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 hfCodPre; + + /// + /// 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 lblNumRec. + /// + /// + /// 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 lblNumRec; + + /// + /// 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 txtPageSize. + /// + /// + /// 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.TextBox txtPageSize; + } +} diff --git a/ES3/WebUserControls/mod_login.ascx b/ES3/WebUserControls/mod_login.ascx new file mode 100644 index 00000000..52e6a68f --- /dev/null +++ b/ES3/WebUserControls/mod_login.ascx @@ -0,0 +1,74 @@ +<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_login" Codebehind="mod_login.ascx.cs" %> + + + + + +
+ +
+ + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ +
+
+ + + + + + + + +
+ + DOMITBREMBO\WebGTD_R + DOMITBREMBO\WebGTD_W + DOMITBREMBO\WebGTD_X + DOMITBREMBO\WebGTD_A + +
+ +
+
+ + + + + + + +
+ +
+ +
diff --git a/ES3/WebUserControls/mod_login.ascx.cs b/ES3/WebUserControls/mod_login.ascx.cs new file mode 100644 index 00000000..7c5831e6 --- /dev/null +++ b/ES3/WebUserControls/mod_login.ascx.cs @@ -0,0 +1,309 @@ +using SteamWare; +using System; +using System.Web.UI; + +/// +/// classe gestione login e forzatura login +/// +public partial class mod_login : SteamWare.ApplicationUserControl +{ + #region area protected/private + + #region area proprietà + + private SteamWare.loginMode _isForceUser = SteamWare.loginMode.normale; + + #endregion + + #region area metodi + + /// + /// imposta la modalità di login tra normale / forceUser + /// + private void setLoginMode() + { + switch (_isForceUser) + { + case SteamWare.loginMode.normale: + pnlForceUser.Visible = false; + pnlSelectUser.Visible = false; + break; + case SteamWare.loginMode.forceUser: + pnlForceUser.Visible = true; + pnlSelectUser.Visible = false; + break; + case SteamWare.loginMode.standardUser: + pnlForceUser.Visible = false; + pnlSelectUser.Visible = true; + break; + default: + break; + } + } + + protected override void traduciObj() + { + lblPwd.Text = user_std.UtSn.Traduci("lblPwd"); + lblUser.Text = user_std.UtSn.Traduci("lblUser"); + lblDominio.Text = user_std.UtSn.Traduci("lblDominio"); + lblTitolo.Text = user_std.UtSn.Traduci("ForzaUtente"); + btnOk.Text = user_std.UtSn.Traduci("btnCommit"); + btnOkUserStd.Text = user_std.UtSn.Traduci("btnCommit"); + } + + /// + /// prova a verificare se l'utente sia ok x AD credentials + /// + private void AdLogin() + { + lblMessage.Text = "User not authenticated..."; + if (Page.User.Identity.IsAuthenticated) + { + //recupera user windows se c'è... + string ad_name = Page.User.Identity.Name; + string delimStr = "\\"; + char[] delimiter = delimStr.ToCharArray(); + string[] dom_user = ad_name.Split(delimiter, 2); + // passo al controllo di verifica ADuserOk... + user_std _utente = new user_std(); + if (_utente.ADuserOk(dom_user[0], dom_user[1])) + { + bool fatto = _utente.startUpUtente(dom_user[0], dom_user[1]); + if (fatto) + { + SteamWare.logger.lg.scriviLog(string.Format("L'utente {0} ({1}) ha effettuato il login correttamente", _utente.CognomeNome, _utente.userNameAD), SteamWare.tipoLog.INFO); + if (Login_ok != null) + { + Login_ok(this, new EventArgs()); + } + } + else + { + lblMessage.Text = String.Format("{0}
There are some problems instatiating user: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]); + SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, problemi ad istanziare l'utente {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.ERROR); + if (Login_Error != null) + { + Login_Error(this, new EventArgs()); + } + } + } + else + { + lblMessage.Text = String.Format("{0}
user not allowed: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]); + SteamWare.logger.lg.scriviLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.WARNING); + if (Login_Error != null) + { + Login_Error(this, new EventArgs()); + } + } + } + else + { + lblMessage.Text = user_std.UtSn.Traduci("AccessFail") + user_std.UtSn.Traduci("UsrNotAuth"); + SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, utente non autenticato"), SteamWare.tipoLog.WARNING); + if (Login_Error != null) + { + Login_Error(this, new EventArgs()); + } + } + } + + /// + /// effettua verifiche e se concesso permette di forzare l'accesso utente + /// + private void ForceUserIdentity() + { + if (Page.User.Identity.IsAuthenticated) + { + bool _allowForceUser = false; + try + { + _allowForceUser = SteamWare.memLayer.ML.CRB("_allowForceUser"); + } + catch + { + _allowForceUser = false; + } + if (_allowForceUser) + { + if (authKey.Text == "forzaInter") // verifica passphrase... + { + user_std _utente = new user_std(); + user_std.UtSn.isForcedUser = true; + bool fatto = _utente.startUpUtente(dominio.Text, user.Text); + if (fatto) + { + string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.INFO); + if (Login_ok != null) + { + Login_ok(this, new EventArgs()); + } + } + } + else + { + lblMessage.Text = String.Format("{0}
key not allowed for operation!! operation logged!!", user_std.UtSn.Traduci("AccessFail")); + mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la sua key autorizzativa e' sbagliata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.CRS("defaultApp")))); + string _rigaLog = String.Format("User {0}\t tried to force user - wrong password - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); + if (Login_Error != null) + { + Login_Error(this, new EventArgs()); + } + } + } + else + { + mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.CRS("defaultApp")))); + string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); + if (Login_Error != null) + { + Login_Error(this, new EventArgs()); + } + } + } + else + { + lblMessage.Text = string.Format("{0}
user not authenticated!
", user_std.UtSn.Traduci("AccessFail")); + if (Login_Error != null) + { + Login_Error(this, new EventArgs()); + } + string _rigaLog = String.Format("\t Someone tried to force user - real user: \t - not autenticated - \t tried to log as \t {0}\\{1}", dominio.Text, user.Text); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); + } + } + /// + /// se concesso il generico ForceUser permette di forzare l'accesso utente ad uno degli standard + /// + private void StdUserIdentity() + { + if (Page.User.Identity.IsAuthenticated) + { + bool _allowForceUser = false; + try + { + _allowForceUser = SteamWare.memLayer.ML.CRB("_allowForceUser"); + } + catch + { + _allowForceUser = false; + } + if (_allowForceUser) + { + //leggo e codifico utente indicato + string delimStr = "\\"; + char[] delimiter = delimStr.ToCharArray(); + string[] dom_user = ddlStdUser.SelectedValue.Split(delimiter, 2); + //forzo login! + user_std _utente = new user_std(); + user_std.UtSn.isForcedUser = true; + bool fatto = _utente.startUpUtente(dom_user[0], dom_user[1]); + if (fatto) + { + string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dom_user[0], dom_user[1]); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.INFO); + if (Login_ok != null) + { + Login_ok(this, new EventArgs()); + } + } + + } + else + { + mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.CRS("defaultApp")))); + string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}", Page.User.Identity.Name, ddlStdUser.SelectedValue); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); + if (Login_Error != null) + { + Login_Error(this, new EventArgs()); + } + } + } + else + { + lblMessage.Text = string.Format("{0}
user not authenticated!
", user_std.UtSn.Traduci("AccessFail")); + if (Login_Error != null) + { + Login_Error(this, new EventArgs()); + } + string _rigaLog = String.Format("\t Someone tried to force user - real user: \t - not autenticated - \t tried to log as \t {0}\\{1}", dominio.Text, user.Text); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); + } + } + + /// + /// fa login con force user e controllo pwd + /// + /// + /// + protected void btnOk_Click(object sender, EventArgs e) + { + ForceUserIdentity(); + } + /// + /// fa login utente tipo standard + /// + /// + /// + protected void btnOkUserStd_Click(object sender, EventArgs e) + { + StdUserIdentity(); + } + + #endregion + + #endregion + + #region area public + + #region eventi pubblici esposti + + public event EventHandler Login_ok; + public event EventHandler Login_Error; + + #endregion + + #region area proprietà + + /// + /// modalità funzionamento controllo tra normale (ActiveDirectory e user auth di default) e forceUser + /// + public SteamWare.loginMode modoLogin + { + get + { + return _isForceUser; + } + set + { + _isForceUser = value; + } + } + + #endregion + + + /// + /// avvio pagina + /// + protected override void Page_Load(object sender, EventArgs e) + { + base.Page_Load(sender, e); + //carico da web.config i default values + loadDefaultsWebConfig(); + // procedo... + setLoginMode(); + Session.RemoveAll(); + if (_isForceUser == SteamWare.loginMode.normale) + { + AdLogin(); + } + } + + #endregion + +} diff --git a/ES3/WebUserControls/mod_login.ascx.designer.cs b/ES3/WebUserControls/mod_login.ascx.designer.cs new file mode 100644 index 00000000..1285a2c5 --- /dev/null +++ b/ES3/WebUserControls/mod_login.ascx.designer.cs @@ -0,0 +1,140 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + + + +public partial class mod_login { + + /// + /// pnlForceUser control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlForceUser; + + /// + /// lblTitolo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblTitolo; + + /// + /// lblPwd control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblPwd; + + /// + /// authKey control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox authKey; + + /// + /// lblDominio control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblDominio; + + /// + /// dominio control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox dominio; + + /// + /// lblUser control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblUser; + + /// + /// user control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox user; + + /// + /// btnOk control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnOk; + + /// + /// pnlSelectUser control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlSelectUser; + + /// + /// ddlStdUser control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlStdUser; + + /// + /// btnOkUserStd control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnOkUserStd; + + /// + /// lblMessage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblMessage; + + /// + /// HypLinkSSO control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HyperLink HypLinkSSO; +} diff --git a/ES3/WebUserControls/mod_main_help.ascx b/ES3/WebUserControls/mod_main_help.ascx new file mode 100644 index 00000000..9bf29586 --- /dev/null +++ b/ES3/WebUserControls/mod_main_help.ascx @@ -0,0 +1,91 @@ +<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_main_help" CodeBehind="mod_main_help.ascx.cs" %> + +
+
+ +
+
+ <%: traduci("btnAnagArticoli") %> +
+
+
+
+ +
+
+ <%: traduci("btnGestPromesseOdl") %> +
+
+
+
+ +
+
+ <%: traduci("btnGestOdl") %> +
+
+
+
+ +
+
+ <%: traduci("btnGestDatiMacchina") %> +
+
+
+
+
+
+ <%: traduci("btnApprovaTC") %> +
+
+
+
+ +
+
+ <%: traduci("btnApprovaProd") %> +
+
+
+
+ +
+
+ <%: traduci("btnBCode") %> +
+
+
+
+ +
+
+ <%: traduci("btnGestKIT") %> +
+
+
+
+ +
+
+ <%: traduci("btnPlanner") %> +
+
+
+
+ +
+
+ <%: traduci("btnDataImport") %> +
+
+
+
+ +
+
+ <%: traduci("btnBCodeCTrack") %> +
+
+
+
diff --git a/ES3/WebUserControls/mod_main_help.ascx.cs b/ES3/WebUserControls/mod_main_help.ascx.cs new file mode 100644 index 00000000..d56df942 --- /dev/null +++ b/ES3/WebUserControls/mod_main_help.ascx.cs @@ -0,0 +1,63 @@ +using SteamWare; +using System; + +public partial class mod_main_help : ApplicationUserControl +{ + + protected override void Page_Load(object sender, EventArgs e) + { + } + + protected void btnGestPromesseOdl_Click(object sender, EventArgs e) + { + Response.Redirect("~/gestPromesseODL"); + } + protected void btnGestOdl_Click(object sender, EventArgs e) + { + Response.Redirect("~/gestioneODL"); + } + + protected void btnAnagArticoli_Click(object sender, EventArgs e) + { + Response.Redirect("~/anagArticoli"); + } + + protected void btnGestDatiMacchina_Click(object sender, EventArgs e) + { + Response.Redirect("~/gestioneDatiMacchine"); + } + + protected void btnApprovaTC_Click(object sender, EventArgs e) + { + Response.Redirect("~/approvazioneODL"); + } + protected void btnApprovaProd_Click(object sender, EventArgs e) + { + Response.Redirect("~/approvazioneProd"); + } + + protected void btnBCode_Click(object sender, EventArgs e) + { + Response.Redirect("~/BCode"); + } + + protected void lbtGestKIT_Click(object sender, EventArgs e) + { + Response.Redirect("~/GestKIT"); + } + + protected void lbtGestPlan_Click(object sender, EventArgs e) + { + Response.Redirect("~/Planner"); + } + + protected void lbtDataImport_Click(object sender, EventArgs e) + { + Response.Redirect("~/DataImport"); + } + + protected void lbtBCodeCtrack_Click(object sender, EventArgs e) + { + Response.Redirect("~/CTrackBCode"); + } +} diff --git a/ES3/WebUserControls/mod_main_help.ascx.designer.cs b/ES3/WebUserControls/mod_main_help.ascx.designer.cs new file mode 100644 index 00000000..a5299cae --- /dev/null +++ b/ES3/WebUserControls/mod_main_help.ascx.designer.cs @@ -0,0 +1,112 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + + + +public partial class mod_main_help { + + /// + /// Controllo lbtAnagArticoli. + /// + /// + /// 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 lbtAnagArticoli; + + /// + /// Controllo lbtGestPromesseOdl. + /// + /// + /// 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 lbtGestPromesseOdl; + + /// + /// Controllo lbtGestOdl. + /// + /// + /// 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 lbtGestOdl; + + /// + /// Controllo lbtGestDatiMacchina. + /// + /// + /// 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 lbtGestDatiMacchina; + + /// + /// Controllo lbtApprovaTC. + /// + /// + /// 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 lbtApprovaTC; + + /// + /// Controllo lbtApprovaProd. + /// + /// + /// 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 lbtApprovaProd; + + /// + /// Controllo lbtBCode. + /// + /// + /// 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 lbtBCode; + + /// + /// Controllo lbtGestKIT. + /// + /// + /// 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 lbtGestKIT; + + /// + /// Controllo lbtGestPlan. + /// + /// + /// 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 lbtGestPlan; + + /// + /// Controllo lbtDataImport. + /// + /// + /// 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 lbtDataImport; + + /// + /// Controllo lbtBCodeCtrack. + /// + /// + /// 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 lbtBCodeCtrack; +} diff --git a/ES3/WebUserControls/mod_newPromessaODL.ascx b/ES3/WebUserControls/mod_newPromessaODL.ascx new file mode 100644 index 00000000..09401fb6 --- /dev/null +++ b/ES3/WebUserControls/mod_newPromessaODL.ascx @@ -0,0 +1,193 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_newPromessaODL.ascx.cs" Inherits="ES3.WebUserControls.mod_newPromessaODL" %> + + +
+
+
+ Articolo (ricerca + selezione) +
+
+
+
+ +
+ + + + + + +
+
+
+
+
+ Gruppo +
+
+ + + + + + + +
+
+
+
+ Macchina +
+
+ + + + + + +
+
+
+
+ Num Pz +
+
+ +
+
+
+
+ T.Ciclo min:sec +
+
+ +
+
+
+
+ T.Ciclo min.cent +
+
+ +
+
+
+
+
+
+ Commessa / Ordine Ext +
+
+ +
+
+
+
+ Priorita +
+
+ +
+
+
+
+ Attivabile +
+
+ +
+
+
+
+ PzPallet +
+
+ +
+
+
+
+   +
+
+ <%: testoConf %> +
+
+
+
+   +
+
+ Annulla +
+
+
+
+
+ + + + + + + + + + + + + + Nessun record storico trovato + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +
+ +
+
+
+ + + + + + + + + + +
+
+ + + + + + +
+
diff --git a/ES3/WebUserControls/mod_newPromessaODL.ascx.cs b/ES3/WebUserControls/mod_newPromessaODL.ascx.cs new file mode 100644 index 00000000..5d0b2374 --- /dev/null +++ b/ES3/WebUserControls/mod_newPromessaODL.ascx.cs @@ -0,0 +1,308 @@ +using MapoDb; +using SteamWare; +using System; +using System.Web.UI; + +namespace ES3.WebUserControls +{ + public partial class mod_newPromessaODL : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + setDefaults(); + } + } + /// + /// Testo conferma salvataggio (create/Edit) + /// + public string testoConf + { + get + { + string answ = "Crea Promessa ODL"; + if (memLayer.ML.isInSessionObject("idxProm2Edit")) + { + answ = "Edit Promessa ODL"; + } + return answ; + } + } + public void doSelPODL() + { + // se ho una promessa da clonare copio dati da quella... + int idxProm = 0; + try + { + if (memLayer.ML.isInSessionObject("idxProm2Clone")) + { + idxProm = memLayer.ML.IntSessionObj("idxProm2Clone"); + } + else if (memLayer.ML.isInSessionObject("idxProm2Edit")) + { + idxProm = memLayer.ML.IntSessionObj("idxProm2Edit"); + } + // provo a selezionare + var tPODL = DataLayer.obj.taPODL.getByKey(idxProm); + if (tPODL.Rows.Count > 0) + { + var rPODL = tPODL[0]; + txtSearch.Text = rPODL.CodArticolo; + ddlArticolo.DataBind(); + ddlArticolo.SelectedValue = rPODL.CodArticolo; + ddlGruppi.DataBind(); + ddlGruppi.SelectedValue = rPODL.CodGruppo; + txtNumPz.Text = rPODL.NumPezzi.ToString(); + txtPzPallet.Text = rPODL.PzPallet.ToString(); + txtPrio.Text = rPODL.Priorita.ToString(); + if (memLayer.ML.cdvb("ADM_TC_MinSec")) + { + txtTCms.Text = TempiCiclo.minSec(rPODL.TCAssegnato); + } + else + { + txtTCmc.Text = rPODL.TCAssegnato.ToString("N3"); + } + ddlMacchine.SelectedValue = rPODL.IdxMacchina; + txtKeyExt.Text = rPODL.KeyRichiesta; + // svuoto se ci fosse cloning...... + memLayer.ML.emptySessionVal("idxProm2Clone"); + } + } + catch + { } + } + + private void setDefaults() + { + // se abilitato in config inserisce i valori defaults x insert... + if (memLayer.ML.cdvb("resetDefaultPromessaOdl")) + { + txtNumPz.Text = "1"; + txtPzPallet.Text = "1"; + txtPrio.Text = "1"; + // in base ad impostazione mostro TC come min:sec o min.cent + divTCms.Visible = false; + divTCmc.Visible = false; + if (memLayer.ML.cdvb("ADM_TC_MinSec")) + { + divTCms.Visible = true; + txtTCms.Text = "1:00"; + } + else + { + divTCmc.Visible = true; + txtTCmc.Text = "1.00"; + } + memLayer.ML.emptySessionVal("idxProm2Clone"); + memLayer.ML.emptySessionVal("idxProm2Edit"); + } + } + + protected void txtSearch_TextChanged(object sender, EventArgs e) + { + ddlArticolo.DataBind(); + } + + #region gestione eventi + + public event EventHandler eh_nuovoValore; + + #endregion + + /// + /// conferma inserimento TC + /// + /// + /// + protected void btnOk_Click(object sender, EventArgs e) + { + // controllo se ho tutti i valori ok... + string CodArticolo = ""; + string Gruppo = ""; + string IdxMacchina = ""; + string KeyReq = ""; + int numPezzi = 0; + int pzPallet = 1; + decimal TCiclo = 0; + bool attiv = false; + int prio = 0; + + try + { + CodArticolo = ddlArticolo.SelectedValue; + Gruppo = ddlGruppi.SelectedValue; + IdxMacchina = ddlMacchine.SelectedValue; + KeyReq = txtKeyExt.Text.Trim(); + //IdxMacchina = txtMacchina.Text.Trim(); + // se IdxMacchina è vuoto metto null... + if (IdxMacchina == "") + { + IdxMacchina = "0"; + } + numPezzi = Convert.ToInt32(txtNumPz.Text.Trim()); + + if (memLayer.ML.cdvb("ADM_TC_MinSec")) + { + string[] sTC = txtTCms.Text.Trim().Split(':'); + int numMin = 0; + int numSec = 0; + int.TryParse(sTC[0], out numMin); + int.TryParse(sTC[1], out numSec); + TCiclo = numMin + ((decimal)numSec) / 60; + } + else + { + decimal.TryParse(txtTCmc.Text.Replace(".", ","), out TCiclo); + } + pzPallet = Convert.ToInt32(txtPzPallet.Text.Trim()); + attiv = chkAttiv.Checked; + int.TryParse(txtPrio.Text, out prio); + + // controllo se sono in modalità EDIT faccio un update, altrimenti faccio un INSERT... + if (memLayer.ML.isInSessionObject("idxProm2Edit")) + { + int idxProm = memLayer.ML.IntSessionObj("idxProm2Edit"); + DataLayer.obj.taPODL.updateQuery(KeyReq, KeyReq, attiv, CodArticolo, Gruppo, IdxMacchina, numPezzi, TCiclo, DateTime.Now, prio, pzPallet, idxProm); + memLayer.ML.emptySessionVal("idxProm2Edit"); + } + else + { + // 2018.09.25 --> inserisco PROMESSA ODL + //MapoDb.DataLayer.obj.taODL.InsertQuery(CodArticolo, MapoDb.DataLayer.MatrOpr, IdxMacchina, numPezzi, TCiclo, pzPallet, chkToAs400.Checked, txtCommessa.Text.Trim()); + DataLayer.obj.taPODL.insertQuery(KeyReq, KeyReq, attiv, CodArticolo, Gruppo, IdxMacchina, numPezzi, TCiclo, DateTime.Now, prio, pzPallet, ""); + } + } + catch (Exception exc) + { + logger.lg.scriviLog(string.Format("Non sono riuscito ad inserire la PromessaODL con i seguenti parametri: {0} | {1} | {2} | {3} | {4} | {5} | {6} | {7} | {8}{9}{10}", KeyReq, attiv, CodArticolo, IdxMacchina, numPezzi, TCiclo, prio, pzPallet, memLayer.ML.IntSessionObj("idxProm2Edit"), Environment.NewLine, exc), tipoLog.EXCEPTION); + memLayer.ML.emptySessionVal("idxProm2Edit"); + } + // segnalo update + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } + } + /// + /// annullamento inserimento + /// + /// + /// + protected void btnCancel_Click(object sender, EventArgs e) + { + memLayer.ML.emptySessionVal("idxProm2Clone"); + memLayer.ML.emptySessionVal("idxProm2Edit"); + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } + } + /// + /// aggiorno label min e centesimi + /// + /// + /// + protected void txtTempoCiclo_TextChanged(object sender, EventArgs e) + { +#if false + string text = ""; + string txtMinCent = txtTempoCiclo.Text.Trim().Replace(".", ","); + int min = 0; + int sec = 0; + try + { + // cerco di convertire in min/sec + min = Convert.ToInt32(Math.Floor(Convert.ToDouble(txtMinCent))); + sec = Convert.ToInt32((Convert.ToDouble(txtMinCent) - min) * 60); + text = string.Format("{0}:{1:00}", min, sec); + } + catch + { } + lblMinSec.Text = text; +#endif + } + /// + /// selezione articolo + /// + /// + /// + protected void ddlArticolo_SelectedIndexChanged(object sender, EventArgs e) + { + showLastTimeAndNote(); + } + /// + /// mostro elenco ultimi 5 tempi e note... + /// + private void showLastTimeAndNote() + { + // update tempi ciclo! + grViewTempi.DataBind(); + } + /// + /// selezione impianto + /// + /// + /// + protected void ddlMacchine_SelectedIndexChanged(object sender, EventArgs e) + { + showLastTimeAndNote(); + } + /// + /// selezione impianto + /// + /// + /// + protected void ddlGruppi_SelectedIndexChanged(object sender, EventArgs e) + { + ddlMacchine.DataBind(); + } + + /// + /// reset della selezione + /// + /// + /// + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + grViewTempi.SelectedIndex = -1; + grViewTempi.DataBind(); + } + /// + /// evento selezione riga: salvo tempo e qta nei campi input... + /// + /// + /// + protected void grViewTempi_SelectedIndexChanged(object sender, EventArgs e) + { + // ricavo i dati selezionati + int idxOdl = 0; + try + { + idxOdl = Convert.ToInt32(grViewTempi.SelectedValue); + } + catch + { } + MapoDb.DS_ProdTempi.ODLRow rigaOdl = MapoDb.DataLayer.obj.taODL.getByIdx(idxOdl, false)[0]; + // precompilo dati pezzi/tempi + txtNumPz.Text = rigaOdl.NumPezzi.ToString(); + if (memLayer.ML.cdvb("ADM_TC_MinSec")) + { + txtTCms.Text = TempiCiclo.minSec(rigaOdl.TCAssegnato); + } + else + { + txtTCmc.Text = rigaOdl.TCAssegnato.ToString("N3"); + } + txtPzPallet.Text = rigaOdl.PzPallet.ToString(); + } + } +} \ No newline at end of file diff --git a/ES3/WebUserControls/mod_newPromessaODL.ascx.designer.cs b/ES3/WebUserControls/mod_newPromessaODL.ascx.designer.cs new file mode 100644 index 00000000..ca5a0d0f --- /dev/null +++ b/ES3/WebUserControls/mod_newPromessaODL.ascx.designer.cs @@ -0,0 +1,204 @@ +//------------------------------------------------------------------------------ +// +// 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 ES3.WebUserControls { + + + public partial class mod_newPromessaODL { + + /// + /// Controllo txtSearch. + /// + /// + /// 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.TextBox txtSearch; + + /// + /// Controllo ddlArticolo. + /// + /// + /// 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.DropDownList ddlArticolo; + + /// + /// Controllo odsArticoli. + /// + /// + /// 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 odsArticoli; + + /// + /// Controllo ddlGruppi. + /// + /// + /// 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.DropDownList ddlGruppi; + + /// + /// Controllo odsGruppi. + /// + /// + /// 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 odsGruppi; + + /// + /// Controllo ddlMacchine. + /// + /// + /// 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.DropDownList ddlMacchine; + + /// + /// Controllo odsMacchine. + /// + /// + /// 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 odsMacchine; + + /// + /// Controllo txtNumPz. + /// + /// + /// 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.TextBox txtNumPz; + + /// + /// Controllo divTCms. + /// + /// + /// 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 divTCms; + + /// + /// Controllo txtTCms. + /// + /// + /// 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.TextBox txtTCms; + + /// + /// Controllo divTCmc. + /// + /// + /// 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 divTCmc; + + /// + /// Controllo txtTCmc. + /// + /// + /// 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.TextBox txtTCmc; + + /// + /// Controllo txtKeyExt. + /// + /// + /// 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.TextBox txtKeyExt; + + /// + /// Controllo txtPrio. + /// + /// + /// 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.TextBox txtPrio; + + /// + /// Controllo chkAttiv. + /// + /// + /// 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.CheckBox chkAttiv; + + /// + /// Controllo txtPzPallet. + /// + /// + /// 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.TextBox txtPzPallet; + + /// + /// Controllo lbtOk. + /// + /// + /// 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 lbtOk; + + /// + /// Controllo lbtCancel. + /// + /// + /// 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 lbtCancel; + + /// + /// Controllo divTempi. + /// + /// + /// 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 divTempi; + + /// + /// Controllo grViewTempi. + /// + /// + /// 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.GridView grViewTempi; + + /// + /// Controllo odsTempi. + /// + /// + /// 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 odsTempi; + } +} diff --git a/ES3/WebUserControls/mod_planCreate.ascx b/ES3/WebUserControls/mod_planCreate.ascx new file mode 100644 index 00000000..d932211a --- /dev/null +++ b/ES3/WebUserControls/mod_planCreate.ascx @@ -0,0 +1,171 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_planCreate.ascx.cs" Inherits="ES3.WebUserControls.mod_planCreate" %> +
+
+
+ + + +
+
+
+
+
Richieste aperte
+
+
+
+
+
+
Tot PEZZI (num)
+
+ + +
+
+
+
+
+
Tot Tempo (ore)
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
+
+
+ + + + + + +
+
+ +
+
+ cod. + +
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
+
+ + APPROVA e PIANIFICA +
+ approvazione e pianificazione richieste selezionate +
+
+
+
+
+ Macchina + + + + + + + +
+ + RAGGRUPPA SELEZIONATE +
+ Creazione nuovo ordine raggruppato dalle richieste e quantità selezionate +
+
+
+
+ <%--SPLIT RICHIESTA + ...con split deve chiedere NUM PEZZI e va a creare promessa splittata approvata (lasciando il rimanente "a monte" da approvare e/o splittare...--%> +
+
+
+
+
+
+
+
diff --git a/ES3/WebUserControls/mod_planCreate.ascx.cs b/ES3/WebUserControls/mod_planCreate.ascx.cs new file mode 100644 index 00000000..778d0608 --- /dev/null +++ b/ES3/WebUserControls/mod_planCreate.ascx.cs @@ -0,0 +1,313 @@ +using MapoDb; +using SteamWare; +using System; +using System.Collections.Generic; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace ES3.WebUserControls +{ + + public partial class mod_planCreate : SteamWare.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + // di default NASCONDE... + //toggleVisibility(); + calcTotali(); + } + } + public string CodGruppo + { + get + { + return hfCodGruppo.Value; + } + set + { + hfCodGruppo.Value = value; + } + } + public string CodArticolo + { + get + { + return hfCodArticolo.Value; + } + set + { + hfCodArticolo.Value = value; + } + } + public string IdxMacchina + { + get + { + return hfIdxMacchina.Value; + } + set + { + hfIdxMacchina.Value = value; + } + } + public void doUpdate() + { + grView.DataBind(); + calcTotali(); + } + /// + /// seleziona/deseleziona le righe indicate... + /// + /// + /// + protected void btnSelAll_Click(object sender, EventArgs e) + { + // seleziono tutti i valori visibili nel datagrid + CheckBox chkbox = ((CheckBox)sender); + bool isChecked = chkbox.Checked; + if (!isChecked) + { + chkbox.ToolTip = traduci("btnSelAll"); + } + else + { + chkbox.ToolTip = traduci("btnDeselAll"); + } + foreach (GridViewRow riga in grView.Rows) + { + ((CheckBox)riga.FindControl("chkSelect")).Checked = isChecked; + } + calcTotali(); + } + + + /// + /// comando reset + /// + /// + /// + protected void lbtReset_Click(object sender, EventArgs e) + { + doReset(); + } + private void doReset() + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseEvent(SteamWare.ucEvType.Reset); + } + + protected void lbtToggle_Click(object sender, EventArgs e) + { + toggleVisibility(); + } + + private void toggleVisibility() + { + divDetail.Visible = !divDetail.Visible; + tgIcon.Attributes["class"] = divDetail.Visible ? "fa fa-chevron-up" : "fa fa-chevron-down"; + } + + protected void chkSelect_CheckedChanged(object sender, EventArgs e) + { + calcTotali(); + } + + private void calcTotali() + { + // update valori calcolati in base a selezione... + int numOrd = 0; + int numPzOrd = 0; + decimal tempoMinOrd = 0; + decimal tc50p = 0; + int numPzTot = 0; + decimal tempoMinTot = 0; + Dictionary ElArticoli = new Dictionary(); + string CodArt = ""; + foreach (GridViewRow riga in grView.Rows) + { + numPzOrd = 0; + tempoMinOrd = 0; + DateTime DataRif = DateTime.Now.Date; + if (((CheckBox)riga.FindControl("chkSelect")).Checked && ((CheckBox)riga.FindControl("chkSelect")).Visible) + { + try + { + int.TryParse(((TextBox)riga.FindControl("txtNumPezzi")).Text, out numPzOrd); + decimal.TryParse(((Label)riga.FindControl("lblTC50p")).Text, out tc50p); + tempoMinOrd = tc50p * numPzOrd; + CodArt = ((Label)riga.FindControl("lblCodArticolo")).Text; + if (numPzOrd > 0) numOrd++; + // salvo dictionary articoli... + if (ElArticoli.ContainsKey(CodArt)) + { + ElArticoli[CodArt]++; + } + else + { + ElArticoli[CodArt] = 1; + } + } + catch + { } + numPzTot += numPzOrd; + tempoMinTot += tempoMinOrd; + } + } + //lblNumPzTot.Text = $"{numPzTot:N0}"; + numPzCalc = numPzTot; + lblOreTot.Text = $"{tempoMinTot / 60:N2}"; + // controllo SE abilitare il crea gruppo o split... + divSplitOdl.Visible = numOrd == 1; + divConfirm.Visible = numOrd > 0; + divCreaGrp.Visible = (numOrd > 1) && (ElArticoli.Count == 1) && CodGruppo != ""; + ddlMacc.DataBind(); + } + /// + /// Num pz totali calcolati + /// + protected int numPzCalc + { + get + { + int answ = 0; + int.TryParse(hfNumPzTot.Value, out answ); + return answ; + } + set + { + lblNumPzTot.Text = $"{value:N0}"; + hfNumPzTot.Value = value.ToString(); + } + } + /// + /// Approva e pianifica richeiste... + /// + /// + /// + protected void lbtDoPlan_Click(object sender, EventArgs e) + { + int IdxPromessa = 0; + foreach (GridViewRow riga in grView.Rows) + { + DateTime DataRif = DateTime.Now.Date; + if (((CheckBox)riga.FindControl("chkSelect")).Checked && ((CheckBox)riga.FindControl("chkSelect")).Visible) + { + try + { + int.TryParse(((Label)riga.FindControl("lblIdxPromessa")).Text, out IdxPromessa); + // approvo la promessa COPIANDOLA + DataLayer.obj.taPlanRichieste.approvaRich(IdxPromessa, SteamWare.user_std.UtSn.utente); + } + catch + { } + } + } + // update! + reportUpdate(); + } + + private void reportUpdate() + { + // aggiorno grView... + grView.SelectedIndex = -1; + grView.DataBind(); + // segnalo update + raiseEvent(SteamWare.ucEvType.ReqUpdateParent); + } + + /// + /// Chiama stored per creare NUOVO PODL, chiudere i selezionati, registrare associazione,... + /// + /// + /// + protected void lbtCreaGrp_Click(object sender, EventArgs e) + { + int IdxPromessa = 0; + int IdxPromessaOUT = 0; + int QtyEv = 0; + if (numPzCalc > 0) + { + // in primis CREA la richiesta raggruppata + foreach (GridViewRow riga in grView.Rows) + { + DateTime DataRif = DateTime.Now.Date; + if (((CheckBox)riga.FindControl("chkSelect")).Checked && ((CheckBox)riga.FindControl("chkSelect")).Visible) + { + try + { + int.TryParse(((Label)riga.FindControl("lblIdxPromessa")).Text, out IdxPromessa); + break; + } + catch + { } + } + } + var resultIdxOut = DataLayer.obj.taPlanRichieste.creaGrp(IdxPromessa, SteamWare.user_std.UtSn.utente, ddlMacc.SelectedValue, CodGruppo, numPzCalc); + // se ho trovato una promessaOUT... + int.TryParse(resultIdxOut.ToString(), out IdxPromessaOUT); + if (IdxPromessaOUT > 0) + { + // poi alloca tutte le istanze alla richiesta.... + foreach (GridViewRow riga in grView.Rows) + { + DateTime DataRif = DateTime.Now.Date; + if (((CheckBox)riga.FindControl("chkSelect")).Checked && ((CheckBox)riga.FindControl("chkSelect")).Visible) + { + try + { + int.TryParse(((Label)riga.FindControl("lblIdxPromessa")).Text, out IdxPromessa); + int.TryParse(((TextBox)riga.FindControl("txtNumPezzi")).Text, out QtyEv); + // approvo la promessa COPIANDOLA + DataLayer.obj.taPlanRichieste.allocaIst(IdxPromessa, IdxPromessaOUT, QtyEv, SteamWare.user_std.UtSn.utente, "GRP"); + } + catch (Exception exc) + { + logger.lg.scriviLog($"Eccezione in CreaGrp:{Environment.NewLine}{exc}", tipoLog.EXCEPTION); + } + } + } + } + } + // update! + reportUpdate(); + } + + protected void txtNumPezzi_TextChanged(object sender, EventArgs e) + { + calcTotali(); + } + + /// + /// cambia il colore del campo secondo la due date indicata + /// rosso: in ritardo (scaduta) + /// verde: > 2 week + /// giallo: altrimenti + /// + /// + /// + public string cssDueDate(object dueDate) + { + DateTime oggi = DateTime.Today; + DateTime dataRif = oggi.AddDays(-1); + DateTime.TryParse(dueDate.ToString(), out dataRif); + string answ = "text-secondary"; + if (dataRif < oggi) + { + answ = "text-danger"; + } + else if (dataRif < oggi.AddDays(14)) + { + answ = "text-warning"; + } + else + { + answ = "text-success"; + } + return answ; + } + + } +} \ No newline at end of file diff --git a/ES3/WebUserControls/mod_planCreate.ascx.designer.cs b/ES3/WebUserControls/mod_planCreate.ascx.designer.cs new file mode 100644 index 00000000..bff5b096 --- /dev/null +++ b/ES3/WebUserControls/mod_planCreate.ascx.designer.cs @@ -0,0 +1,177 @@ +//------------------------------------------------------------------------------ +// +// 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 ES3.WebUserControls { + + + public partial class mod_planCreate { + + /// + /// 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 hfIdxMacchina. + /// + /// + /// 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 hfIdxMacchina; + + /// + /// 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; + + /// + /// Controllo lblNumPzTot. + /// + /// + /// 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 lblNumPzTot; + + /// + /// Controllo hfNumPzTot. + /// + /// + /// 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 hfNumPzTot; + + /// + /// Controllo lblOreTot. + /// + /// + /// 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 lblOreTot; + + /// + /// 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 divDetail. + /// + /// + /// 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 divDetail; + + /// + /// Controllo grView. + /// + /// + /// 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.GridView grView; + + /// + /// Controllo odsPromIN. + /// + /// + /// 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 odsPromIN; + + /// + /// Controllo divConfirm. + /// + /// + /// 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 divConfirm; + + /// + /// Controllo lbtDoPlan. + /// + /// + /// 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 lbtDoPlan; + + /// + /// Controllo divCreaGrp. + /// + /// + /// 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 divCreaGrp; + + /// + /// Controllo ddlMacc. + /// + /// + /// 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.DropDownList ddlMacc; + + /// + /// Controllo odsMac. + /// + /// + /// 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 odsMac; + + /// + /// Controllo lbtCreaGrp. + /// + /// + /// 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 lbtCreaGrp; + + /// + /// Controllo divSplitOdl. + /// + /// + /// 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 divSplitOdl; + } +} diff --git a/ES3/WebUserControls/mod_planStats.ascx b/ES3/WebUserControls/mod_planStats.ascx new file mode 100644 index 00000000..20e49291 --- /dev/null +++ b/ES3/WebUserControls/mod_planStats.ascx @@ -0,0 +1,199 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_planStats.ascx.cs" Inherits="ES3.WebUserControls.mod_planStats" %> +<%@ Register Src="~/WebUserControls/mod_ricercaGenerica.ascx" TagPrefix="uc1" TagName="mod_ricercaGenerica" %> +<%@ Register Src="~/WebUserControls/cmp_numRow.ascx" TagPrefix="uc1" TagName="cmp_numRow" %> + + +
+
+
+
+
+
+
Stato richieste
+
+
+ + +
+
+
+
Num Richieste
+
+ +
+
+
+
+
+
Gruppi
+
+ +
+
+
+
+
+
Macchine
+
+ +
+
+
+
+
+
Richieste
+
+ +
+
+
+
+
+
Pianificate
+
+ +
+
+
+
+
+
+ + + + + + + +
+
+ +
+
+
+
+
+ +
+
+

Reparti/Fasi

+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+

Macchine

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+
+

Articoli

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + +
+
+ + + + + + + + +
+ +
+
+
+
+
+
diff --git a/ES3/WebUserControls/mod_planStats.ascx.cs b/ES3/WebUserControls/mod_planStats.ascx.cs new file mode 100644 index 00000000..09d89173 --- /dev/null +++ b/ES3/WebUserControls/mod_planStats.ascx.cs @@ -0,0 +1,202 @@ +using MapoSDK; +using SteamWare; +using System; + +namespace ES3.WebUserControls +{ + public partial class mod_planStats : SteamWare.UserControl + { + public event EventHandler eh_selVal; + public event EventHandler eh_reset; + /// + /// innalzo evento in base al tipo richiesto + /// + protected void raiseEvent(tipoEvento evReq) + { + switch (evReq) + { + case tipoEvento.reset: + // raise dell'evento + if (eh_reset != null) + { + eh_reset(this, new EventArgs()); + } + break; + case tipoEvento.selection: + // raise dell'evento + if (eh_selVal != null) + { + eh_selVal(this, new EventArgs()); + } + break; + case tipoEvento.edit: + case tipoEvento.delete: + default: + break; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + cmp_numRowReparti.numRowPag = memLayer.ML.CRI("_righeDataGridShort") / 2; + cmp_numRowMacc.numRowPag = memLayer.ML.CRI("_righeDataGridShort") / 2; + cmp_numRowArt.numRowPag = memLayer.ML.CRI("_righeDataGridShort") / 2; + // sistemo i DataGrid... + gvParetoGrp.PageSize = cmp_numRowReparti.numRowPag; + gvParetoMac.PageSize = cmp_numRowMacc.numRowPag; + gvParetoArt.PageSize = cmp_numRowArt.numRowPag; + } + cmp_numRowArt.eh_newNum += Cmp_numRowArt_eh_newNum; + cmp_numRowMacc.eh_newNum += Cmp_numRowMacc_eh_newNum; + cmp_numRowReparti.eh_newNum += Cmp_numRowReparti_eh_newNum; + } + + private void Cmp_numRowReparti_eh_newNum(object sender, EventArgs e) + { + gvParetoGrp.PageSize = cmp_numRowReparti.numRowPag; + } + + private void Cmp_numRowMacc_eh_newNum(object sender, EventArgs e) + { + gvParetoMac.PageSize = cmp_numRowMacc.numRowPag; + } + + private void Cmp_numRowArt_eh_newNum(object sender, EventArgs e) + { + gvParetoArt.PageSize = cmp_numRowArt.numRowPag; + } + + protected void ddlCodGruppo_SelectedIndexChanged(object sender, EventArgs e) + { +#if false + // salvo in sessione selezione... + memLayer.ML.setSessionVal("selFaseBCode", ddlCodGruppo.SelectedValue); +#endif + } + /// + /// Reset controllo + /// + public void doReset() + { + doResetGrp(); + doResetMac(); + doResetArt(); + } + /// + /// comando reset + /// + /// + /// + protected void lbtResetGrp_Click(object sender, EventArgs e) + { + doResetGrp(); + doResetMac(); + doResetArt(); + } + /// + /// comando reset + /// + /// + /// + protected void lbtResetArt_Click(object sender, EventArgs e) + { + doResetArt(); + } + /// + /// comando reset + /// + /// + /// + protected void lbtResetMac_Click(object sender, EventArgs e) + { + doResetMac(); + } + private void doResetGrp() + { + gvParetoGrp.SelectedIndex = -1; + gvParetoGrp.DataBind(); + raiseEvent(tipoEvento.reset); + } + private void doResetMac() + { + gvParetoMac.SelectedIndex = -1; + gvParetoMac.DataBind(); + raiseEvent(tipoEvento.reset); + } + private void doResetArt() + { + gvParetoArt.SelectedIndex = -1; + gvParetoArt.DataBind(); + raiseEvent(tipoEvento.reset); + } + protected void gvParetoGrp_SelectedIndexChanged(object sender, EventArgs e) + { + doResetArt(); + } + + protected void gvParetoMac_SelectedIndexChanged(object sender, EventArgs e) + { + raiseEvent(tipoEvento.selection); + } + + protected void gvParetoArt_SelectedIndexChanged(object sender, EventArgs e) + { + raiseEvent(tipoEvento.selection); + } + /// + /// CodArticoloo selezionato in GridView + /// + public string CodArticolo + { + get + { + string answ = ""; + try + { + answ = gvParetoArt.SelectedValue.ToString(); + } + catch { } + return answ; + } + } + /// + /// CodGruppo selezionato in GridView + /// + public string CodGruppo + { + get + { + string answ = ""; + try + { + answ = gvParetoGrp.SelectedValue.ToString(); + } + catch { } + return answ; + } + } + /// + /// IdxMacchina selezionato in GridView + /// + public string IdxMacchina + { + get + { + string answ = ""; + try + { + answ = gvParetoMac.SelectedValue.ToString(); + } + catch { } + return answ; + } + } + + protected void lbtToggle_Click(object sender, EventArgs e) + { + divDetail.Visible = !divDetail.Visible; + tgIcon.Attributes["class"] = divDetail.Visible ? "fa fa-chevron-up" : "fa fa-chevron-down"; + } + } +} \ No newline at end of file diff --git a/ES3/WebUserControls/mod_planStats.ascx.designer.cs b/ES3/WebUserControls/mod_planStats.ascx.designer.cs new file mode 100644 index 00000000..6159b733 --- /dev/null +++ b/ES3/WebUserControls/mod_planStats.ascx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// +// 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 ES3.WebUserControls { + + + public partial class mod_planStats { + + /// + /// Controllo fvGlobal. + /// + /// + /// 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.FormView fvGlobal; + + /// + /// Controllo odsStGlb. + /// + /// + /// 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 odsStGlb; + + /// + /// 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 divDetail. + /// + /// + /// 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 divDetail; + + /// + /// Controllo hlCodIstTemp. + /// + /// + /// 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 hlCodIstTemp; + + /// + /// Controllo gvParetoGrp. + /// + /// + /// 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.GridView gvParetoGrp; + + /// + /// Controllo odsStGrp. + /// + /// + /// 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 odsStGrp; + + /// + /// Controllo cmp_numRowReparti. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::ES3.WebUserControls.cmp_numRow cmp_numRowReparti; + + /// + /// Controllo gvParetoMac. + /// + /// + /// 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.GridView gvParetoMac; + + /// + /// Controllo odsStMac. + /// + /// + /// 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 odsStMac; + + /// + /// Controllo cmp_numRowMacc. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::ES3.WebUserControls.cmp_numRow cmp_numRowMacc; + + /// + /// Controllo mod_ricercaGenerica. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::mod_ricercaGenerica mod_ricercaGenerica; + + /// + /// Controllo gvParetoArt. + /// + /// + /// 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.GridView gvParetoArt; + + /// + /// Controllo odsStArt. + /// + /// + /// 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 odsStArt; + + /// + /// Controllo cmp_numRowArt. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::ES3.WebUserControls.cmp_numRow cmp_numRowArt; + } +} diff --git a/ES3/login.aspx b/ES3/login.aspx new file mode 100644 index 00000000..bf74ca10 --- /dev/null +++ b/ES3/login.aspx @@ -0,0 +1,8 @@ +<%@ Page Title="MPADM | Login" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" Inherits="ES3.login" Codebehind="login.aspx.cs" %> + +<%@ Register Src="~/WebUserControls/mod_login.ascx" TagName="mod_login" TagPrefix="uc1" %> + +
+ +
+
diff --git a/ES3/login.aspx.cs b/ES3/login.aspx.cs new file mode 100644 index 00000000..d5c3eb06 --- /dev/null +++ b/ES3/login.aspx.cs @@ -0,0 +1,48 @@ +using System; + +namespace ES3 +{ + public partial class login : System.Web.UI.Page + { + protected string _nextPage + { + get + { + string pagina = SteamWare.memLayer.ML.StringSessionObj("nextPage"); + if (pagina == "") + { + pagina = "menu.aspx"; + } + return pagina; + } + } + + protected void Page_Load(object sender, EventArgs e) + { + Mod_login1.modoLogin = SteamWare.loginMode.normale; + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + Mod_login1.Login_ok += new EventHandler(Mod_login1_Login_ok); + Mod_login1.Login_Error += new EventHandler(Mod_login1_Login_Error); + } + + void Mod_login1_Login_Error(object sender, EventArgs e) + { + Response.Redirect("./unauthorized.aspx"); + } + + void Mod_login1_Login_ok(object sender, EventArgs e) + { + Response.Redirect(_nextPage); + } + protected override void OnUnload(EventArgs e) + { + base.OnUnload(e); + Mod_login1.Login_ok -= new EventHandler(Mod_login1_Login_ok); + Mod_login1.Login_Error -= new EventHandler(Mod_login1_Login_Error); + } + } +} \ No newline at end of file diff --git a/ES3/login.aspx.designer.cs b/ES3/login.aspx.designer.cs new file mode 100644 index 00000000..ff037063 --- /dev/null +++ b/ES3/login.aspx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 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 ES3 { + + + public partial class login { + + /// + /// Controllo Mod_login1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::mod_login Mod_login1; + } +} diff --git a/ES3/menu.aspx b/ES3/menu.aspx new file mode 100644 index 00000000..1aa0c022 --- /dev/null +++ b/ES3/menu.aspx @@ -0,0 +1,8 @@ +<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" Inherits="ES3.menu" Title="MPADM" Codebehind="menu.aspx.cs" %> + +<%@ Register Src="~/WebUserControls/mod_main_help.ascx" TagName="mod_main_help" TagPrefix="uc2" %> + + + + + diff --git a/ES3/menu.aspx.cs b/ES3/menu.aspx.cs new file mode 100644 index 00000000..cf4000ec --- /dev/null +++ b/ES3/menu.aspx.cs @@ -0,0 +1,6 @@ +namespace ES3 +{ + public partial class menu : System.Web.UI.Page + { + } +} \ No newline at end of file diff --git a/ES3/menu.aspx.designer.cs b/ES3/menu.aspx.designer.cs new file mode 100644 index 00000000..6b8f6856 --- /dev/null +++ b/ES3/menu.aspx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 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 ES3 { + + + public partial class menu { + + /// + /// Controllo Mod_main_help1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::mod_main_help Mod_main_help1; + } +} diff --git a/ES3/test.aspx b/ES3/test.aspx new file mode 100644 index 00000000..0949ad31 --- /dev/null +++ b/ES3/test.aspx @@ -0,0 +1,46 @@ +<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" + Inherits="test" Title="Untitled Page" CodeBehind="test.aspx.cs" %> + +<%@ Register Assembly="SteamWare" Namespace="SteamWare" TagPrefix="cc1" %> + + + + + + + + +
+ + + + + + + +
+ <%-- + + + + --%> + +
diff --git a/ES3/test.aspx.cs b/ES3/test.aspx.cs new file mode 100644 index 00000000..3ee0225f --- /dev/null +++ b/ES3/test.aspx.cs @@ -0,0 +1,9 @@ +using System; + +public partial class test : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + lblOut.Text = string.Format("H: {0} - W: {1}", Session["WindowHeight"], Session["WindowWidth"]); + } +} diff --git a/ES3/test.aspx.designer.cs b/ES3/test.aspx.designer.cs new file mode 100644 index 00000000..7daffb1c --- /dev/null +++ b/ES3/test.aspx.designer.cs @@ -0,0 +1,59 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + + + +public partial class test { + + /// + /// Image1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image Image1; + + /// + /// Image4 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image Image4; + + /// + /// Image2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image Image2; + + /// + /// Image3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image Image3; + + /// + /// lblOut control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblOut; +}