From 37ff8944bd177d8027e6ea64a42f888aec42c6cb Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 13 Mar 2020 17:39:34 +0100 Subject: [PATCH] OK visualizzazione dettagli lotti con MP origine --- MP-MAG/MP-MAG.csproj | 8 ++ MP-MAG/SMART/elencoLotti.aspx | 16 +--- MP-MAG/SMART/elencoLotti.aspx.cs | 11 ++- MP-MAG/SMART/elencoLotti.aspx.designer.cs | 9 ++ MP-MAG/WebUserControls/cmp_dettLotti.ascx | 95 +++++++++++++++++++ MP-MAG/WebUserControls/cmp_dettLotti.ascx.cs | 69 ++++++++++++++ .../cmp_dettLotti.ascx.designer.cs | 44 +++++++++ MP-MAG/WebUserControls/cmp_elencoLotti.ascx | 12 ++- .../WebUserControls/cmp_elencoLotti.ascx.cs | 33 ++++++- MP-MAG/WebUserControls/cmp_menuTop.ascx | 8 +- MP-MAG/WebUserControls/cmp_numRow.ascx | 2 +- 11 files changed, 280 insertions(+), 27 deletions(-) create mode 100644 MP-MAG/WebUserControls/cmp_dettLotti.ascx create mode 100644 MP-MAG/WebUserControls/cmp_dettLotti.ascx.cs create mode 100644 MP-MAG/WebUserControls/cmp_dettLotti.ascx.designer.cs diff --git a/MP-MAG/MP-MAG.csproj b/MP-MAG/MP-MAG.csproj index 6589eea..588285e 100644 --- a/MP-MAG/MP-MAG.csproj +++ b/MP-MAG/MP-MAG.csproj @@ -303,6 +303,13 @@ selector.aspx + + cmp_dettLotti.ascx + ASPXCodeBehind + + + cmp_dettLotti.ascx + cmp_elencoLotti.ascx ASPXCodeBehind @@ -457,6 +464,7 @@ + diff --git a/MP-MAG/SMART/elencoLotti.aspx b/MP-MAG/SMART/elencoLotti.aspx index 2dfc921..850807e 100644 --- a/MP-MAG/SMART/elencoLotti.aspx +++ b/MP-MAG/SMART/elencoLotti.aspx @@ -1,24 +1,14 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="elencoLotti.aspx.cs" Inherits="MP_MAG.SMART.elencoLotti" %> <%@ Register Src="~/WebUserControls/cmp_elencoLotti.ascx" TagPrefix="uc1" TagName="cmp_elencoLotti" %> +<%@ Register Src="~/WebUserControls/cmp_dettLotti.ascx" TagPrefix="uc1" TagName="cmp_dettLotti" %> +
-
-
-
-
-
Lotti Componenti
-
-
- -
-
-
-
lista dettagio se sel
-
+
diff --git a/MP-MAG/SMART/elencoLotti.aspx.cs b/MP-MAG/SMART/elencoLotti.aspx.cs index f47961b..b75f97d 100644 --- a/MP-MAG/SMART/elencoLotti.aspx.cs +++ b/MP-MAG/SMART/elencoLotti.aspx.cs @@ -4,23 +4,28 @@ using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; - namespace MP_MAG.SMART { public partial class elencoLotti : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { + if(!Page.IsPostBack) + { + cmp_dettLotti.Visible = false; + } cmp_elencoLotti.eh_doRefresh += Cmp_elencoLotti_eh_doRefresh; cmp_elencoLotti.eh_doReset += Cmp_elencoLotti_eh_doReset; } - private void Cmp_elencoLotti_eh_doRefresh(object sender, EventArgs e) { + cmp_dettLotti.lotto = cmp_elencoLotti.LottoSel; + cmp_dettLotti.Visible = true; } - private void Cmp_elencoLotti_eh_doReset(object sender, EventArgs e) { + cmp_dettLotti.lotto = "0"; + cmp_dettLotti.Visible = true; } } } \ No newline at end of file diff --git a/MP-MAG/SMART/elencoLotti.aspx.designer.cs b/MP-MAG/SMART/elencoLotti.aspx.designer.cs index 60642da..4fe766d 100644 --- a/MP-MAG/SMART/elencoLotti.aspx.designer.cs +++ b/MP-MAG/SMART/elencoLotti.aspx.designer.cs @@ -14,6 +14,15 @@ namespace MP_MAG.SMART public partial class elencoLotti { + /// + /// Controllo cmp_dettLotti. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MP_MAG.WebUserControls.cmp_dettLotti cmp_dettLotti; + /// /// Controllo cmp_elencoLotti. /// diff --git a/MP-MAG/WebUserControls/cmp_dettLotti.ascx b/MP-MAG/WebUserControls/cmp_dettLotti.ascx new file mode 100644 index 0000000..f51f700 --- /dev/null +++ b/MP-MAG/WebUserControls/cmp_dettLotti.ascx @@ -0,0 +1,95 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_dettLotti.ascx.cs" Inherits="MP_MAG.WebUserControls.cmp_dettLotti" %> + +<%@ Register Src="~/WebUserControls/cmp_numRow.ascx" TagPrefix="uc1" TagName="cmp_numRow" %> + +
+
+
+
+
Lotti Componenti
+
+
+ +
+
+
+
+ + + + + + + Nessun Risultato + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
+ + +
+
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+ + + + + / + + + + + + + + + +
+
+ + + + + + +
+
diff --git a/MP-MAG/WebUserControls/cmp_dettLotti.ascx.cs b/MP-MAG/WebUserControls/cmp_dettLotti.ascx.cs new file mode 100644 index 0000000..5ace1b2 --- /dev/null +++ b/MP-MAG/WebUserControls/cmp_dettLotti.ascx.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace MP_MAG.WebUserControls +{ + public partial class cmp_dettLotti : System.Web.UI.UserControl + { + /// + /// Generico evento di richiesta refresh a aprent + /// + public event EventHandler eh_doRefresh; + /// + /// Generico evento di richiesta refresh a aprent + /// + public event EventHandler eh_doReset; + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + } + } + /// + /// Lotto OUT cui fare riferimento con elenco + /// + public string lotto + { + get + { + return hfLotto.Value; + } + set + { + hfLotto.Value = value; + } + } + + /// + /// comando reset + /// + /// + /// + protected void lbtReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + + private void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseReset(); + } + /// + /// Chiamata evento + /// + public void raiseReset() + { + // se qualcuno ascolta sollevo evento nuovo valore... + if (eh_doReset != null) + { + eh_doReset(this, new EventArgs()); + } + } + } +} diff --git a/MP-MAG/WebUserControls/cmp_dettLotti.ascx.designer.cs b/MP-MAG/WebUserControls/cmp_dettLotti.ascx.designer.cs new file mode 100644 index 0000000..1e77ec5 --- /dev/null +++ b/MP-MAG/WebUserControls/cmp_dettLotti.ascx.designer.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace MP_MAG.WebUserControls +{ + + + public partial class cmp_dettLotti + { + + /// + /// 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 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 hfLotto. + /// + /// + /// 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 hfLotto; + } +} diff --git a/MP-MAG/WebUserControls/cmp_elencoLotti.ascx b/MP-MAG/WebUserControls/cmp_elencoLotti.ascx index f7b6549..fbf1237 100644 --- a/MP-MAG/WebUserControls/cmp_elencoLotti.ascx +++ b/MP-MAG/WebUserControls/cmp_elencoLotti.ascx @@ -1,14 +1,12 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_elencoLotti.ascx.cs" Inherits="MP_MAG.WebUserControls.cmp_elencoLotti" %> <%@ Register Src="~/WebUserControls/cmp_numRow.ascx" TagPrefix="uc1" TagName="cmp_numRow" %> - -

LOTTI PRODOTTI

- + @@ -85,7 +83,11 @@
- diff --git a/MP-MAG/WebUserControls/cmp_elencoLotti.ascx.cs b/MP-MAG/WebUserControls/cmp_elencoLotti.ascx.cs index 26f7338..db6ff36 100644 --- a/MP-MAG/WebUserControls/cmp_elencoLotti.ascx.cs +++ b/MP-MAG/WebUserControls/cmp_elencoLotti.ascx.cs @@ -17,10 +17,32 @@ namespace MP_MAG.WebUserControls /// Generico evento di richiesta refresh a aprent /// public event EventHandler eh_doReset; + /// + /// Lotto selezionato + /// + public string LottoSel + { + get + { + return grView.SelectedValue.ToString(); + } + } + protected void Page_Load(object sender, EventArgs e) { - + if (!Page.IsPostBack) + { + cmp_numRow.numRow = 10; + grView.PageSize = cmp_numRow.numRow; + } + cmp_numRow.eh_doRefresh += Cmp_numRow_eh_doRefresh; } + + private void Cmp_numRow_eh_doRefresh(object sender, EventArgs e) + { + grView.PageSize = cmp_numRow.numRow; + } + /// /// comando reset /// @@ -48,5 +70,14 @@ namespace MP_MAG.WebUserControls eh_doReset(this, new EventArgs()); } } + + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // se qualcuno ascolta sollevo evento nuovo valore... + if (eh_doRefresh != null) + { + eh_doRefresh(this, new EventArgs()); + } + } } } \ No newline at end of file diff --git a/MP-MAG/WebUserControls/cmp_menuTop.ascx b/MP-MAG/WebUserControls/cmp_menuTop.ascx index ddfad98..48a9c72 100644 --- a/MP-MAG/WebUserControls/cmp_menuTop.ascx +++ b/MP-MAG/WebUserControls/cmp_menuTop.ascx @@ -32,12 +32,12 @@ --%> - <%-- --%> + Elenco Lotti +
diff --git a/MP-MAG/WebUserControls/cmp_numRow.ascx b/MP-MAG/WebUserControls/cmp_numRow.ascx index 64d0187..d00fb47 100644 --- a/MP-MAG/WebUserControls/cmp_numRow.ascx +++ b/MP-MAG/WebUserControls/cmp_numRow.ascx @@ -2,4 +2,4 @@ righe: - \ No newline at end of file + \ No newline at end of file