update versione 0.7.69

update della simulazione (inserita anche modifica x parte COSTI)
This commit is contained in:
Samuele E. Locatelli
2014-05-20 17:49:59 +02:00
parent 3a506dce9d
commit 8ab4a366bc
10 changed files with 206 additions and 9 deletions
+137 -3
View File
@@ -1,5 +1,139 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_S_Quot.ascx.cs" Inherits="C2P.WebUserControls.mod_S_Quot" %>
<%@ Register Src="~/WebUserControls/mod_Q_Quot.ascx" TagName="mod_Q_Quot" TagPrefix="uc1" %>
<%if (false)
{ %>
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
<webopt:BundleReference ID="BundleReference2" runat="server" Path="~/Content/themes/base/css" />
<%} %>
<%@ Register Src="~/WebUserControls/mod_displayHor.ascx" TagName="mod_displayHor" TagPrefix="uc1" %>
<uc1:mod_Q_Quot ID="mod_Q_Quot1" runat="server" />
<asp:FormView ID="frmView" runat="server" DataKeyNames="QuoteType,CodQuote,QuoteRev" DataSourceID="odsQuotes" Width="100%">
<ItemTemplate>
<div class="row bottomLine">
&nbsp;
</div>
<div class="row bottomLine bg-info" style="font-size: 1.2em; line-height: 1.4em;">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor6" runat="server" etichetta='<%# traduci("MinPrice") %>' valore='<%# Eval("MinPrice", "{0:C3}") %>' />
</div>
<div class="col-xs-6 text-right">
<uc1:mod_displayHor ID="mod_displayHor9" runat="server" etichetta='<%# traduci("P_MinPrice") %>' valore='<%# Eval("P_MinPrice", "{0:C3}") %>' />
</div>
</div>
<div class="row bottomLine">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor7" runat="server" etichetta='<%# traduci("Charge") %>' valore='<%# Eval("Charge", "{0:P1}") %>' />
</div>
<div class="col-xs-6 text-right">
</div>
</div>
<div class="row bottomLine bg-info" style="font-size: 1.2em; line-height: 1.4em;">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor8" runat="server" etichetta='<%# traduci("PriceOff") %>' valore='<%# Eval("PriceOff", "{0:C3}") %>' valueCss='<%# colorByVal(Eval("PriceOff"), Eval("MinPrice")) %>' />
</div>
<div class="col-xs-6 text-right">
<uc1:mod_displayHor ID="mod_displayHor11" runat="server" etichetta='<%# traduci("P_PriceOff") %>' valore='<%# Eval("P_PriceOff", "{0:C3}") %>' />
</div>
</div>
<div class="row bottomLine bg-warning" style="font-size: 1.2em; line-height: 1.4em;">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor12" runat="server" etichetta='<%# traduci("NetMar") %>' valore='<%# Eval("NetMar", "{0:C3}") %>' />
</div>
<div class="col-xs-6 text-right">
</div>
</div>
<div class="row bottomLine">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor13" runat="server" etichetta='<%# traduci("FCShield") %>' valore='<%# Eval("FCShield", "{0:P1}") %>' />
</div>
<div class="col-xs-6 text-right">
</div>
</div>
<div class="row">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor14" runat="server" etichetta='<%# traduci("PckSur") %>' valore='<%# Eval("PckSur", "{0:C3}") %>' />
</div>
<div class="col-xs-6 text-right">
</div>
</div>
</ItemTemplate>
<EditItemTemplate>
<div class="row bottomLine">
&nbsp;
</div>
<div class="row bottomLine bg-info" style="font-size: 1.2em; line-height: 1.4em;">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor6" runat="server" etichetta='<%# traduci("MinPrice") %>' valore='<%# Eval("MinPrice", "{0:C3}") %>' />
</div>
<div class="col-xs-6 text-right">
<uc1:mod_displayHor ID="mod_displayHor9" runat="server" etichetta='<%# traduci("P_MinPrice") %>' valore='<%# Eval("P_MinPrice", "{0:C3}") %>' />
</div>
</div>
<div class="row bottomLine">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor7" runat="server" etichetta='<%# traduci("Charge") %>' valore='<%# Eval("Charge", "{0:P1}") %>' />
</div>
<div class="col-xs-6 text-right">
</div>
</div>
<div class="row bottomLine bg-info" style="font-size: 1.2em; line-height: 1.4em;">
<div class="col-xs-6">
<div class="row">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor8" runat="server" etichetta='<%# traduci("PriceOff") %>' />
</div>
<div class="col-xs-5 text-right">
<asp:TextBox Font-Bold="true" ID="TextBox5" runat="server" Text='<%# Bind("PriceOff","{0:N3}") %>' Width="5em" />
</div>
</div>
</div>
<div class="col-xs-6 text-right">
<uc1:mod_displayHor ID="mod_displayHor11" runat="server" etichetta='<%# traduci("P_PriceOff") %>' valore='<%# Eval("P_PriceOff", "{0:C3}") %>' />
</div>
</div>
<div class="row bottomLine bg-warning" style="font-size: 1.2em; line-height: 1.4em;">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor12" runat="server" etichetta='<%# traduci("NetMar") %>' valore='<%# Eval("NetMar", "{0:C3}") %>' />
</div>
<div class="col-xs-6 text-right">
</div>
</div>
<div class="row bottomLine">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor13" runat="server" etichetta='<%# traduci("FCShield") %>' valore='<%# Eval("FCShield", "{0:P1}") %>' />
</div>
<div class="col-xs-6 text-right">
</div>
</div>
<div class="row">
<div class="col-xs-6 text-left">
<uc1:mod_displayHor ID="mod_displayHor14" runat="server" etichetta='<%# traduci("PckSur") %>' valore='<%# Eval("PckSur", "{0:C3}") %>' />
</div>
<div class="col-xs-6 text-right">
</div>
</div>
<div class="row">
<div class="col-xs-6 col-xs-offset-3">
<div class="col-xs-6">
<asp:LinkButton runat="server" ID="LinkButton1" class="btn btn-success" Width="100%" CausesValidation="true" CommandName="Update"><i class="fa fa-check"></i>&nbsp;<%: traduci("Update") %></asp:LinkButton>
</div>
<div class="col-xs-6">
<asp:LinkButton runat="server" ID="LinkButton2" class="btn btn-danger" Width="100%" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo"></i>&nbsp;<%: traduci("Cancel") %></asp:LinkButton>
</div>
</div>
</div>
</EditItemTemplate>
</asp:FormView>
<asp:ObjectDataSource ID="odsQuotes" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByKey" TypeName="C2P_Data.DS_QuotesTableAdapters.QuoteFull_QTableAdapter" UpdateMethod="updateCosts" OnUpdated="odsQuotes_Updated">
<SelectParameters>
<asp:QueryStringParameter Name="QuoteType" QueryStringField="QuoteType" Type="String" />
<asp:QueryStringParameter Name="CodQuote" QueryStringField="CodQuote" Type="Int64" />
<asp:QueryStringParameter Name="QuoteRev" QueryStringField="QuoteRev" Type="Int32" />
<asp:Parameter DefaultValue="Y" Name="DoUpdate" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Original_QuoteType" Type="String" />
<asp:Parameter Name="Original_CodQuote" Type="Int64" />
<asp:Parameter Name="Original_QuoteRev" Type="Int32" />
<asp:Parameter Name="PriceOff" Type="Decimal" />
</UpdateParameters>
</asp:ObjectDataSource>
+39 -1
View File
@@ -7,11 +7,49 @@ using System.Web.UI.WebControls;
namespace C2P.WebUserControls
{
public partial class mod_S_Quot : System.Web.UI.UserControl
public partial class mod_S_Quot : SteamWare.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
public event EventHandler eh_update;
/// <summary>
/// fa toggle tra modo edit e read/item
/// </summary>
public void toggleMode()
{
if (frmView.CurrentMode == FormViewMode.ReadOnly)
{
frmView.ChangeMode(FormViewMode.Edit);
}
else
{
frmView.ChangeMode(FormViewMode.ReadOnly);
}
}
protected void odsQuotes_Updated(object sender, ObjectDataSourceStatusEventArgs e)
{
if (eh_update != null)
{
eh_update(this, new EventArgs());
}
}
/// <summary>
/// restituisce classe CSS da confronto di 2 valori numerici:
/// - rosso se val1 minore val2
/// - verde se val1 >= val2
/// </summary>
/// <param name="val1"></param>
/// <param name="val2"></param>
/// <returns></returns>
public string colorByVal(object val1, object val2)
{
string answ = "text-success";
if (Math.Round(Convert.ToDecimal(val1), 3) < Math.Round(Convert.ToDecimal(val2), 3)) answ = "text-danger";
return answ;
}
}
}
+29 -2
View File
@@ -13,12 +13,39 @@ namespace C2P.WebUserControls {
public partial class mod_S_Quot {
/// <summary>
/// mod_Q_Quot1 control.
/// BundleReference1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::C2P.WebUserControls.mod_Q_Quot mod_Q_Quot1;
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference1;
/// <summary>
/// BundleReference2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference2;
/// <summary>
/// frmView control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.FormView frmView;
/// <summary>
/// odsQuotes control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsQuotes;
}
}
+1 -3
View File
@@ -267,9 +267,7 @@ namespace C2P.WebUserControls
mod_S_Dies1.Visible = true;
break;
case "Quote":
#if false
if (prevReq == req) mod_S_Quot1.toggleMode();
#endif
if (prevReq == req) mod_S_Quot1.toggleMode();
break;
default:
mod_S_Costs1.Visible = false;
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.