1.9.130
fix colori x newProduct e quote detail e elenco (cambioa verde/giallo/rosso con pari criteri), aggiunto componente in utils x calcolo css
This commit is contained in:
@@ -177,7 +177,7 @@
|
||||
<asp:Label runat="server" ID="lblHeadPO" Text="PO" ToolTip="Price Offeres" />
|
||||
</HeaderTemplate>--%>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Eval("PriceOff", "{0:C3}") %>' CssClass='<%# priceVsCost(Eval("QuoteType"),Eval("FullCost"),Eval("MinPrice"),Eval("MinPrice_sim"),Eval("PriceOff")) %>' />
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Eval("PriceOff", "{0:C3}") %>' CssClass='<%# C2P_Data.utils.priceVsCost(Eval("QuoteType"),Eval("FullCost"),Eval("MinPrice"),Eval("MinPrice_sim"),Eval("PriceOff")) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="txtPriceOff" runat="server" Text='<%# Bind("PriceOff") %>' Width="5em" />
|
||||
|
||||
@@ -226,52 +226,6 @@ namespace C2P.WebUserControls
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Calcola css dato valore prezzo offerto vs importi full cost e min price
|
||||
/// </summary>
|
||||
/// <param name="QuoteType"></param>
|
||||
/// <param name="FullCost"></param>
|
||||
/// <param name="MinPrice"></param>
|
||||
/// <param name="MinPrice_sim"></param>
|
||||
/// <param name="PriceOff"></param>
|
||||
/// <returns></returns>
|
||||
public string priceVsCost(object _quoteType, object _FullCost, object _MinPrice, object _MinPrice_sim, object _PriceOff)
|
||||
{
|
||||
string answ = "";
|
||||
string QType = "";
|
||||
double FullCost = 0;
|
||||
double MinPrice = 0;
|
||||
double PriceOff = 0;
|
||||
try
|
||||
{
|
||||
QType = _quoteType.ToString();
|
||||
FullCost = Convert.ToDouble(_FullCost);
|
||||
if (QType == "S")
|
||||
{
|
||||
MinPrice = Convert.ToDouble(_MinPrice_sim);
|
||||
}
|
||||
else
|
||||
{
|
||||
MinPrice = Convert.ToDouble(_MinPrice);
|
||||
}
|
||||
PriceOff = Convert.ToDouble(_PriceOff);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (PriceOff > MinPrice && (FullCost > 0 && MinPrice > 0))
|
||||
{
|
||||
answ = "allOk";
|
||||
}
|
||||
else if (PriceOff > FullCost && (FullCost > 0 && MinPrice > 0))
|
||||
{
|
||||
answ = "warnOrange";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "warnRed";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// stringa formattata del numero di record mostrati
|
||||
/// </summary>
|
||||
public string numRecords
|
||||
|
||||
@@ -25,9 +25,8 @@
|
||||
</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='<%# priceVsCost(Eval("QuoteType"),Eval("FullCost"),Eval("MinPrice"),Eval("MinPrice_sim"),Eval("PriceOff")) %>' />
|
||||
<uc1:mod_displayHor ID="mod_displayHor8" runat="server" etichetta='<%# traduci("PriceOff") %>' valore='<%# Eval("PriceOff", "{0:C3}") %>' valueCss='<%# C2P_Data.utils.priceVsCost(Eval("QuoteType"),Eval("FullCost"),Eval("MinPrice"),Eval("MinPrice_sim"),Eval("PriceOff")) %>' />
|
||||
</div>
|
||||
<%--valueCss='<%# colorByVal(Eval("PriceOff"), Eval("MinPrice")) %>'--%>
|
||||
<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>
|
||||
|
||||
@@ -46,66 +46,6 @@ namespace C2P.WebUserControls
|
||||
}
|
||||
}
|
||||
/// <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;
|
||||
}
|
||||
/// <summary>
|
||||
/// Calcola css dato valore prezzo offerto vs importi full cost e min price
|
||||
/// </summary>
|
||||
/// <param name="QuoteType"></param>
|
||||
/// <param name="FullCost"></param>
|
||||
/// <param name="MinPrice"></param>
|
||||
/// <param name="MinPrice_sim"></param>
|
||||
/// <param name="PriceOff"></param>
|
||||
/// <returns></returns>
|
||||
public string priceVsCost(object _quoteType, object _FullCost, object _MinPrice, object _MinPrice_sim, object _PriceOff)
|
||||
{
|
||||
string answ = "";
|
||||
string QType = "";
|
||||
double FullCost = 0;
|
||||
double MinPrice = 0;
|
||||
double PriceOff = 0;
|
||||
try
|
||||
{
|
||||
QType = _quoteType.ToString();
|
||||
FullCost = Convert.ToDouble(_FullCost);
|
||||
if (QType == "S")
|
||||
{
|
||||
MinPrice = Convert.ToDouble(_MinPrice_sim);
|
||||
}
|
||||
else
|
||||
{
|
||||
MinPrice = Convert.ToDouble(_MinPrice);
|
||||
}
|
||||
PriceOff = Convert.ToDouble(_PriceOff);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (PriceOff > MinPrice && (FullCost > 0 && MinPrice > 0))
|
||||
{
|
||||
answ = "allOk";
|
||||
}
|
||||
else if (PriceOff > FullCost && (FullCost > 0 && MinPrice > 0))
|
||||
{
|
||||
answ = "warnOrange";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "warnRed";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo se inviare evento refresh al cambio di modo della formview
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</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")) %>' />
|
||||
<uc1:mod_displayHor ID="mod_displayHor8" runat="server" etichetta='<%# traduci("PriceOff") %>' valore='<%# Eval("PriceOff", "{0:C3}") %>' valueCss='<%# C2P_Data.utils.priceVsCost(Eval("QuoteType"),Eval("FullCost"),Eval("MinPrice"),Eval("MinPrice_sim"),Eval("PriceOff")) %>' />
|
||||
</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}") %>' />
|
||||
|
||||
@@ -47,20 +47,6 @@ namespace C2P.WebUserControls
|
||||
}
|
||||
}
|
||||
/// <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;
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo se inviare evento refresh al cambio di modo della formview
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -75,6 +75,7 @@
|
||||
<Compile Include="reportPrinter.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="utils.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.Config" />
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace C2P_Data
|
||||
{
|
||||
/// <summary>
|
||||
/// utility generali applicazione
|
||||
/// </summary>
|
||||
public class utils
|
||||
{
|
||||
|
||||
protected utils()
|
||||
{
|
||||
// avvio componente, nulla da fare...
|
||||
}
|
||||
/// <summary>
|
||||
/// Calcola css dato valore prezzo offerto vs importi full cost e min price
|
||||
/// </summary>
|
||||
/// <param name="QuoteType"></param>
|
||||
/// <param name="FullCost"></param>
|
||||
/// <param name="MinPrice"></param>
|
||||
/// <param name="MinPrice_sim"></param>
|
||||
/// <param name="PriceOff"></param>
|
||||
/// <returns></returns>
|
||||
public static string priceVsCost(object _quoteType, object _FullCost, object _MinPrice, object _MinPrice_sim, object _PriceOff)
|
||||
{
|
||||
string answ = "";
|
||||
string QType = "";
|
||||
double FullCost = 0;
|
||||
double MinPrice = 0;
|
||||
double PriceOff = 0;
|
||||
try
|
||||
{
|
||||
QType = _quoteType.ToString();
|
||||
FullCost = Convert.ToDouble(_FullCost);
|
||||
if (QType == "S")
|
||||
{
|
||||
MinPrice = Convert.ToDouble(_MinPrice_sim);
|
||||
}
|
||||
else
|
||||
{
|
||||
MinPrice = Convert.ToDouble(_MinPrice);
|
||||
}
|
||||
PriceOff = Convert.ToDouble(_PriceOff);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (PriceOff > MinPrice && (FullCost > 0 && MinPrice > 0))
|
||||
{
|
||||
answ = "allOk";
|
||||
}
|
||||
else if (PriceOff > FullCost && (FullCost > 0 && MinPrice > 0))
|
||||
{
|
||||
answ = "warnOrange";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "warnRed";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// singleton gestione utility
|
||||
/// </summary>
|
||||
public static utils man = new utils();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
+20306
-12410
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("1.9.129.283")]
|
||||
[assembly: AssemblyFileVersion("1.9.129.283")]
|
||||
[assembly: AssemblyVersion("1.9.130.283")]
|
||||
[assembly: AssemblyFileVersion("1.9.130.283")]
|
||||
[assembly: AssemblyCopyright("Proxima & Steamware © 2013-2014")]
|
||||
[assembly: AssemblyCompany("Steamware")]
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("1.9.129.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyFileVersion("1.9.129.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyVersion("1.9.130.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyFileVersion("1.9.130.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyCopyright("Proxima & Steamware © 2013-<#= DateTime.Now.Year #>")]
|
||||
[assembly: AssemblyCompany("Steamware")]
|
||||
<#+
|
||||
|
||||
Reference in New Issue
Block a user