From 2ee76102c775ecb014da696e2f328db240fb1adf Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 29 May 2015 13:39:21 +0200 Subject: [PATCH] prima release con package management... --- C2P/C2P.csproj | 16 ++ C2P/PackageMan.aspx | 36 ++++ C2P/PackageMan.aspx.cs | 32 ++++ C2P/PackageMan.aspx.designer.cs | 42 +++++ C2P/WebUserControls/mod_PackageMan.ascx | 73 ++++++++ C2P/WebUserControls/mod_PackageMan.ascx.cs | 168 ++++++++++++++++++ .../mod_PackageMan.ascx.designer.cs | 60 +++++++ C2P/WebUserControls/mod_testata.ascx | 3 +- C2P/WebUserControls/mod_testata.ascx.cs | 3 +- .../mod_testata.ascx.designer.cs | 27 ++- C2P/bin/C2P.dll | Bin 409600 -> 411648 bytes C2P/bin/C2P_Data.dll | Bin 614400 -> 614400 bytes C2P/bin/SteamWare.dll | Bin 625152 -> 625152 bytes C2P_Report/bin/C2P_Data.dll | Bin 614400 -> 614400 bytes C2P_Report/bin/C2P_Report.dll | Bin 2721280 -> 2721280 bytes C2P_Report/bin/SteamWare.dll | Bin 625152 -> 625152 bytes VersGen/C2P.cs | 4 +- VersGen/C2P.tt | 4 +- 18 files changed, 453 insertions(+), 15 deletions(-) create mode 100644 C2P/PackageMan.aspx create mode 100644 C2P/PackageMan.aspx.cs create mode 100644 C2P/PackageMan.aspx.designer.cs create mode 100644 C2P/WebUserControls/mod_PackageMan.ascx create mode 100644 C2P/WebUserControls/mod_PackageMan.ascx.cs create mode 100644 C2P/WebUserControls/mod_PackageMan.ascx.designer.cs diff --git a/C2P/C2P.csproj b/C2P/C2P.csproj index 470c3a6..65d9d44 100644 --- a/C2P/C2P.csproj +++ b/C2P/C2P.csproj @@ -301,6 +301,7 @@ + Always @@ -386,6 +387,7 @@ + @@ -617,6 +619,13 @@ OffersArchive.aspx + + PackageMan.aspx + ASPXCodeBehind + + + PackageMan.aspx + PlantsMan.aspx ASPXCodeBehind @@ -879,6 +888,13 @@ mod_OffersArchive.ascx + + mod_PackageMan.ascx + ASPXCodeBehind + + + mod_PackageMan.ascx + mod_QuoteDet.ascx ASPXCodeBehind diff --git a/C2P/PackageMan.aspx b/C2P/PackageMan.aspx new file mode 100644 index 0000000..546f07c --- /dev/null +++ b/C2P/PackageMan.aspx @@ -0,0 +1,36 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/c2p/FullPage.master" AutoEventWireup="true" CodeBehind="PackageMan.aspx.cs" Inherits="C2P.PackageMan" %> + +<%@ Register Src="~/WebUserControls/mod_ricercaGenerica.ascx" TagPrefix="uc1" TagName="mod_ricercaGenerica" %> +<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc1" %> +<%@ Register Src="~/WebUserControls/mod_PackageMan.ascx" TagPrefix="uc1" TagName="mod_PackageMan" %> + + + + + + + + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+ +
diff --git a/C2P/PackageMan.aspx.cs b/C2P/PackageMan.aspx.cs new file mode 100644 index 0000000..79a58f0 --- /dev/null +++ b/C2P/PackageMan.aspx.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace C2P +{ + public partial class PackageMan : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + if (!Page.IsPostBack) + { + mod_righePag.numRowPag = 20; + mod_PackageMan.pageSize = mod_righePag.numRowPag; + } + mod_righePag.eh_newNum += mod_righePag_eh_newNum; + } + /// + /// aggiornato numero righe datagrid... aggiorno visualizzazione + /// + /// + /// + void mod_righePag_eh_newNum(object sender, EventArgs e) + { + mod_PackageMan.pageSize = mod_righePag.numRowPag; + } + } +} \ No newline at end of file diff --git a/C2P/PackageMan.aspx.designer.cs b/C2P/PackageMan.aspx.designer.cs new file mode 100644 index 0000000..c926e8c --- /dev/null +++ b/C2P/PackageMan.aspx.designer.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace C2P { + + + public partial class PackageMan { + + /// + /// mod_ricercaGenerica control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::mod_ricercaGenerica mod_ricercaGenerica; + + /// + /// mod_righePag control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::mod_righePag mod_righePag; + + /// + /// mod_PackageMan control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::C2P.WebUserControls.mod_PackageMan mod_PackageMan; + } +} diff --git a/C2P/WebUserControls/mod_PackageMan.ascx b/C2P/WebUserControls/mod_PackageMan.ascx new file mode 100644 index 0000000..3377e67 --- /dev/null +++ b/C2P/WebUserControls/mod_PackageMan.ascx @@ -0,0 +1,73 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_PackageMan.ascx.cs" Inherits="C2P.WebUserControls.mod_PackageMan" %> +
+
+ + +
+
+ + + + + + + + + <%: traduci("Reset") %> + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/C2P/WebUserControls/mod_PackageMan.ascx.cs b/C2P/WebUserControls/mod_PackageMan.ascx.cs new file mode 100644 index 0000000..0392a1f --- /dev/null +++ b/C2P/WebUserControls/mod_PackageMan.ascx.cs @@ -0,0 +1,168 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using SteamWare; +using C2P_Data; + + +namespace C2P.WebUserControls +{ + public partial class mod_PackageMan : SteamWare.UserControl + { + + #region gestione eventi + + public event EventHandler eh_selezioneValore; + public event EventHandler eh_resetSelezione; + + #endregion + + #region protected + + /// + /// caricamento pagina + /// + protected void Page_Load() + { + if (!Page.IsPostBack) + { + btnNewRawMat.Text = user_std.UtSn.Traduci("btnNewRawMat"); + txtRawMat.Text = ""; + } + } + + /// + /// inserisco nel db il nuovo lemma... + /// + /// + /// + protected void btnNewRawMat_Click(object sender, EventArgs e) + { + creaNuovoRawMat(); + } + /// + /// creazione nuovo lemma + /// + private void creaNuovoRawMat() + { + if (txtRawMat.Text != "") + { + // inserisco + DtProxy.man.taRMD.insertQuery(txtRawMat.Text.Trim()); + // metto in campo ricerca... + memLayer.ML.setSessionVal("valoreCercato", txtRawMat.Text.Trim()); + // svuoto campo text + txtRawMat.Text = ""; + // riparto... + Response.Redirect(user_std.pagCorrente); + } + } + + /// + /// dimensione pagina grid view + /// + public int pageSize + { + get + { + return grView.PageSize; + } + set + { + grView.PageSize = value; + } + } + + 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} ({1})", grView.Rows.Count, totRecord); + } + else + { + lblNumRec.Text = ""; + } + } + + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + selezionatoValore(); + } + + private void selezionatoValore() + { +#if false + SteamWare.memLayer.ML.setSessionVal("lemma_sel", grView.SelectedDataKey.Values[1]); + if (eh_selezioneValore != null) + { + eh_selezioneValore(this, new EventArgs()); + } +#endif + } + + protected void grView_RowEditing(object sender, GridViewEditEventArgs e) + { + // seleziono la riga corrente... + grView.SelectedIndex = e.NewEditIndex; + selezionatoValore(); + } + + protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) + { + DataWrap.DW.resetVocabolario(); + selezionatoValore(); + } + + #endregion + + #region area public + + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { +#if false + SteamWare.memLayer.ML.emptySessionVal("lemma_sel"); +#endif + grView.SelectedIndex = -1; + grView.DataBind(); + if (eh_resetSelezione != null) + { + eh_resetSelezione(this, new EventArgs()); + } + } + + #endregion + + protected void ods_Inserted(object sender, ObjectDataSourceStatusEventArgs e) + { +#if false + DataWrap.DW.resetVocabolario(); + selezionatoValore(); +#endif + } + } +} \ No newline at end of file diff --git a/C2P/WebUserControls/mod_PackageMan.ascx.designer.cs b/C2P/WebUserControls/mod_PackageMan.ascx.designer.cs new file mode 100644 index 0000000..4fb26c3 --- /dev/null +++ b/C2P/WebUserControls/mod_PackageMan.ascx.designer.cs @@ -0,0 +1,60 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace C2P.WebUserControls { + + + public partial class mod_PackageMan { + + /// + /// btnNewRawMat control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnNewRawMat; + + /// + /// txtRawMat control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtRawMat; + + /// + /// grView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// lblNumRec control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblNumRec; + + /// + /// ods control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + } +} diff --git a/C2P/WebUserControls/mod_testata.ascx b/C2P/WebUserControls/mod_testata.ascx index ee5e2c0..27a42e4 100644 --- a/C2P/WebUserControls/mod_testata.ascx +++ b/C2P/WebUserControls/mod_testata.ascx @@ -70,9 +70,10 @@