diff --git a/C2P.v11.suo b/C2P.v11.suo index 7a81237..e405b10 100644 Binary files a/C2P.v11.suo and b/C2P.v11.suo differ diff --git a/C2P/C2P.csproj b/C2P/C2P.csproj index 4664748..cd6e4d9 100644 --- a/C2P/C2P.csproj +++ b/C2P/C2P.csproj @@ -196,7 +196,16 @@ + + + + + + + + + @@ -218,12 +227,16 @@ + + + Always + Designer @@ -374,6 +387,13 @@ ViewSwitcher.ascx + + mod_QuoteDet.ascx + ASPXCodeBehind + + + mod_QuoteDet.ascx + mod_QuoteList.ascx ASPXCodeBehind diff --git a/C2P/Content/Site.css b/C2P/Content/Site.css index 3f7b916..5375427 100644 --- a/C2P/Content/Site.css +++ b/C2P/Content/Site.css @@ -400,7 +400,7 @@ fieldset { display: inline; } - input, textarea { + /*input, textarea { border: 1px solid #e2e2e2; background: #fff; color: #333; @@ -408,7 +408,7 @@ fieldset { margin: 5px 0 6px 0; padding: 5px; width: 300px; - } + }*/ textarea { font-family: inherit; @@ -425,7 +425,7 @@ fieldset { width: auto; } - input[type="submit"], + /*input[type="submit"], input[type="button"], button { background-color: #d3dce0; @@ -436,7 +436,7 @@ fieldset { padding: 7px; margin-right: 8px; width: auto; - } + }*/ td input[type="submit"], td input[type="button"], diff --git a/C2P/Images/apply_l.png b/C2P/Images/apply_l.png new file mode 100644 index 0000000..592ce6f Binary files /dev/null and b/C2P/Images/apply_l.png differ diff --git a/C2P/Images/apply_m.png b/C2P/Images/apply_m.png new file mode 100644 index 0000000..2166fdf Binary files /dev/null and b/C2P/Images/apply_m.png differ diff --git a/C2P/Images/apply_s.gif b/C2P/Images/apply_s.gif new file mode 100644 index 0000000..2692888 Binary files /dev/null and b/C2P/Images/apply_s.gif differ diff --git a/C2P/Images/cancel_l.png b/C2P/Images/cancel_l.png new file mode 100644 index 0000000..2d5e260 Binary files /dev/null and b/C2P/Images/cancel_l.png differ diff --git a/C2P/Images/cancel_m.png b/C2P/Images/cancel_m.png new file mode 100644 index 0000000..816e06a Binary files /dev/null and b/C2P/Images/cancel_m.png differ diff --git a/C2P/Images/cancel_s.gif b/C2P/Images/cancel_s.gif new file mode 100644 index 0000000..49f3630 Binary files /dev/null and b/C2P/Images/cancel_s.gif differ diff --git a/C2P/Images/edit_l.png b/C2P/Images/edit_l.png new file mode 100644 index 0000000..e596348 Binary files /dev/null and b/C2P/Images/edit_l.png differ diff --git a/C2P/Images/edit_m.png b/C2P/Images/edit_m.png new file mode 100644 index 0000000..62f280e Binary files /dev/null and b/C2P/Images/edit_m.png differ diff --git a/C2P/Images/edit_s.png b/C2P/Images/edit_s.png new file mode 100644 index 0000000..b66d7ed Binary files /dev/null and b/C2P/Images/edit_s.png differ diff --git a/C2P/Images/view_l.png b/C2P/Images/view_l.png new file mode 100644 index 0000000..de5ef3a Binary files /dev/null and b/C2P/Images/view_l.png differ diff --git a/C2P/Images/view_m.png b/C2P/Images/view_m.png new file mode 100644 index 0000000..e845f6d Binary files /dev/null and b/C2P/Images/view_m.png differ diff --git a/C2P/Images/view_s.png b/C2P/Images/view_s.png new file mode 100644 index 0000000..2833b7a Binary files /dev/null and b/C2P/Images/view_s.png differ diff --git a/C2P/QuoteDet.aspx b/C2P/QuoteDet.aspx index fc186eb..7a89cfc 100644 --- a/C2P/QuoteDet.aspx +++ b/C2P/QuoteDet.aspx @@ -1,7 +1,9 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="QuoteDet.aspx.cs" Inherits="C2P.QuoteDet" %> +<%@ Register src="WebUserControls/mod_QuoteDet.ascx" tagname="mod_QuoteDet" tagprefix="uc1" %> + diff --git a/C2P/QuoteDet.aspx.designer.cs b/C2P/QuoteDet.aspx.designer.cs index f90a2f7..134de3c 100644 --- a/C2P/QuoteDet.aspx.designer.cs +++ b/C2P/QuoteDet.aspx.designer.cs @@ -3,15 +3,22 @@ // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ -namespace C2P -{ - - - public partial class QuoteDet - { +namespace C2P { + + + public partial class QuoteDet { + + /// + /// mod_QuoteDet1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::C2P.WebUserControls.mod_QuoteDet mod_QuoteDet1; } } diff --git a/C2P/WebUserControls/mod_QuoteDet.ascx b/C2P/WebUserControls/mod_QuoteDet.ascx new file mode 100644 index 0000000..d390c19 --- /dev/null +++ b/C2P/WebUserControls/mod_QuoteDet.ascx @@ -0,0 +1,102 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_QuoteDet.ascx.cs" Inherits="C2P.WebUserControls.mod_QuoteDet" %> +<%if (false) + { %> + +<%} %> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/C2P/WebUserControls/mod_QuoteDet.ascx.cs b/C2P/WebUserControls/mod_QuoteDet.ascx.cs new file mode 100644 index 0000000..4466b64 --- /dev/null +++ b/C2P/WebUserControls/mod_QuoteDet.ascx.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using C2P_Data; +using SteamWare; + +namespace C2P.WebUserControls +{ + public partial class mod_QuoteDet : System.Web.UI.UserControl + { + /// + /// tipo di quote x la scheda corrente + /// + protected string QuoteType + { + get + { + return lblQuoteType.Text; + } + set + { + lblQuoteType.Text = value; + } + } + /// + /// codice quote x la scheda corrente + /// + protected string CodQuote + { + get + { + return lblCodQuote.Text; + } + set + { + lblCodQuote.Text = value; + } + } + /// + /// rev quote x la scheda corrente + /// + protected string QuoteRev + { + get + { + return lblQuoteRev.Text; + } + set + { + lblQuoteRev.Text = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + // recupero valori della chaive della quote da URL... + if (!Page.IsPostBack) + { + // leggo da url e salvo (se ci sono...) + QuoteType = Request.QueryString["QuoteType"]; + CodQuote = Request.QueryString["CodQuote"]; + QuoteRev = Request.QueryString["QuoteRev"]; + } + } + + /// + /// Calcola css dato valore prezzo offerto vs importi full cost e min price + /// + /// + /// + /// + /// + public string priceVsCost(object _FullCost, object _MinPrice, object _PriceOff) + { + string answ = ""; + double FullCost = 0; + double MinPrice = 0; + double PriceOff = 0; + try + { + FullCost = Convert.ToDouble(_FullCost); + MinPrice = Convert.ToDouble(_MinPrice); + PriceOff = Convert.ToDouble(_PriceOff); + } + catch + { } + if (PriceOff > MinPrice) + { + answ = "allOk"; + } + else if (PriceOff > FullCost) + { + answ = "warnOrange"; + } + else + { + answ = "warnRed"; + } + return answ; + } + } +} \ No newline at end of file diff --git a/C2P/WebUserControls/mod_QuoteDet.ascx.designer.cs b/C2P/WebUserControls/mod_QuoteDet.ascx.designer.cs new file mode 100644 index 0000000..8361d3e --- /dev/null +++ b/C2P/WebUserControls/mod_QuoteDet.ascx.designer.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// +// 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_QuoteDet { + + /// + /// BundleReference1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference1; + + /// + /// lblQuoteType control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblQuoteType; + + /// + /// lblCodQuote control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblCodQuote; + + /// + /// lblQuoteRev control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblQuoteRev; + + /// + /// DetView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DetailsView DetView; + + /// + /// odsQuotes control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsQuotes; + } +} diff --git a/C2P/WebUserControls/mod_QuoteList.ascx b/C2P/WebUserControls/mod_QuoteList.ascx index 62ab482..2ef1874 100644 --- a/C2P/WebUserControls/mod_QuoteList.ascx +++ b/C2P/WebUserControls/mod_QuoteList.ascx @@ -4,16 +4,26 @@ <%} %>
+ + + + + + + + + + + - <%-- - --%> - <%-- + + - --%> - <%-- + + @@ -78,15 +88,24 @@ --%> + + + <%----%> + + + + + + / - - - - + + + + @@ -118,35 +137,28 @@ + + + + + + <%----%> + + + + + + + + + + - - - - - - - - - - - <%-- - - - - - - - - - - --%> - <%--ConnectionString="name=Proxima_C2PEntities" DefaultContainerName="Proxima_C2PEntities" ContextTypeName="C2P_Data.C2P_mod"--%> -
- - -
-
- + + + + +
diff --git a/C2P/WebUserControls/mod_QuoteList.ascx.cs b/C2P/WebUserControls/mod_QuoteList.ascx.cs index 2f2f1dc..7cd1bba 100644 --- a/C2P/WebUserControls/mod_QuoteList.ascx.cs +++ b/C2P/WebUserControls/mod_QuoteList.ascx.cs @@ -5,6 +5,7 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using C2P_Data; +using SteamWare; namespace C2P.WebUserControls { @@ -12,23 +13,33 @@ namespace C2P.WebUserControls { protected void Page_Load(object sender, EventArgs e) { - + if (!Page.IsPostBack) + { + txtCerca.Focus(); + } } +#if false private void ricalcolaQuote(string quoteType, long CodQuote, int Rev) { DateTime tick = DateTime.Now; // aggiorno dati! DtProxy.man.taQL.stp_QL_update(quoteType, CodQuote, Rev); lblOut.Text = string.Format("Tempo ricalcolo: {0} ms", DateTime.Now.Subtract(tick).TotalMilliseconds); - } - + } +#endif + /// + /// salvo e vado a dettaglio! + /// + /// + /// protected void grView_SelectedIndexChanged(object sender, EventArgs e) { // ricalcolo! string QuoteType = grView.SelectedDataKey["QuoteType"].ToString(); long CodQuote = Convert.ToInt64(grView.SelectedDataKey["CodQuote"]); int QuoteRev = Convert.ToInt16(grView.SelectedDataKey["QuoteRev"]); - ricalcolaQuote(QuoteType, CodQuote, QuoteRev); + // rimando a dettaglio! + Response.Redirect(string.Format("QuoteDet?QuoteType={0}&CodQuote={1}&QuoteRev={2}", QuoteType, CodQuote, QuoteRev)); } /// /// Calcola css dato valore prezzo offerto vs importi full cost e min price @@ -65,5 +76,29 @@ namespace C2P.WebUserControls } return answ; } + + protected string ricerca + { + get + { + return txtCerca.Text.Trim(); + } + } + + protected void txtCerca_TextChanged(object sender, EventArgs e) + { + doUpdate(); + } + + private void doUpdate() + { + memLayer.ML.setSessionVal("valoreRicerca", ricerca); + grView.DataBind(); + } + + protected void btnCerca_Click(object sender, EventArgs e) + { + doUpdate(); + } } } \ No newline at end of file diff --git a/C2P/WebUserControls/mod_QuoteList.ascx.designer.cs b/C2P/WebUserControls/mod_QuoteList.ascx.designer.cs index cbfc96e..282c63b 100644 --- a/C2P/WebUserControls/mod_QuoteList.ascx.designer.cs +++ b/C2P/WebUserControls/mod_QuoteList.ascx.designer.cs @@ -21,6 +21,24 @@ namespace C2P.WebUserControls { /// protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference1; + /// + /// txtCerca control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtCerca; + + /// + /// btnCerca control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnCerca; + /// /// grView control. /// @@ -38,23 +56,5 @@ namespace C2P.WebUserControls { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.ObjectDataSource odsQuotes; - - /// - /// 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; - - /// - /// btnNew control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnNew; } } diff --git a/C2P/bin/C2P.dll b/C2P/bin/C2P.dll index ee49df3..dea9416 100644 Binary files a/C2P/bin/C2P.dll and b/C2P/bin/C2P.dll differ diff --git a/C2P/bin/C2P.pdb b/C2P/bin/C2P.pdb index 176c8e4..19a1c00 100644 Binary files a/C2P/bin/C2P.pdb and b/C2P/bin/C2P.pdb differ diff --git a/C2P/bin/C2P_Data.dll b/C2P/bin/C2P_Data.dll index e90fbfc..194ea40 100644 Binary files a/C2P/bin/C2P_Data.dll and b/C2P/bin/C2P_Data.dll differ diff --git a/C2P/bin/C2P_Data.pdb b/C2P/bin/C2P_Data.pdb index bb0b109..ba90cff 100644 Binary files a/C2P/bin/C2P_Data.pdb and b/C2P/bin/C2P_Data.pdb differ diff --git a/C2P/obj/Debug/C2P.csprojResolveAssemblyReference.cache b/C2P/obj/Debug/C2P.csprojResolveAssemblyReference.cache index 4c14b44..e186def 100644 Binary files a/C2P/obj/Debug/C2P.csprojResolveAssemblyReference.cache and b/C2P/obj/Debug/C2P.csprojResolveAssemblyReference.cache differ diff --git a/C2P/obj/Debug/C2P.dll b/C2P/obj/Debug/C2P.dll index ee49df3..dea9416 100644 Binary files a/C2P/obj/Debug/C2P.dll and b/C2P/obj/Debug/C2P.dll differ diff --git a/C2P/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/C2P/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 53edbb1..283616e 100644 Binary files a/C2P/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/C2P/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/C2P_Data/DS_Quotes.Designer.cs b/C2P_Data/DS_Quotes.Designer.cs index 9f5dfc2..1bb9d88 100644 --- a/C2P_Data/DS_Quotes.Designer.cs +++ b/C2P_Data/DS_Quotes.Designer.cs @@ -11642,8 +11642,9 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = @"SELECT Vers, QuoteType, CodQuote, QuoteRev, CodClient, ClientName, CodItem, CodItemGroup, RawMat, UnitWeight, BatchQty, CodInco, KeyAM, Note, PriceOff, CodClientAssoc, ClientNameAssoc, ItemDescr, CodifProfilo, ClasseMerc, TipoDies, CodDiesGroup, DiamDies, HoleNumDies, DiesPrice, DiesExpLife, DiesEOLife, NumDiesInList, NumDiesExaust, CodPlant, KeyAMIL, KgTeo, NumSMED, QuotaMan, PRMWeight, PWeight, PTare, LivPackage, LivPackageDett, RawMatCost, RawMatExtraCost, RawMatFullCost, CodPackag, PkgDesc, FSR, ProvvCost, EECost, GasCost, DiesCost, PackCost, TranspCost, SellCost01, RefCost01, SellCost04, RefCost04, WSR01, MSR01, NetProd01, FC4UG01, VC4UG01, OH4UG01, SC4UG01, DSR, NetProd04, FC4UG04, VC4UG04, FVC, Charge, P_FVC, CPS, P_CPS, P_FC4UG04, FullCost, P_FullCost, MinPrice, P_MinPrice, P_PriceOff, NetMar, FCShield, PckSur FROM dbo.v_QuoteFull_Q"; - this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[0].CommandText = "dbo.stp_QL_fullDataAll"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[0].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] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; this._commandCollection[1].CommandText = "dbo.stp_QL_fullData"; diff --git a/C2P_Data/DS_Quotes.xsd b/C2P_Data/DS_Quotes.xsd index d039193..d6b5da2 100644 --- a/C2P_Data/DS_Quotes.xsd +++ b/C2P_Data/DS_Quotes.xsd @@ -649,11 +649,13 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas - + - - SELECT Vers, QuoteType, CodQuote, QuoteRev, CodClient, ClientName, CodItem, CodItemGroup, RawMat, UnitWeight, BatchQty, CodInco, KeyAM, Note, PriceOff, CodClientAssoc, ClientNameAssoc, ItemDescr, CodifProfilo, ClasseMerc, TipoDies, CodDiesGroup, DiamDies, HoleNumDies, DiesPrice, DiesExpLife, DiesEOLife, NumDiesInList, NumDiesExaust, CodPlant, KeyAMIL, KgTeo, NumSMED, QuotaMan, PRMWeight, PWeight, PTare, LivPackage, LivPackageDett, RawMatCost, RawMatExtraCost, RawMatFullCost, CodPackag, PkgDesc, FSR, ProvvCost, EECost, GasCost, DiesCost, PackCost, TranspCost, SellCost01, RefCost01, SellCost04, RefCost04, WSR01, MSR01, NetProd01, FC4UG01, VC4UG01, OH4UG01, SC4UG01, DSR, NetProd04, FC4UG04, VC4UG04, FVC, Charge, P_FVC, CPS, P_CPS, P_FC4UG04, FullCost, P_FullCost, MinPrice, P_MinPrice, P_PriceOff, NetMar, FCShield, PckSur FROM dbo.v_QuoteFull_Q - + + dbo.stp_QL_fullDataAll + + + diff --git a/C2P_Data/bin/Debug/C2P_Data.dll b/C2P_Data/bin/Debug/C2P_Data.dll index e90fbfc..194ea40 100644 Binary files a/C2P_Data/bin/Debug/C2P_Data.dll and b/C2P_Data/bin/Debug/C2P_Data.dll differ diff --git a/C2P_Data/bin/Debug/C2P_Data.pdb b/C2P_Data/bin/Debug/C2P_Data.pdb index bb0b109..ba90cff 100644 Binary files a/C2P_Data/bin/Debug/C2P_Data.pdb and b/C2P_Data/bin/Debug/C2P_Data.pdb differ diff --git a/C2P_Data/obj/Debug/C2P_Data.dll b/C2P_Data/obj/Debug/C2P_Data.dll index e90fbfc..194ea40 100644 Binary files a/C2P_Data/obj/Debug/C2P_Data.dll and b/C2P_Data/obj/Debug/C2P_Data.dll differ diff --git a/C2P_Data/obj/Debug/TempPE/DS_Quotes.Designer.cs.dll b/C2P_Data/obj/Debug/TempPE/DS_Quotes.Designer.cs.dll index 50bba0f..9f92c2f 100644 Binary files a/C2P_Data/obj/Debug/TempPE/DS_Quotes.Designer.cs.dll and b/C2P_Data/obj/Debug/TempPE/DS_Quotes.Designer.cs.dll differ