Index.cshtml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. @{
  2. ViewBag.Title = "授权信息";
  3. }
  4. @section head
  5. {
  6. <link href="~/Content/uploadify.css?v=@Hospital.Core.Utility.AppVersion(true)" rel="stylesheet" />
  7. }
  8. <div id="docs-body" class="container bg">
  9. <div class="modal" style="position: relative; top: auto; left: auto; right: auto; margin: 100px auto; z-index: 1; max-width: 100%;">
  10. <div class="modal-header">
  11. <h4>@ViewBag.Title</h4>
  12. </div>
  13. <div class="modal-body">
  14. <dl class="dl-horizontal">
  15. <dt>授权状态:</dt>
  16. <dd>@ViewBag.LicenseStatus</dd>
  17. <dt>授权说明:</dt>
  18. <dd>@ViewBag.LicenseStatusDesc</dd>
  19. @if (ViewBag.ServiceMessage != null && ViewBag.ServiceMessage != "")
  20. {
  21. <dt>技术维护期:</dt>
  22. <dd>@ViewBag.ServiceMessage</dd>
  23. }
  24. <dt>当前时间:</dt>
  25. <dd>@DateTime.Now.ToLongDateString()</dd>
  26. @if (ViewBag.LicenseStatus != "NotChecked")
  27. {
  28. <dt>硬件编码:</dt>
  29. <dd>@ViewBag.HardwareId</dd>
  30. <dt>授权文件:</dt>
  31. <dd>@ViewBag.Hos</dd>
  32. //if (ViewBag.LicenseStatus != "Licensed" || ViewBag.IsAboutToExpire == "True" ||(ViewBag.ServiceMessage != null && ViewBag.ServiceMessage != ""))
  33. //{
  34. <dt></dt>
  35. <dd style="margin-top: 10px;">
  36. <div id="file_upload"></div>
  37. <div id="upload-queue" style="margin-top: 10px;"></div>
  38. </dd>
  39. //}
  40. }
  41. </dl>
  42. </div>
  43. <div class="modal-footer">
  44. <a class="btn blue" href="@Url.Action("Index", "Home")">返回主页</a>
  45. <a class="btn default" href="@Url.Action("Index", "License")">刷新</a>
  46. </div>
  47. </div>
  48. </div>
  49. @section Scripts
  50. {
  51. <script src="~/assets/Huploadify/jquery.Huploadify.js?v=@Hospital.Core.Utility.AppVersion(true)"></script>
  52. <script type="text/javascript">
  53. $("#file_upload").uploadify({
  54. 'buttonClass': "btn btn-primary",
  55. 'buttonText': "上传授权文件",
  56. 'width': 140,
  57. 'height': 28,
  58. 'queueID': "upload-queue",
  59. //'fileSizeLimit': "100MB",
  60. 'uploadLimit': 1,
  61. 'multi': false,
  62. 'swf': appConfig.baseUrl + "/content/uploadify.swf",
  63. 'uploader': appConfig.baseUrl + "/License/Upload",
  64. 'scriptData': { 'var': (new Date()).getTime() },
  65. 'fileTypeDesc': "授权文件(*.license 文件)",
  66. 'fileTypeExts': "*.license",
  67. 'onUploadStart': function (file) {
  68. $('#alert-msg').html('正在上传 ' + file.name);
  69. },
  70. 'onUploadSuccess': function (file, data, response) {
  71. var result = eval("(" + response + ")");
  72. if (result) {
  73. if (result.success) {
  74. $.blockUI();
  75. window.location.reload();
  76. }
  77. else {
  78. alert(result.message);
  79. }
  80. }
  81. else {
  82. alert("上传错误,请重试。");
  83. }
  84. }
  85. });
  86. </script>
  87. }