diff --git a/ETS_Data/DS_utilsProjEts.Designer.cs b/ETS_Data/DS_utilsProjEts.Designer.cs index 826ce99..8d53f61 100644 --- a/ETS_Data/DS_utilsProjEts.Designer.cs +++ b/ETS_Data/DS_utilsProjEts.Designer.cs @@ -1227,7 +1227,7 @@ namespace ETS_Data.DS_utilsProjEtsTableAdapters { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT value, label FROM dbo.v_selClienti"; @@ -1238,6 +1238,12 @@ namespace ETS_Data.DS_utilsProjEtsTableAdapters { this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ricerca", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_vsc_getByValue"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@value", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1280,6 +1286,23 @@ namespace ETS_Data.DS_utilsProjEtsTableAdapters { this.Adapter.Fill(dataTable); return dataTable; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_utilsProjEts.v_selClientiDataTable getByValue(global::System.Nullable value) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((value.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(value.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_utilsProjEts.v_selClientiDataTable dataTable = new DS_utilsProjEts.v_selClientiDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } } /// diff --git a/ETS_Data/DS_utilsProjEts.xsd b/ETS_Data/DS_utilsProjEts.xsd index 582e3f8..82d0c99 100644 --- a/ETS_Data/DS_utilsProjEts.xsd +++ b/ETS_Data/DS_utilsProjEts.xsd @@ -34,6 +34,17 @@ + + + + dbo.stp_vsc_getByValue + + + + + + + diff --git a/ETS_Data/DS_utilsProjEts.xss b/ETS_Data/DS_utilsProjEts.xss index a50bf73..7b60a75 100644 --- a/ETS_Data/DS_utilsProjEts.xss +++ b/ETS_Data/DS_utilsProjEts.xss @@ -6,7 +6,7 @@ --> - + diff --git a/ETS_Data/obj/Debug/ETS_Data.dll b/ETS_Data/obj/Debug/ETS_Data.dll index 7b45a74..19db32d 100644 Binary files a/ETS_Data/obj/Debug/ETS_Data.dll and b/ETS_Data/obj/Debug/ETS_Data.dll differ diff --git a/ETS_Data/obj/Debug/TempPE/DS_utilsProjEts.Designer.cs.dll b/ETS_Data/obj/Debug/TempPE/DS_utilsProjEts.Designer.cs.dll index d351e16..04d8197 100644 Binary files a/ETS_Data/obj/Debug/TempPE/DS_utilsProjEts.Designer.cs.dll and b/ETS_Data/obj/Debug/TempPE/DS_utilsProjEts.Designer.cs.dll differ diff --git a/PROJ-ETS/PROJ-ETS/Progetti.aspx b/PROJ-ETS/PROJ-ETS/Progetti.aspx index cd8eb90..095e9e4 100644 --- a/PROJ-ETS/PROJ-ETS/Progetti.aspx +++ b/PROJ-ETS/PROJ-ETS/Progetti.aspx @@ -1,4 +1,5 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Progetti.Master" AutoEventWireup="true" CodeBehind="Progetti.aspx.cs" Inherits="PROJ_ETS.Progetti" %> + <%@ Register Src="WebUserControls/mod_progetti.ascx" TagName="mod_progetti" TagPrefix="uc1" %> <%@ Register Src="WebUserControls/mod_commesse.ascx" TagName="mod_commesse" TagPrefix="uc2" %> @@ -10,7 +11,7 @@
- +
diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_commesse.ascx b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_commesse.ascx index e982b32..5df3b68 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_commesse.ascx +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_commesse.ascx @@ -16,7 +16,7 @@ + ToolTip="Aggiungi una nuova commessa al progetto" Visible='<%# isWritable() && enableNewFromEmpty %>' Width ="200px"/> diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_commesse.ascx.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_commesse.ascx.cs index f92b3d3..a492e72 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_commesse.ascx.cs +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_commesse.ascx.cs @@ -461,6 +461,24 @@ namespace PROJ_ETS.WebUserControls } } /// + /// possibilità creazioen nuovo + /// + public bool _enableNewFromEmpty { get; set; } + /// + /// determina se sia visibile creazione nuova commessa da selezione progetto empty + /// + public bool enableNewFromEmpty + { + get + { + return _enableNewFromEmpty; + } + set + { + _enableNewFromEmpty = value; + } + } + /// /// calcola se sia ancestore la fase /// /// diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx index 424246f..1113793 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx @@ -76,28 +76,24 @@ -
+
-
-
- Cliente:
- -
-
-
- Nome progetto
- -
-
+
+ Cliente:
+
-
+
+ Nome progetto
+ +
+
descrizione:
- +
Attivo: @@ -107,23 +103,20 @@ -
-
- Cliente:
- -
-
-
- Nome progetto
- -
-
+
+ Cliente:
+
-
- descrizione:
- - +
+ Nome progetto
+ +
+
+
+ descrizione:
+ +
diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.cs index b43f0d8..7fd168e 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.cs +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.cs @@ -309,14 +309,23 @@ namespace PROJ_ETS.WebUserControls case "dettFasi": // salvo idxCli... int idxCli = 0; + string nomeCli = ""; try { idxCli = DataProxy_ProjEts.DP.taAP.getByIdxPrj(utils.obj.IntSessionObj("idxProgetto_sel"))[0].idxCliente; } catch { } + // cerco di recuperare nome cliente... + try + { + nomeCli = DataProxy_ProjEts.DP.taSelCli.getByValue(idxCli)[0].label; + } + catch + { } utils.obj.setSessionVal("idxCli_sel", idxCli); - Response.Redirect("fasi.aspx"); + utils.obj.setSessionVal("nomeCli_sel", nomeCli); + Response.Redirect("SpostaCommesse"); // blocco update! e.Cancel = true; break; diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_spostaComm.ascx b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_spostaComm.ascx index 63821c3..885a29f 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_spostaComm.ascx +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_spostaComm.ascx @@ -2,53 +2,53 @@ <%@ Register Src="mod_commesse.ascx" TagName="mod_commesse" TagPrefix="uc1" %> <%@ Register Src="mod_autocomplete.ascx" TagName="mod_autocomplete" TagPrefix="uc2" %>
-
-
- - - -
-
-
-

Origine

-
-
- -
-
- - - - - - - - -
-
- +
+
+ + +
-
-

Destinazione

-
-
- -
-
- - - - - - - - +
+
+

Origine

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

Destinazione

+
+
+ +
+
+ + + + + + + + +
+
+
-
-
diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_spostaComm.ascx.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_spostaComm.ascx.cs index 3da9dc1..0d7b463 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_spostaComm.ascx.cs +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_spostaComm.ascx.cs @@ -19,10 +19,52 @@ namespace PROJ_ETS.WebUserControls { if (!Page.IsPostBack) { - fasiFrom.idxProgetto = -1; - fasiTo.idxProgetto = -1; - utils.obj.setSessionVal("idxCliFrom", -1); - utils.obj.setSessionVal("idxCliTo", -1); + //fasiFrom.idxProgetto = -1; + //fasiTo.idxProgetto = -1; + //utils.obj.setSessionVal("idxCliFrom", -1); + //utils.obj.setSessionVal("idxCliTo", -1); + // se ho in sessione valori li seleziono! + if (utils.obj.isInSessionObject("idxCli_sel")) + { + filtroCliFrom.valore = utils.obj.StringSessionObj("idxCli_sel"); + filtroCliTo.valore = utils.obj.StringSessionObj("idxCli_sel"); + utils.obj.setSessionVal("idxCliFrom", utils.obj.StringSessionObj("idxCli_sel")); + utils.obj.setSessionVal("idxCliTo", utils.obj.StringSessionObj("idxCli_sel")); + OdsProgettiFrom.DataBind(); + ddlProgettiFrom.DataBind(); + OdsProgettiTo.DataBind(); + ddlProgettiTo.DataBind(); + } + else + { + filtroCliFrom.valore = "-1"; + filtroCliTo.valore = "-1"; + utils.obj.setSessionVal("idxCliFrom", -1); + utils.obj.setSessionVal("idxCliTo", -1); + } + if (utils.obj.isInSessionObject("nomeCli_sel")) + { + filtroCliFrom.selezione = utils.obj.StringSessionObj("nomeCli_sel"); + filtroCliTo.selezione = utils.obj.StringSessionObj("nomeCli_sel"); + } + else + { + filtroCliFrom.selezione = ""; + filtroCliTo.selezione = ""; + } + // se ho in sessione valori li seleziono! + if (utils.obj.isInSessionObject("idxProgetto_sel")) + { + ddlProgettiFrom.SelectedValue = utils.obj.StringSessionObj("idxProgetto_sel"); + ddlProgettiTo.SelectedValue = utils.obj.StringSessionObj("idxProgetto_sel"); + fasiFrom.idxProgetto = utils.obj.IntSessionObj("idxProgetto_sel"); + fasiTo.idxProgetto = utils.obj.IntSessionObj("idxProgetto_sel"); + } + else + { + fasiFrom.idxProgetto = -1; + fasiTo.idxProgetto = -1; + } } filtroCliFrom.eh_valSelezionato += filtroCliFrom_eh_valSelezionato; filtroCliTo.eh_valSelezionato += filtroCliTo_eh_valSelezionato; @@ -69,6 +111,26 @@ namespace PROJ_ETS.WebUserControls { } } + /// + /// update sel progetto from + /// + /// + /// + protected void ddlProgettiFrom_SelectedIndexChanged(object sender, EventArgs e) + { + // imposto progetto selezionato! + fasiFrom.idxProgetto = Convert.ToInt32(ddlProgettiFrom.SelectedValue); + } + /// + /// update sel progetto to + /// + /// + /// + protected void ddlProgettiTo_SelectedIndexChanged(object sender, EventArgs e) + { + // imposto progetto selezionato! + fasiTo.idxProgetto = Convert.ToInt32(ddlProgettiTo.SelectedValue); + } void fasiTo_eh_resetSelezione(object sender, EventArgs e) { fixBtnFunc(); diff --git a/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll b/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll index 7b45a74..19db32d 100644 Binary files a/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll and b/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll differ diff --git a/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll b/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll index 4464d9c..68d15fb 100644 Binary files a/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll and b/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll differ diff --git a/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.csprojResolveAssemblyReference.cache b/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.csprojResolveAssemblyReference.cache index 46ddf9d..67c2b0d 100644 Binary files a/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.csprojResolveAssemblyReference.cache and b/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.csprojResolveAssemblyReference.cache differ diff --git a/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.dll b/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.dll index 4464d9c..68d15fb 100644 Binary files a/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.dll and b/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.dll differ