2207 lines
79 KiB
C#
2207 lines
79 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.34014
|
|
//
|
|
// 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;
|
|
using Disco.BI.Extensions;
|
|
using Disco.Models.Repository;
|
|
using Disco.Services;
|
|
using Disco.Services.Authorization;
|
|
|
|
#line 2 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
using Disco.Services.Devices.ManagedGroups;
|
|
|
|
#line default
|
|
#line hidden
|
|
using Disco.Services.Web;
|
|
using Disco.Web;
|
|
|
|
#line 3 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
using Disco.Web.Areas.Config.Models.Shared;
|
|
|
|
#line default
|
|
#line hidden
|
|
using Disco.Web.Extensions;
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Show.cshtml")]
|
|
public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.DeviceBatch.ShowModel>
|
|
{
|
|
public Show()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 4 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
Authorization.Require(Claims.Config.DeviceBatch.Show);
|
|
|
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), Model.DeviceBatch.ToString());
|
|
|
|
var canConfig = Authorization.Has(Claims.Config.DeviceBatch.Configure);
|
|
var canDeviceModelShow = Authorization.Has(Claims.Config.DeviceModel.Show);
|
|
|
|
var hideAdvanced =
|
|
Model.DeviceBatch.AssignedUsersLinkedGroup == null &&
|
|
Model.DeviceBatch.DevicesLinkedGroup == null;
|
|
|
|
if (canConfig)
|
|
{
|
|
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");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 962), Tuple.Create("\"", 1035)
|
|
, Tuple.Create(Tuple.Create("", 970), Tuple.Create("form", 970), true)
|
|
, Tuple.Create(Tuple.Create(" ", 974), Tuple.Create("deviceBatches", 975), true)
|
|
|
|
#line 23 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 988), Tuple.Create<System.Object, System.Int32>(hideAdvanced ? " Config_HideAdvanced" : null
|
|
|
|
#line default
|
|
#line hidden
|
|
, 988), false)
|
|
);
|
|
|
|
WriteLiteral(" style=\"width: 730px\"");
|
|
|
|
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" style=\"width: 150px\"");
|
|
|
|
WriteLiteral(">Id:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 29 "..\..\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>Name:\r\n " +
|
|
" </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 36 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 36 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 38 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.Name));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 38 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 39 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 39 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 40 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 40 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_Name'),
|
|
'Invalid Name',
|
|
'");
|
|
|
|
|
|
#line 46 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateName(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'BatchName\'\r\n );\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 51 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 54 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.Name);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 54 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Default Device Mo" +
|
|
"del:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 61 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 63 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels.ToSelectListItems(null, true)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 63 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 64 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 64 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 65 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 65 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <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 71 "..\..\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");
|
|
|
|
|
|
#line 76 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (Model.DefaultDeviceModel == null)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 80 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 82 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DefaultDeviceModel.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 82 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
;
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <br />\r\n <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">Devices added offline will default to this Device Model.\r\n On" +
|
|
"ce a device enrols the Device Model will be accurately represented.</span>\r\n " +
|
|
" </td>\r\n </tr>\r\n <tr>\r\n <th>Devices</th>\r\n " +
|
|
" <td>\r\n");
|
|
|
|
|
|
#line 93 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 93 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.DeviceModelMembers.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <table");
|
|
|
|
WriteLiteral(" class=\"tableData smallTable\"");
|
|
|
|
WriteLiteral(@">
|
|
<thead>
|
|
<tr>
|
|
<th>Model</th>
|
|
<th>Device Count</th>
|
|
<th>Decommissioned</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
");
|
|
|
|
|
|
#line 104 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 104 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
foreach (var membership in Model.DeviceModelMembers.OrderByDescending(dmm => dmm.DeviceCount))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <td>\r\n");
|
|
|
|
|
|
#line 108 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 108 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canDeviceModelShow)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 110 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.ActionLink(membership.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(membership.DeviceModel.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 110 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 114 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(membership.DeviceModel.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 114 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n <t" +
|
|
"d>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 118 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(membership.DeviceCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n " +
|
|
"<td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 121 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(membership.DeviceDecommissionedCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n </tr" +
|
|
">\r\n");
|
|
|
|
|
|
#line 124 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </tbody>\r\n <tfoot>\r\n " +
|
|
" <tr>\r\n <th>Total Models: ");
|
|
|
|
|
|
#line 128 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceModelMembers.Count.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</th>\r\n <th>");
|
|
|
|
|
|
#line 129 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</th>\r\n <th>");
|
|
|
|
|
|
#line 130 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceDecommissionedCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</th>\r\n </tr>\r\n </tfoot>\r\n " +
|
|
" </table>\r\n");
|
|
|
|
|
|
#line 134 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">No device models are referenced in this batch.</div>\r\n");
|
|
|
|
|
|
#line 138 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 139 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.DeviceBatch.UnitQuantity.HasValue && Model.DeviceBatch.UnitQuantity.Value > Model.DeviceCount)
|
|
{
|
|
var missingCount = Model.DeviceBatch.UnitQuantity.Value - Model.DeviceCount;
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <p");
|
|
|
|
WriteLiteral(" class=\"fa-p\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-info-circle information\"");
|
|
|
|
WriteLiteral("></i>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 145 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" of ");
|
|
|
|
|
|
#line 145 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.UnitQuantity.Value.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" purchased devices are managed by Disco. <strong>");
|
|
|
|
|
|
#line 145 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(missingCount.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 145 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(missingCount == 1 ? "is" : "are");
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" not managed</strong>.\r\n </p>\r\n </div>\r" +
|
|
"\n");
|
|
|
|
|
|
#line 148 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>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(">Purchase Date:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 160 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 160 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 162 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 162 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 163 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 163 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_PurchaseDate');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Invalid Date',
|
|
'");
|
|
|
|
|
|
#line 170 "..\..\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>
|
|
");
|
|
|
|
|
|
#line 177 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 180 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.DeviceBatch.PurchaseDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 180 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr" +
|
|
">\r\n <th>Supplier:\r\n </th>\r\n " +
|
|
" <td>");
|
|
|
|
|
|
#line 187 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 189 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.Supplier));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 189 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 190 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 190 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 191 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 191 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_Supplier'),
|
|
'Batch Supplier',
|
|
'");
|
|
|
|
|
|
#line 197 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateSupplier(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'Supplier\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
"</script>\r\n");
|
|
|
|
|
|
#line 202 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.Supplier))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 206 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 208 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.Supplier);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 208 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr" +
|
|
">\r\n <th>Unit Cost:\r\n </th>\r\n " +
|
|
" <td>");
|
|
|
|
|
|
#line 215 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 217 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.UnitCost));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 217 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 218 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 218 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 219 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 219 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_UnitCost'),
|
|
'Unit Cost',
|
|
'");
|
|
|
|
|
|
#line 225 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateUnitCost(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'UnitCost\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
"</script>\r\n");
|
|
|
|
|
|
#line 230 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (!Model.DeviceBatch.UnitCost.HasValue)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 234 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 236 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.UnitCost.Value.ToString("C"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 236 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr" +
|
|
">\r\n <th>Quantity:\r\n </th>\r\n " +
|
|
" <td>");
|
|
|
|
|
|
#line 243 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 245 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.UnitQuantity));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 245 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 246 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 246 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 247 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 247 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_UnitQuantity'),
|
|
'Quantity',
|
|
'");
|
|
|
|
|
|
#line 253 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateUnitQuantity(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'UnitQuantity\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
" </script>\r\n");
|
|
|
|
|
|
#line 258 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (!Model.DeviceBatch.UnitQuantity.HasValue)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 262 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 264 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.UnitQuantity.Value.ToString("n0"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 264 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n </table" +
|
|
">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"DeviceBatch_PurchaseDetails_Container\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n Details ");
|
|
|
|
|
|
#line 271 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxPurchaseDetails"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 273 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 273 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 275 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 275 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <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 292 "..\..\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 " +
|
|
" traditional: true,\r\n type: \'PO" +
|
|
"ST\',\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(\'s" +
|
|
"low\');\r\n } else {\r\n " +
|
|
" model.$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: \' + errorThrown);\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" }\r\n })" +
|
|
"\r\n }\r\n };\r\n\r\n " +
|
|
" model.$field.tinymce({\r\n " +
|
|
" theme: \'simple\',\r\n add_unload_trig" +
|
|
"ger: false,\r\n schema: \"html5\",\r\n " +
|
|
" statusbar: false,\r\n se" +
|
|
"tup: function (ed) {\r\n ed.on(\'init\', func" +
|
|
"tion () {\r\n $(ed.getWin()).blur(model" +
|
|
".updated);\r\n });\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 327 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.PurchaseDetails))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 331 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 333 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(new HtmlString(Model.DeviceBatch.PurchaseDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 333 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>Warranty:\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(">Valid Until:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 347 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 347 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 349 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.WarrantyValidUntil));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 349 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 350 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 350 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_WarrantyValidUntil');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Warranty Valid Until',
|
|
'");
|
|
|
|
|
|
#line 357 "..\..\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>
|
|
");
|
|
|
|
|
|
#line 364 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 367 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.DeviceBatch.WarrantyValidUntil, "Unknown"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 367 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n </table" +
|
|
">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"DeviceBatch_WarrantyDetails_Container\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n Details ");
|
|
|
|
|
|
#line 374 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxWarrantyDetails"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 376 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 376 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 378 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.WarrantyDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 378 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <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 395 "..\..\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 " +
|
|
" traditional: true,\r\n type: \'PO" +
|
|
"ST\',\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(\'s" +
|
|
"low\');\r\n } else {\r\n " +
|
|
" model.$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: \' + errorThrown);\r\n " +
|
|
" model.$ajax_loading.hide();\r\n " +
|
|
" }\r\n })" +
|
|
"\r\n }\r\n };\r\n\r\n " +
|
|
" model.$field.tinymce({\r\n " +
|
|
" theme: \'simple\',\r\n add_unload_trig" +
|
|
"ger: false,\r\n schema: \"html5\",\r\n " +
|
|
" statusbar: false,\r\n se" +
|
|
"tup: function (ed) {\r\n ed.on(\'init\', func" +
|
|
"tion () {\r\n $(ed.getWin()).blur(model" +
|
|
".updated);\r\n });\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 430 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.WarrantyDetails))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 434 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 436 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(new HtmlString(Model.DeviceBatch.WarrantyDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 436 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>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(">Supplier:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 449 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 451 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuranceSupplier));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 451 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 452 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 452 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 453 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 453 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#DeviceBatch_InsuranceSupplier'),
|
|
'Insurance Supplier',
|
|
'");
|
|
|
|
|
|
#line 459 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Url.Action(MVC.API.DeviceBatch.UpdateInsuranceSupplier(Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'InsuranceSupplier\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
" </script>\r\n");
|
|
|
|
|
|
#line 464 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.InsuranceSupplier))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 468 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 470 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Model.DeviceBatch.InsuranceSupplier);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 470 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
;
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr" +
|
|
">\r\n <th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(">Insured Date:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 478 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 480 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuredDate));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 480 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 481 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 481 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_InsuredDate');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Insured Date',
|
|
'");
|
|
|
|
|
|
#line 488 "..\..\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>
|
|
");
|
|
|
|
|
|
#line 495 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 498 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.DeviceBatch.InsuredDate, "Unknown"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 498 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr" +
|
|
">\r\n <th");
|
|
|
|
WriteLiteral(" class=\"name\"");
|
|
|
|
WriteLiteral(">Insured Until:\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 505 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 507 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuredUntil));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 507 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 508 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 508 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <script>
|
|
$(function () {
|
|
var dateField = $('#DeviceBatch_InsuredUntil');
|
|
document.DiscoFunctions.DateChangeHelper(
|
|
dateField,
|
|
'Insured Until',
|
|
'");
|
|
|
|
|
|
#line 515 "..\..\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>
|
|
");
|
|
|
|
|
|
#line 522 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 525 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(CommonHelpers.FriendlyDate(Model.DeviceBatch.InsuredUntil, "Unknown"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 525 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n </table" +
|
|
">\r\n <div");
|
|
|
|
WriteLiteral(" id=\"DeviceBatch_InsuranceDetails_Container\"");
|
|
|
|
WriteLiteral(">\r\n <div>\r\n Details ");
|
|
|
|
|
|
#line 532 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxInsuranceDetails"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 534 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 534 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 536 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.InsuranceDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 536 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var model = {
|
|
$field: $('#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.$field.tinymce().getContent() };
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 551 "..\..\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 " +
|
|
" traditional: true,\r\n type: \'PO" +
|
|
"ST\',\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(\'s" +
|
|
"low\');\r\n } else {\r\n " +
|
|
" model.$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.$field.tinymce({\r\n " +
|
|
" theme: \'simple\',\r\n add_unload_tr" +
|
|
"igger: false,\r\n schema: \"html5\",\r\n " +
|
|
" statusbar: false,\r\n " +
|
|
"setup: function (ed) {\r\n ed.on(\'init\', fu" +
|
|
"nction () {\r\n $(ed.getWin()).blur(mod" +
|
|
"el.updated);\r\n });\r\n " +
|
|
" }\r\n });\r\n " +
|
|
" });\r\n </script>\r\n");
|
|
|
|
|
|
#line 586 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.InsuranceDetails))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 590 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 592 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(new HtmlString(Model.DeviceBatch.InsuranceDetails));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 592 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>Comments:<br />\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 599 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader("ajaxComments"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </th>\r\n <td>");
|
|
|
|
|
|
#line 601 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 603 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.EditorFor(model => model.DeviceBatch.Comments));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 603 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
var model = {
|
|
$field: $('#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.$field.tinymce().getContent() };
|
|
$.ajax({
|
|
url: '");
|
|
|
|
|
|
#line 618 "..\..\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.$field.tinymce({\r\n theme: \'simple\',\r\n " +
|
|
" add_unload_trigger: false,\r\n " +
|
|
" schema: \"html5\",\r\n statusbar: false,\r\n " +
|
|
" setup: function (ed) {\r\n ed.on(\'ini" +
|
|
"t\', function () {\r\n $(ed.getWin()).blur(model" +
|
|
".updated);\r\n });\r\n }\r\n" +
|
|
" });\r\n });\r\n </script>\r" +
|
|
"\n");
|
|
|
|
|
|
#line 653 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.DeviceBatch.Comments))
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>");
|
|
|
|
|
|
#line 657 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 659 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(new HtmlString(Model.DeviceBatch.Comments));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 659 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 663 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 663 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (hideAdvanced)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr>\r\n <td");
|
|
|
|
WriteLiteral(" colspan=\"2\"");
|
|
|
|
WriteLiteral(" style=\"text-align: right;\"");
|
|
|
|
WriteLiteral(">\r\n <button");
|
|
|
|
WriteLiteral(" id=\"Config_HideAdvanced_Show\"");
|
|
|
|
WriteLiteral(" class=\"button small\"");
|
|
|
|
WriteLiteral(@">Show Advanced Options</button>
|
|
<script>
|
|
$(function () {
|
|
$('#Config_HideAdvanced_Show').click(function () {
|
|
var $this = $(this);
|
|
$this.closest('.Config_HideAdvanced').removeClass('Config_HideAdvanced');
|
|
$this.closest('tr').remove();
|
|
});
|
|
});
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
");
|
|
|
|
|
|
#line 679 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr");
|
|
|
|
WriteLiteral(" class=\"Config_HideAdvanced_Item\"");
|
|
|
|
WriteLiteral(">\r\n <th>Linked Groups:\r\n </th>\r\n <td>\r\n " +
|
|
" <div>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 685 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
|
{
|
|
CanConfigure = canConfig,
|
|
CategoryDescription = DeviceBatchDevicesManagedGroup.GetCategoryDescription(Model.DeviceBatch),
|
|
Description = DeviceBatchDevicesManagedGroup.GetDescription(Model.DeviceBatch),
|
|
ManagedGroup = Model.DevicesLinkedGroup,
|
|
UpdateUrl = Url.Action(MVC.API.DeviceBatch.UpdateDevicesLinkedGroup(Model.DeviceBatch.Id, redirect: true))
|
|
}));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 693 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel()
|
|
{
|
|
CanConfigure = canConfig,
|
|
CategoryDescription = DeviceBatchAssignedUsersManagedGroup.GetCategoryDescription(Model.DeviceBatch),
|
|
Description = DeviceBatchAssignedUsersManagedGroup.GetDescription(Model.DeviceBatch),
|
|
ManagedGroup = Model.AssignedUsersLinkedGroup,
|
|
UpdateUrl = Url.Action(MVC.API.DeviceBatch.UpdateAssignedUsersLinkedGroup(Model.DeviceBatch.Id, redirect: true))
|
|
}));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 701 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 701 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 703 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 703 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n<" +
|
|
"div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 711 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 711 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.CanDelete)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 713 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.ActionLinkButton("Delete", MVC.API.DeviceBatch.Delete(Model.DeviceBatch.Id, true), "buttonDelete"));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 713 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 715 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
if (Model.DeviceCount > 0)
|
|
{
|
|
if (Authorization.Has(Claims.Device.Actions.Export))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 719 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.Exporting.DeviceExportTypes.Batch, Model.DeviceBatch.Id)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 719 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 723 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
Write(Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch")));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 723 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
|
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|