1156 lines
32 KiB
C#
1156 lines
32 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.18051
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace Disco.Web.Views.Device
|
|
{
|
|
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;
|
|
|
|
#line 2 "..\..\Views\Device\ImportReview.cshtml"
|
|
using Disco.BI.DeviceBI.Importing;
|
|
|
|
#line default
|
|
#line hidden
|
|
using Disco.BI.Extensions;
|
|
using Disco.Models.Repository;
|
|
using Disco.Web;
|
|
using Disco.Web.Extensions;
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/ImportReview.cshtml")]
|
|
public partial class ImportReview : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ImportReviewModel>
|
|
{
|
|
public ImportReview()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 3 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Import Devices", MVC.Device.ImportExport(), string.Format("File: {0}", Model.ImportFilename));
|
|
|
|
int importDeviceOkCount = Model.ImportDevices.Count(id => id.Errors.Count == 0);
|
|
int importDeviceNewCount = Model.ImportDevices.Count(id => id.Errors.Count == 0 && id.Device == null);
|
|
int importDeviceUpdateCount = Model.ImportDevices.Count(id => id.Errors.Count == 0 && id.Device != null);
|
|
int importDeviceErrorCount = Model.ImportDevices.Count - importDeviceOkCount;
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<div");
|
|
|
|
WriteLiteral(" id=\"deviceImportReview\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 12 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 12 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (Model.ImportDevices.Count > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h2>Parsed ");
|
|
|
|
|
|
#line 14 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(Model.ImportDevices.Count);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Device Record");
|
|
|
|
|
|
#line 14 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(Model.ImportDevices.Count != 1 ? "s" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</h2>\r\n");
|
|
|
|
WriteLiteral(" <h4>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 16 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(importDeviceOkCount);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" of ");
|
|
|
|
|
|
#line 16 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(Model.ImportDevices.Count);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Device");
|
|
|
|
|
|
#line 16 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(Model.ImportDevices.Count != 1 ? "s" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" are ready for import.\r\n </h4>\r\n");
|
|
|
|
|
|
#line 18 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (importDeviceErrorCount > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h4");
|
|
|
|
WriteLiteral(" id=\"errorMessage\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 21 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(importDeviceErrorCount);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" Record");
|
|
|
|
|
|
#line 21 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(importDeviceErrorCount != 1 ? "s" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" will be skipped if the import continues\r\n </h4>\r\n");
|
|
|
|
|
|
#line 23 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" id=\"devicesNavigation\"");
|
|
|
|
WriteLiteral(">\r\n <ul");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 27 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 27 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (importDeviceNewCount > 0)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<li");
|
|
|
|
WriteLiteral(" class=\"statusNew\"");
|
|
|
|
WriteLiteral(">\r\n <input");
|
|
|
|
WriteLiteral(" id=\"devicesNavigationNew\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" checked=\"checked\"");
|
|
|
|
WriteLiteral(" /><label");
|
|
|
|
WriteLiteral(" for=\"devicesNavigationNew\"");
|
|
|
|
WriteLiteral(">Show New Devices (");
|
|
|
|
|
|
#line 29 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(Model.ImportDevices.Count(id => id.Errors.Count == 0 && id.Device == null));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(")</label>\r\n </li>");
|
|
|
|
|
|
#line 30 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 30 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (importDeviceUpdateCount > 0)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<li");
|
|
|
|
WriteLiteral(" class=\"statusUpdate\"");
|
|
|
|
WriteLiteral(">\r\n <input");
|
|
|
|
WriteLiteral(" id=\"devicesNavigationUpdate\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" checked=\"checked\"");
|
|
|
|
WriteLiteral(" /><label");
|
|
|
|
WriteLiteral(" for=\"devicesNavigationUpdate\"");
|
|
|
|
WriteLiteral(">Show Updates (");
|
|
|
|
|
|
#line 32 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(Model.ImportDevices.Count(id => id.Errors.Count == 0 && id.Device != null));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(")</label>\r\n </li>");
|
|
|
|
|
|
#line 33 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 33 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (importDeviceErrorCount > 0)
|
|
{
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<li");
|
|
|
|
WriteLiteral(" class=\"statusError\"");
|
|
|
|
WriteLiteral(">\r\n <input");
|
|
|
|
WriteLiteral(" id=\"devicesNavigationError\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" checked=\"checked\"");
|
|
|
|
WriteLiteral(" /><label");
|
|
|
|
WriteLiteral(" for=\"devicesNavigationError\"");
|
|
|
|
WriteLiteral(">Show Errors (");
|
|
|
|
|
|
#line 35 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(Model.ImportDevices.Count(id => id.Errors.Count != 0));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(")</label>\r\n </li>");
|
|
|
|
|
|
#line 36 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" </ul>
|
|
<script>
|
|
$(function () {
|
|
$devices = $('#devices');
|
|
$rows = $devices.children('tbody').children('tr');
|
|
|
|
$('#devicesNavigationNew').change(function () {
|
|
if ($(this).is(':checked'))
|
|
$rows.filter('.statusNew').show();
|
|
else
|
|
$rows.filter('.statusNew').hide();
|
|
});
|
|
|
|
$('#devicesNavigationUpdate').change(function () {
|
|
if ($(this).is(':checked'))
|
|
$rows.filter('.statusUpdate').show();
|
|
else
|
|
$rows.filter('.statusUpdate').hide();
|
|
});
|
|
|
|
$('#devicesNavigationError').change(function () {
|
|
if ($(this).is(':checked'))
|
|
$rows.filter('.statusError').show();
|
|
else
|
|
$rows.filter('.statusError').hide();
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
");
|
|
|
|
|
|
#line 66 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <table");
|
|
|
|
WriteLiteral(" id=\"devices\"");
|
|
|
|
WriteLiteral(">\r\n <thead>\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"row\"");
|
|
|
|
WriteLiteral(">Row</th>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"action\"");
|
|
|
|
WriteLiteral(">Action</th>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"serialNumber\"");
|
|
|
|
WriteLiteral(">Serial Number</th>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"model\"");
|
|
|
|
WriteLiteral(">Model</th>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"profile\"");
|
|
|
|
WriteLiteral(">Profile</th>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"batch\"");
|
|
|
|
WriteLiteral(">Batch</th>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"assignedUser\"");
|
|
|
|
WriteLiteral(">Assigned User</th>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"location\"");
|
|
|
|
WriteLiteral(">Location</th>\r\n <th");
|
|
|
|
WriteLiteral(" class=\"assetNumber\"");
|
|
|
|
WriteLiteral(">Asset Number</th>\r\n </tr>\r\n </thead>\r\n <tbo" +
|
|
"dy>\r\n");
|
|
|
|
|
|
#line 82 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 82 "..\..\Views\Device\ImportReview.cshtml"
|
|
foreach (var device in Model.ImportDevices)
|
|
{
|
|
bool isUpdate = device.Device != null;
|
|
string error;
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <tr");
|
|
|
|
WriteAttribute("class", Tuple.Create(" class=\"", 4390), Tuple.Create("\"", 4428)
|
|
, Tuple.Create(Tuple.Create("", 4398), Tuple.Create("status", 4398), true)
|
|
|
|
#line 86 "..\..\Views\Device\ImportReview.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4404), Tuple.Create<System.Object, System.Int32>(device.ImportStatus()
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4404), false)
|
|
);
|
|
|
|
WriteLiteral(">\r\n <td");
|
|
|
|
WriteLiteral(" class=\"row\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 88 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write((Model.ImportDevices.IndexOf(device) + 1));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"action\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 91 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(device.ImportStatus());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </td>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"serialNumber\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 94 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 94 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (device.Device == null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 96 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(device.SerialNumber);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 96 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 100 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(Html.ActionLink(device.SerialNumber, MVC.Device.Show(device.SerialNumber), new { target = "_blank" }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 100 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 103 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 103 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (device.Errors.TryGetValue("SerialNumber", out error))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"error\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 105 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(error);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 106 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"model\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 109 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 109 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (device.Errors.TryGetValue("DeviceModelId", out error))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"error\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 111 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(error);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 112 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (!isUpdate || device.DeviceModelId != device.Device.DeviceModelId)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <img");
|
|
|
|
WriteLiteral(" class=\"modelImage\"");
|
|
|
|
WriteLiteral(" alt=\"Model Image\"");
|
|
|
|
WriteAttribute("src", Tuple.Create(" src=\"", 5949), Tuple.Create("\"", 6048)
|
|
|
|
#line 117 "..\..\Views\Device\ImportReview.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 5955), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(device.DeviceModel.Id, device.DeviceModel.ImageHash()))
|
|
|
|
#line default
|
|
#line hidden
|
|
, 5955), false)
|
|
);
|
|
|
|
WriteLiteral(" />\r\n");
|
|
|
|
|
|
#line 118 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 118 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(device.DeviceModel.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 118 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">No Change</span>\r\n");
|
|
|
|
|
|
#line 123 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</td>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"profile\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 126 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 126 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (device.Errors.TryGetValue("DeviceProfileId", out error))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"error\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 128 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(error);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 129 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (!isUpdate || device.DeviceProfileId != device.Device.DeviceProfileId)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 134 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(device.DeviceProfile.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 134 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">No Change</span>\r\n");
|
|
|
|
|
|
#line 139 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</td>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"batch\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 142 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 142 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (device.Errors.TryGetValue("DeviceBatchId", out error))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"error\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 144 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(error);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 145 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (!isUpdate || device.DeviceBatchId != device.Device.DeviceBatchId)
|
|
{
|
|
if (device.DeviceBatch == null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("<None>");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 153 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 156 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(device.DeviceBatch.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 156 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">No Change</span>\r\n");
|
|
|
|
|
|
#line 162 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</td>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"assignedUser\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 165 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 165 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (device.Errors.TryGetValue("AssignedUserId", out error))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"error\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 167 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(error);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 168 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (!isUpdate || device.AssignedUserId != device.Device.AssignedUserId)
|
|
{
|
|
if (device.AssignedUser == null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("<None>");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 176 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 179 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(device.AssignedUser.ToString());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 179 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">No Change</span>\r\n");
|
|
|
|
|
|
#line 185 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</td>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"location\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 188 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 188 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (device.Errors.TryGetValue("Location", out error))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"error\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 190 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(error);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 191 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (!isUpdate || device.Location != device.Device.Location)
|
|
{
|
|
if (device.Location == null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("<None>");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 199 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 202 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(device.Location);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 202 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">No Change</span>\r\n");
|
|
|
|
|
|
#line 208 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</td>\r\n <td");
|
|
|
|
WriteLiteral(" class=\"assetNumber\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 211 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 211 "..\..\Views\Device\ImportReview.cshtml"
|
|
if (device.Errors.TryGetValue("AssetNumber", out error))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"error\"");
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 213 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(error);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
|
|
#line 214 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (!isUpdate || device.AssetNumber != device.Device.AssetNumber)
|
|
{
|
|
if (device.AssetNumber == null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("<None>");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 222 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 225 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(device.AssetNumber);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 225 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">No Change</span>\r\n");
|
|
|
|
|
|
#line 231 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
}
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</td>\r\n </tr>\r\n");
|
|
|
|
|
|
#line 234 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </tbody>\r\n </table>\r\n");
|
|
|
|
|
|
#line 237 "..\..\Views\Device\ImportReview.cshtml"
|
|
|
|
if (importDeviceOkCount > 0)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 241 "..\..\Views\Device\ImportReview.cshtml"
|
|
Write(Html.ActionLinkButton(string.Format("Import {0} Device{1}", importDeviceOkCount, importDeviceOkCount != 1 ? "s" : null), MVC.API.Device.ImportProcess(Model.ImportParseTaskId)));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 243 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h2>No Devices were found in this file</h2>\r\n");
|
|
|
|
|
|
#line 248 "..\..\Views\Device\ImportReview.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|