Fix: Warranty Provider Properties & JSON.net
This commit is contained in:
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0516.2044")]
|
[assembly: AssemblyVersion("1.2.0521.1121")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0516.2044")]
|
[assembly: AssemblyFileVersion("1.2.0521.1121")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0516.2044")]
|
[assembly: AssemblyVersion("1.2.0521.1121")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0516.2044")]
|
[assembly: AssemblyFileVersion("1.2.0521.1121")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0516.2044")]
|
[assembly: AssemblyVersion("1.2.0521.1121")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0516.2044")]
|
[assembly: AssemblyFileVersion("1.2.0521.1121")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0516.2044")]
|
[assembly: AssemblyVersion("1.2.0521.1121")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0516.2044")]
|
[assembly: AssemblyFileVersion("1.2.0521.1121")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0516.2044")]
|
[assembly: AssemblyVersion("1.2.0521.1121")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0516.2044")]
|
[assembly: AssemblyFileVersion("1.2.0521.1121")]
|
||||||
@@ -37,8 +37,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@{
|
@{
|
||||||
var serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
|
var eventTypesFilterJson = (Model.EventTypesFilter != null) ? Newtonsoft.Json.JsonConvert.SerializeObject(Model.EventTypesFilter.Select(et => et.Id).ToArray()) : "null";
|
||||||
var eventTypesFilterJson = (Model.EventTypesFilter != null) ? serializer.Serialize(Model.EventTypesFilter.Select(et => et.Id).ToArray()) : "null";
|
|
||||||
}
|
}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|||||||
@@ -164,8 +164,7 @@ WriteLiteral("></td>\r\n </tr>\r\n </tbody>\r\n
|
|||||||
|
|
||||||
#line 39 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 39 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
|
|
||||||
var serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
|
var eventTypesFilterJson = (Model.EventTypesFilter != null) ? Newtonsoft.Json.JsonConvert.SerializeObject(Model.EventTypesFilter.Select(et => et.Id).ToArray()) : "null";
|
||||||
var eventTypesFilterJson = (Model.EventTypesFilter != null) ? serializer.Serialize(Model.EventTypesFilter.Select(et => et.Id).ToArray()) : "null";
|
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -177,7 +176,7 @@ WriteLiteral(" type=\"text/javascript\"");
|
|||||||
WriteLiteral(">\r\n $(function () {\r\n var logEventsHost = $(\'LogEvents_");
|
WriteLiteral(">\r\n $(function () {\r\n var logEventsHost = $(\'LogEvents_");
|
||||||
|
|
||||||
|
|
||||||
#line 45 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 44 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
Write(uniqueId);
|
Write(uniqueId);
|
||||||
|
|
||||||
|
|
||||||
@@ -186,7 +185,7 @@ WriteLiteral(">\r\n $(function () {\r\n var logEventsHost = $(
|
|||||||
WriteLiteral("\');\r\n var logModuleId = \'");
|
WriteLiteral("\');\r\n var logModuleId = \'");
|
||||||
|
|
||||||
|
|
||||||
#line 46 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 45 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
Write(Model.ModuleFilter != null ? Model.ModuleFilter.ModuleId.ToString() : null);
|
Write(Model.ModuleFilter != null ? Model.ModuleFilter.ModuleId.ToString() : null);
|
||||||
|
|
||||||
|
|
||||||
@@ -195,7 +194,7 @@ WriteLiteral("\');\r\n var logModuleId = \'");
|
|||||||
WriteLiteral("\';\r\n var logModuleLiveGroupName = \'");
|
WriteLiteral("\';\r\n var logModuleLiveGroupName = \'");
|
||||||
|
|
||||||
|
|
||||||
#line 47 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 46 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
Write(Model.ModuleFilter != null ? Model.ModuleFilter.LiveLogGroupName : Disco.BI.Interop.SignalRHandlers.LogNotifications.AllNotifications);
|
Write(Model.ModuleFilter != null ? Model.ModuleFilter.LiveLogGroupName : Disco.BI.Interop.SignalRHandlers.LogNotifications.AllNotifications);
|
||||||
|
|
||||||
|
|
||||||
@@ -204,7 +203,7 @@ WriteLiteral("\';\r\n var logModuleLiveGroupName = \'");
|
|||||||
WriteLiteral("\';\r\n var logEventTypeFiltered = ");
|
WriteLiteral("\';\r\n var logEventTypeFiltered = ");
|
||||||
|
|
||||||
|
|
||||||
#line 48 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 47 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
Write(eventTypesFilterJson);
|
Write(eventTypesFilterJson);
|
||||||
|
|
||||||
|
|
||||||
@@ -213,7 +212,7 @@ WriteLiteral("\';\r\n var logEventTypeFiltered = ");
|
|||||||
WriteLiteral(";\r\n var logStartFiler = ");
|
WriteLiteral(";\r\n var logStartFiler = ");
|
||||||
|
|
||||||
|
|
||||||
#line 49 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 48 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
Write(AjaxHelpers.JsonDate(Model.StartFilter));
|
Write(AjaxHelpers.JsonDate(Model.StartFilter));
|
||||||
|
|
||||||
|
|
||||||
@@ -222,7 +221,7 @@ WriteLiteral(";\r\n var logStartFiler = ");
|
|||||||
WriteLiteral(";\r\n var logEndFiler = ");
|
WriteLiteral(";\r\n var logEndFiler = ");
|
||||||
|
|
||||||
|
|
||||||
#line 50 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 49 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
Write(AjaxHelpers.JsonDate(Model.EndFilter));
|
Write(AjaxHelpers.JsonDate(Model.EndFilter));
|
||||||
|
|
||||||
|
|
||||||
@@ -231,7 +230,7 @@ WriteLiteral(";\r\n var logEndFiler = ");
|
|||||||
WriteLiteral(";\r\n var logTakeFiler = \'");
|
WriteLiteral(";\r\n var logTakeFiler = \'");
|
||||||
|
|
||||||
|
|
||||||
#line 51 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 50 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
Write(Model.TakeFilter);
|
Write(Model.TakeFilter);
|
||||||
|
|
||||||
|
|
||||||
@@ -241,7 +240,7 @@ WriteLiteral("\';\r\n var liveConnection = null;\r\n var l
|
|||||||
"tion = \'");
|
"tion = \'");
|
||||||
|
|
||||||
|
|
||||||
#line 53 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 52 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
Write(Model.JavascriptLiveEventFunctionName);
|
Write(Model.JavascriptLiveEventFunctionName);
|
||||||
|
|
||||||
|
|
||||||
@@ -250,7 +249,7 @@ WriteLiteral("\';\r\n var liveConnection = null;\r\n var l
|
|||||||
WriteLiteral("\';\r\n var useLive = (\'True\'===\'");
|
WriteLiteral("\';\r\n var useLive = (\'True\'===\'");
|
||||||
|
|
||||||
|
|
||||||
#line 54 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 53 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
Write(Model.IsLive);
|
Write(Model.IsLive);
|
||||||
|
|
||||||
|
|
||||||
@@ -293,7 +292,7 @@ WriteLiteral(@"');
|
|||||||
url: '");
|
url: '");
|
||||||
|
|
||||||
|
|
||||||
#line 88 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 87 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
Write(Url.Action(MVC.API.Logging.RetrieveEvents()));
|
Write(Url.Action(MVC.API.Logging.RetrieveEvents()));
|
||||||
|
|
||||||
|
|
||||||
@@ -330,7 +329,7 @@ WriteLiteral(@"',
|
|||||||
liveConnection = $.connection('");
|
liveConnection = $.connection('");
|
||||||
|
|
||||||
|
|
||||||
#line 116 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
#line 115 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||||
Write(Url.Content("~/API/Logging/Notifications"));
|
Write(Url.Content("~/API/Logging/Notifications"));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using Disco.Services.Plugins;
|
|||||||
using Disco.Models.UI.Job;
|
using Disco.Models.UI.Job;
|
||||||
using Disco.Services.Plugins.Features.UIExtension;
|
using Disco.Services.Plugins.Features.UIExtension;
|
||||||
using Disco.BI.JobBI;
|
using Disco.BI.JobBI;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Disco.Web.Controllers
|
namespace Disco.Web.Controllers
|
||||||
{
|
{
|
||||||
@@ -440,8 +441,7 @@ namespace Disco.Web.Controllers
|
|||||||
|
|
||||||
if (warrantyProviderProperties != null)
|
if (warrantyProviderProperties != null)
|
||||||
{
|
{
|
||||||
JavaScriptSerializer j = new JavaScriptSerializer();
|
m.WarrantyProviderPropertiesJson = JsonConvert.SerializeObject(warrantyProviderProperties);
|
||||||
m.WarrantyProviderPropertiesJson = j.Serialize(warrantyProviderProperties);
|
|
||||||
}
|
}
|
||||||
m.DiscloseProperties = p.SubmitJobDiscloseInfo(dbContext, m.Job, m.OrganisationAddress, m.TechUser, m.FaultDescription, warrantyProviderProperties);
|
m.DiscloseProperties = p.SubmitJobDiscloseInfo(dbContext, m.Job, m.OrganisationAddress, m.TechUser, m.FaultDescription, warrantyProviderProperties);
|
||||||
return View(Views.LogWarrantyDisclose, m);
|
return View(Views.LogWarrantyDisclose, m);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Disco.BI;
|
|||||||
using System.Web.Script.Serialization;
|
using System.Web.Script.Serialization;
|
||||||
using Disco.Services.Plugins;
|
using Disco.Services.Plugins;
|
||||||
using Disco.Services.Plugins.Features.WarrantyProvider;
|
using Disco.Services.Plugins.Features.WarrantyProvider;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Disco.Web.Models.Job
|
namespace Disco.Web.Models.Job
|
||||||
{
|
{
|
||||||
@@ -38,12 +39,11 @@ namespace Disco.Web.Models.Job
|
|||||||
public Dictionary<string, string> WarrantyProviderProperties()
|
public Dictionary<string, string> WarrantyProviderProperties()
|
||||||
{
|
{
|
||||||
Dictionary<string, string> p = default(Dictionary<string, string>);
|
Dictionary<string, string> p = default(Dictionary<string, string>);
|
||||||
if (string.IsNullOrEmpty(this.WarrantyProviderPropertiesJson))
|
if (!string.IsNullOrEmpty(this.WarrantyProviderPropertiesJson))
|
||||||
{
|
{
|
||||||
JavaScriptSerializer s = new JavaScriptSerializer();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
p = s.Deserialize<Dictionary<string, string>>(this.WarrantyProviderPropertiesJson);
|
p = JsonConvert.DeserializeObject<Dictionary<string, string>>(this.WarrantyProviderPropertiesJson);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.2.0516.2044")]
|
[assembly: AssemblyVersion("1.2.0521.1121")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0516.2044")]
|
[assembly: AssemblyFileVersion("1.2.0521.1121")]
|
||||||
Reference in New Issue
Block a user