diff --git a/C2P/WebUserControls/mod_S_ExtrPar.ascx b/C2P/WebUserControls/mod_S_ExtrPar.ascx
index d572799..3bc8d68 100644
--- a/C2P/WebUserControls/mod_S_ExtrPar.ascx
+++ b/C2P/WebUserControls/mod_S_ExtrPar.ascx
@@ -158,11 +158,11 @@
@@ -181,7 +181,7 @@
-
+
diff --git a/C2P/WebUserControls/mod_S_ExtrPar.ascx.cs b/C2P/WebUserControls/mod_S_ExtrPar.ascx.cs
index ae98952..15076a6 100644
--- a/C2P/WebUserControls/mod_S_ExtrPar.ascx.cs
+++ b/C2P/WebUserControls/mod_S_ExtrPar.ascx.cs
@@ -62,5 +62,42 @@ namespace C2P.WebUserControls
}
}
}
+ ///
+ /// intercetto evento update
+ ///
+ ///
+ ///
+ protected void odsQuotes_Updating(object sender, ObjectDataSourceMethodEventArgs e)
+ {
+ // verifico i campi che possono contenere "%" e percentuali x sistemare come decimal...
+ e.InputParameters["WSR01_sim"] = fixPerc(e.InputParameters["WSR01_sim"].ToString());
+ e.InputParameters["MSR01_sim"] = fixPerc(e.InputParameters["MSR01_sim"].ToString());
+
+ }
+ ///
+ /// sistema un valore stringa ad un decimal per valori "%" corretti, secondo regola
+ /// - se > 1 è da dividere per 100
+ /// - se contiene % è da dividere per 100
+ /// - altrimenti è già da convertire decimal
+ ///
+ ///
+ ///
+ protected decimal fixPerc(string originalVal)
+ {
+ decimal answ = 0;
+ try
+ {
+ // inizio convertendo ..
+ answ = Convert.ToDecimal(originalVal);
+ // se > 1 divido per 100...
+ if (answ > 1)
+ {
+ answ = answ / 100;
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
}
}
\ No newline at end of file
diff --git a/C2P/WebUserControls/mod_S_PackPar.ascx b/C2P/WebUserControls/mod_S_PackPar.ascx
index 31a3cc6..e70bd70 100644
--- a/C2P/WebUserControls/mod_S_PackPar.ascx
+++ b/C2P/WebUserControls/mod_S_PackPar.ascx
@@ -115,7 +115,7 @@
-
+
diff --git a/C2P/WebUserControls/mod_S_PackPar.ascx.cs b/C2P/WebUserControls/mod_S_PackPar.ascx.cs
index 885c37d..660e05f 100644
--- a/C2P/WebUserControls/mod_S_PackPar.ascx.cs
+++ b/C2P/WebUserControls/mod_S_PackPar.ascx.cs
@@ -62,5 +62,42 @@ namespace C2P.WebUserControls
}
}
}
+ ///
+ /// intercetto evento update
+ ///
+ ///
+ ///
+ protected void odsQuotes_Updating(object sender, ObjectDataSourceMethodEventArgs e)
+ {
+ // verifico i campi che possono contenere "%" e percentuali x sistemare come decimal...
+ e.InputParameters["DSR_sim"] = fixPerc(e.InputParameters["DSR_sim"].ToString());
+
+ }
+ ///
+ /// sistema un valore stringa ad un decimal per valori "%" corretti, secondo regola
+ /// - se > 1 è da dividere per 100
+ /// - se contiene % è da dividere per 100
+ /// - altrimenti è già da convertire decimal
+ ///
+ ///
+ ///
+ protected decimal fixPerc(string originalVal)
+ {
+ decimal answ = 0;
+ try
+ {
+ // inizio convertendo ..
+ answ = Convert.ToDecimal(originalVal);
+ // se > 1 divido per 100...
+ if (answ > 1)
+ {
+ answ = answ / 100;
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+
}
}
\ No newline at end of file
diff --git a/C2P/bin/C2P.dll b/C2P/bin/C2P.dll
index c013335..0043ac2 100644
Binary files a/C2P/bin/C2P.dll and b/C2P/bin/C2P.dll differ
diff --git a/C2P/bin/C2P_Data.dll b/C2P/bin/C2P_Data.dll
index 160ad3d..1cbccf7 100644
Binary files a/C2P/bin/C2P_Data.dll and b/C2P/bin/C2P_Data.dll differ
diff --git a/C2P/bin/SteamWare.dll b/C2P/bin/SteamWare.dll
index 51026c5..6fe7d07 100644
Binary files a/C2P/bin/SteamWare.dll and b/C2P/bin/SteamWare.dll differ
diff --git a/C2P_Report/bin/C2P_Data.dll b/C2P_Report/bin/C2P_Data.dll
index 160ad3d..1cbccf7 100644
Binary files a/C2P_Report/bin/C2P_Data.dll and b/C2P_Report/bin/C2P_Data.dll differ
diff --git a/C2P_Report/bin/C2P_Report.dll b/C2P_Report/bin/C2P_Report.dll
index 8c78891..8d9fe3d 100644
Binary files a/C2P_Report/bin/C2P_Report.dll and b/C2P_Report/bin/C2P_Report.dll differ
diff --git a/C2P_Report/bin/SteamWare.dll b/C2P_Report/bin/SteamWare.dll
index 51026c5..6fe7d07 100644
Binary files a/C2P_Report/bin/SteamWare.dll and b/C2P_Report/bin/SteamWare.dll differ