1155 lines
42 KiB
C#
1155 lines
42 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.17929
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Helpers;
|
|
using System.Web.Mvc;
|
|
using System.Web.Mvc.Ajax;
|
|
using System.Web.Mvc.Html;
|
|
using System.Web.Routing;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.WebPages;
|
|
using Disco.BI.Extensions;
|
|
using Disco.Models.Repository;
|
|
using Disco.Web;
|
|
using Disco.Web.Extensions;
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Show.cshtml")]
|
|
public class Show : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceBatch.ShowModel>
|
|
{
|
|
public Show()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 2 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), Model.DeviceBatch.ToString());
|
|
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
|
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
|
|
Html.BundleDeferred("~/ClientScripts/Modules/tinymce");
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteLiteral(" class=\"form deviceBatches\"");
|
|
|
|
WriteLiteral(" style=\"width: 730px\"");
|
|
|
|
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 150px\"");
|
|
|
|
WriteLiteral(">\r\n Id:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 15 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.DisplayFor(model => model.DeviceBatch.Id));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
|
" Name:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 22 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.Name));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 23 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 24 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
|
"ctions.PropertyChangeHelper(\r\n $(\'#DeviceBatch_Name\')" +
|
|
",\r\n \'Invalid Name\',\r\n \'");
|
|
|
|
|
|
#line 30 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateName(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'BatchName'
|
|
);
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Device Count:
|
|
</th>
|
|
<td>
|
|
");
|
|
|
|
|
|
#line 42 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 42 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.DeviceBatch.UnitQuantity.HasValue)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span>");
|
|
|
|
|
|
#line 44 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceCount);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" of ");
|
|
|
|
|
|
#line 44 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.UnitQuantity.Value);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</span>\r\n");
|
|
|
|
|
|
#line 45 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceCount);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" managed by Disco\r\n");
|
|
|
|
|
|
#line 51 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 51 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.DeviceDecommissionedCount > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">(");
|
|
|
|
|
|
#line 53 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceDecommissionedCount);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n Decommissioned)</span>\r\n");
|
|
|
|
|
|
#line 55 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
|
" Purchase:\r\n </th>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"details\"");
|
|
|
|
WriteLiteral(">\r\n <table");
|
|
|
|
WriteLiteral(" class=\"sub\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(" style=\"width: 100px\"");
|
|
|
|
WriteLiteral(">\r\n Purchase Date:\r\n </th>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 69 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 70 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"
|
|
<script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_PurchaseDate');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Invalid Date',
|
|
'");
|
|
|
|
|
|
#line 77 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdatePurchaseDate(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'PurchaseDate',
|
|
null,
|
|
true
|
|
);
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Supplier:
|
|
</th>
|
|
<td>
|
|
");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 91 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.Supplier));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 92 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 93 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_Supplier'),
|
|
'Batch Supplier',
|
|
'");
|
|
|
|
|
|
#line 99 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateSupplier(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'Supplier'
|
|
);
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Unit Cost:
|
|
</th>
|
|
<td>
|
|
");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 111 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.UnitCost));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 112 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 113 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_UnitCost'),
|
|
'Unit Cost',
|
|
'");
|
|
|
|
|
|
#line 119 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateUnitCost(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'UnitCost'
|
|
);
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Quantity:
|
|
</th>
|
|
<td>
|
|
");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 131 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.UnitQuantity));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 132 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 133 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_UnitQuantity'),
|
|
'Quantity',
|
|
'");
|
|
|
|
|
|
#line 139 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateUnitQuantity(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'UnitQuantity'
|
|
);
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div");
|
|
|
|
WriteLiteral(" id=\"DeviceBatch_PurchaseDetails_Container\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n Details ");
|
|
|
|
|
|
#line 149 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxPurchaseDetails"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 151 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var model = {
|
|
$field: $('#DeviceBatch_PurchaseDetails'),
|
|
fieldName: 'PurchaseDetails',
|
|
$ajax_loading: null,
|
|
$ajax_ok: null,
|
|
updated: function () {
|
|
if (!model.$ajax_loading)
|
|
model.$ajax_loading = $('#ajax' + model.fieldName + '_loading');
|
|
if (!model.$ajax_ok)
|
|
model.$ajax_ok = $('#ajax' + model.fieldName + '_ok');
|
|
model.$ajax_loading.show();
|
|
var data = {};
|
|
data[model.fieldName] = model.$field.tinymce().getContent();
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 168 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdatePurchaseDetails(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n tradi" +
|
|
"tional: true,\r\n type: \'POST\',\r\n " +
|
|
" success: function (d) {\r\n " +
|
|
" if (d == \'OK\') {\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" model.$ajax_ok.show().delay(\'fast\').fadeOut(\'slow\');\r\n " +
|
|
" } else {\r\n mo" +
|
|
"del.$ajax_loading.hide();\r\n alert" +
|
|
"(\'Unable to update purchase details: \' + d);\r\n " +
|
|
" }\r\n },\r\n " +
|
|
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
|
" alert(\'Unable to update purchase details: \' + e" +
|
|
"rrorThrown);\r\n model.$ajax_loading.hi" +
|
|
"de();\r\n }\r\n " +
|
|
" })\r\n }\r\n };\r\n\r\n " +
|
|
" model.$field.tinymce({\r\n " +
|
|
" theme: \'simple\',\r\n setup: function (ed) {\r\n " +
|
|
" ed.onInit.add(function (ed) {\r\n " +
|
|
" $(ed.getWin()).blur(model.updated);\r\n " +
|
|
" });\r\n }\r\n " +
|
|
" });\r\n });\r\n </script>\r\n " +
|
|
" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n" +
|
|
" Default Device Model:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 208 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 209 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 210 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
|
"ctions.PropertyChangeHelper(\r\n $(\'#DeviceBatch_Defaul" +
|
|
"tDeviceModelId\'),\r\n null,\r\n " +
|
|
" \'");
|
|
|
|
|
|
#line 216 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateDefaultDeviceModelId(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'DefaultDeviceModelId\'\r\n )" +
|
|
";\r\n });\r\n </script>\r\n <br />\r\n " +
|
|
" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(@">Devices added offline will default to this Device Model.
|
|
Once a device enrols the Device Model will be accurately represented.</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Warranty:
|
|
</th>
|
|
<td");
|
|
|
|
WriteLiteral(" class=\"details\"");
|
|
|
|
WriteLiteral(">\r\n <table");
|
|
|
|
WriteLiteral(" class=\"sub\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(" style=\"width: 100px\"");
|
|
|
|
WriteLiteral(">\r\n Valid Until:\r\n </th>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 237 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.WarrantyValidUntil));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 238 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"
|
|
<script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_WarrantyValidUntil');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Warranty Valid Until',
|
|
'");
|
|
|
|
|
|
#line 245 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateWarrantyValidUntil(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'WarrantyValidUntil',
|
|
null,
|
|
true
|
|
);
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div");
|
|
|
|
WriteLiteral(" id=\"DeviceBatch_WarrantyDetails_Container\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n Details ");
|
|
|
|
|
|
#line 257 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxWarrantyDetails"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 259 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.WarrantyDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var model = {
|
|
$field: $('#DeviceBatch_WarrantyDetails'),
|
|
fieldName: 'WarrantyDetails',
|
|
$ajax_loading: null,
|
|
$ajax_ok: null,
|
|
updated: function () {
|
|
if (!model.$ajax_loading)
|
|
model.$ajax_loading = $('#ajax' + model.fieldName + '_loading');
|
|
if (!model.$ajax_ok)
|
|
model.$ajax_ok = $('#ajax' + model.fieldName + '_ok');
|
|
model.$ajax_loading.show();
|
|
var data = {};
|
|
data[model.fieldName] = model.$field.tinymce().getContent();
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 276 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateWarrantyDetails(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n tradi" +
|
|
"tional: true,\r\n type: \'POST\',\r\n " +
|
|
" success: function (d) {\r\n " +
|
|
" if (d == \'OK\') {\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" model.$ajax_ok.show().delay(\'fast\').fadeOut(\'slow\');\r\n " +
|
|
" } else {\r\n mo" +
|
|
"del.$ajax_loading.hide();\r\n alert" +
|
|
"(\'Unable to update warranty details: \' + d);\r\n " +
|
|
" }\r\n },\r\n " +
|
|
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
|
" alert(\'Unable to update warranty details: \' + e" +
|
|
"rrorThrown);\r\n model.$ajax_loading.hi" +
|
|
"de();\r\n }\r\n " +
|
|
" })\r\n }\r\n };\r\n\r\n " +
|
|
" model.$field.tinymce({\r\n " +
|
|
" theme: \'simple\',\r\n setup: function (ed) {\r\n " +
|
|
" ed.onInit.add(function (ed) {\r\n " +
|
|
" $(ed.getWin()).blur(model.updated);\r\n " +
|
|
" });\r\n }\r\n " +
|
|
" });\r\n });\r\n </script>\r\n " +
|
|
" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n" +
|
|
" Insurance:\r\n </th>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"details\"");
|
|
|
|
WriteLiteral(">\r\n <table");
|
|
|
|
WriteLiteral(" class=\"sub\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(" style=\"width: 100px\"");
|
|
|
|
WriteLiteral(">\r\n Supplier:\r\n </th>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 322 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuranceSupplier));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 323 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 324 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_InsuranceSupplier'),
|
|
'Insurance Supplier',
|
|
'");
|
|
|
|
|
|
#line 330 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuranceSupplier(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'InsuranceSupplier'
|
|
);
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(">\r\n Insured Date:\r\n </th>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 342 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuredDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 343 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"
|
|
<script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_InsuredDate');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Insured Date',
|
|
'");
|
|
|
|
|
|
#line 350 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuredDate(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'InsuredDate',
|
|
null,
|
|
true
|
|
);
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(">\r\n Insured Until:\r\n </th>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 364 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuredUntil));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 365 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"
|
|
<script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_InsuredUntil');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Insured Until',
|
|
'");
|
|
|
|
|
|
#line 372 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuredUntil(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"',
|
|
'InsuredUntil',
|
|
null,
|
|
true
|
|
);
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div");
|
|
|
|
WriteLiteral(" id=\"DeviceBatch_InsuranceDetails_Container\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n Details ");
|
|
|
|
|
|
#line 384 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxInsuranceDetails"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 386 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuranceDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var model = {
|
|
$DeviceBatch_Comments: $('#DeviceBatch_InsuranceDetails'),
|
|
$ajax_loading: null,
|
|
$ajax_ok: null,
|
|
updated: function () {
|
|
if (!model.$ajax_loading)
|
|
model.$ajax_loading = $('#ajaxInsuranceDetails_loading');
|
|
if (!model.$ajax_ok)
|
|
model.$ajax_ok = $('#ajaxInsuranceDetails_ok');
|
|
model.$ajax_loading.show();
|
|
var data = { InsuranceDetails: model.$DeviceBatch_Comments.tinymce().getContent() };
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 401 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuranceDetails(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n tradi" +
|
|
"tional: true,\r\n type: \'POST\',\r\n " +
|
|
" success: function (d) {\r\n " +
|
|
" if (d == \'OK\') {\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" model.$ajax_ok.show().delay(\'fast\').fadeOut(\'slow\');\r\n " +
|
|
" } else {\r\n mo" +
|
|
"del.$ajax_loading.hide();\r\n alert" +
|
|
"(\'Unable to update insurance details: \' + d);\r\n " +
|
|
" }\r\n },\r\n " +
|
|
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
|
" alert(\'Unable to update insurance details: \' +" +
|
|
" errorThrown);\r\n model.$ajax_loading." +
|
|
"hide();\r\n }\r\n " +
|
|
" })\r\n }\r\n };\r\n\r" +
|
|
"\n model.$DeviceBatch_Comments.tinymce({\r\n " +
|
|
" theme: \'simple\',\r\n setup: fun" +
|
|
"ction (ed) {\r\n //ed.onChange.add(model.update" +
|
|
"dThrottle);\r\n ed.onInit.add(function (ed) {\r\n" +
|
|
" $(ed.getWin()).blur(model.updated);\r\n " +
|
|
" });\r\n }\r\n " +
|
|
" });\r\n });\r\n </scr" +
|
|
"ipt>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>\r\n Comments:<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 440 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxComments"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 443 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.Comments));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var model = {
|
|
$DeviceBatch_Comments: $('#DeviceBatch_Comments'),
|
|
$ajax_loading: null,
|
|
$ajax_ok: null,
|
|
updated: function () {
|
|
if (!model.$ajax_loading)
|
|
model.$ajax_loading = $('#ajaxComments_loading');
|
|
if (!model.$ajax_ok)
|
|
model.$ajax_ok = $('#ajaxComments_ok');
|
|
model.$ajax_loading.show();
|
|
var data = { Comments: model.$DeviceBatch_Comments.tinymce().getContent() };
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 458 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateComments(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
|
" data: data,\r\n traditional: true" +
|
|
",\r\n type: \'POST\',\r\n " +
|
|
" success: function (d) {\r\n if (d" +
|
|
" == \'OK\') {\r\n model.$ajax_loading.hid" +
|
|
"e();\r\n model.$ajax_ok.show().delay(\'f" +
|
|
"ast\').fadeOut(\'slow\');\r\n } else {\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" alert(\'Unable to update comments: \' + d);\r\n " +
|
|
" }\r\n },\r\n " +
|
|
" error: function (jqXHR, textStatus, errorThrown" +
|
|
") {\r\n alert(\'Unable to update comments: \'" +
|
|
" + errorThrown);\r\n model.$ajax_loading.hi" +
|
|
"de();\r\n }\r\n })" +
|
|
"\r\n }\r\n };\r\n\r\n " +
|
|
" model.$DeviceBatch_Comments.tinymce({\r\n theme:" +
|
|
" \'simple\',\r\n setup: function (ed) {\r\n " +
|
|
" //ed.onChange.add(model.updatedThrottle);\r\n " +
|
|
" ed.onInit.add(function (ed) {\r\n $(" +
|
|
"ed.getWin()).blur(model.updated);\r\n });\r\n " +
|
|
" }\r\n });\r\n });\r\n " +
|
|
" </script>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n" +
|
|
"<div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 496 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 496 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.CanDelete)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 498 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.ActionLinkButton("Delete", MVC.API.DeviceBatch.Delete(Model.DeviceBatch.Id, true), "buttonDelete"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 498 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 500 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.DeviceCount > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 502 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch")));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 502 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|