add site
This commit is contained in:
		
							
								
								
									
										222
									
								
								Site/MachineDeviceManagement/AssetMergeHistory.aspx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										222
									
								
								Site/MachineDeviceManagement/AssetMergeHistory.aspx
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,222 @@ | ||||
| <%@ Page Title="" Language="C#" MasterPageFile="~/IronIntelMasterPage.master" AutoEventWireup="true" CodeFile="AssetMergeHistory.aspx.cs" Inherits="AssetMergeHistory" %> | ||||
|  | ||||
|  | ||||
| <asp:Content ID="Content1" ContentPlaceHolderID="holder_head" runat="Server"> | ||||
|     <style type="text/css"> | ||||
|         ::-ms-clear, ::-ms-reveal { | ||||
|             display: none; | ||||
|         } | ||||
|  | ||||
|         .selectinput { | ||||
|             width: 150px; | ||||
|             margin-right: 10px; | ||||
|         } | ||||
|  | ||||
|         .dialog-content table { | ||||
|             border-collapse: collapse; | ||||
|             width: 100%; | ||||
|         } | ||||
|  | ||||
|             .dialog-content table td.label { | ||||
|                 width: 160px; | ||||
|                 text-align: right; | ||||
|                 padding-right: 10px; | ||||
|                 line-height: 24px; | ||||
|                 height: 24px; | ||||
|                 vertical-align: top; | ||||
|             } | ||||
|  | ||||
|             .dialog-content table td input, | ||||
|             .dialog-content table td textarea { | ||||
|                 border: 1px solid #a9a9a9; | ||||
|                 width: 200px; | ||||
|                 height: 18px; | ||||
|                 padding: 1px; | ||||
|             } | ||||
|  | ||||
|                 .dialog-content table td input[type="checkbox"] { | ||||
|                     border: none; | ||||
|                 } | ||||
|  | ||||
|             .dialog-content table td textarea { | ||||
|                 height: 100px; | ||||
|                 max-width: 200px; | ||||
|             } | ||||
|  | ||||
|         #dialogdatatb td { | ||||
|             padding-top: 30px; | ||||
|         } | ||||
|  | ||||
|         .a { | ||||
|             text-decoration: none; | ||||
|             color: #2140fb; | ||||
|         } | ||||
|  | ||||
|         .machinetd { | ||||
|             white-space: nowrap; | ||||
|             text-overflow: ellipsis; | ||||
|             overflow: hidden; | ||||
|         } | ||||
|     </style> | ||||
|  | ||||
|     <link href="<%=GetFileUrlWithVersion("../css/jquery.datetimepicker.css")%>" rel="stylesheet" /> | ||||
|     <script src="<%=GetFileUrlWithVersion("../Maintenance/js/inputdatactr.js")%>" type="text/javascript"></script> | ||||
|     <script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script> | ||||
|     <script src="<%=GetFileUrlWithVersion("../js/editableselect.js")%>"></script> | ||||
|     <script type="text/javascript">     | ||||
|  | ||||
|         function assetrequest(method, param, callback, error) { | ||||
|             _network.request("MachineDeviceManagement/AssetMergeHistory.aspx", -1, method, param, callback, error || function (e) { | ||||
|                 showmaskbg(false, true); | ||||
|                 showAlert(GetTextByKey('P_MR_PAGEERROR', 'An unknown error occurred.  Please refresh page.'), GetTextByKey('P_MR_QUERY', 'Query')); | ||||
|             }); | ||||
|         } | ||||
|  | ||||
|         function devicerequest(method, param, callback, error) { | ||||
|             _network.request("MachineDeviceManagement/ManageRentals.aspx", -1, method, param, callback, error || function (e) { | ||||
|                 showmaskbg(false, true); | ||||
|                 showAlert(GetTextByKey('P_MR_PAGEERROR', 'An unknown error occurred.  Please refresh page.'), GetTextByKey('P_MR_QUERY', 'Query')); | ||||
|             }); | ||||
|         } | ||||
|  | ||||
|         function OnRefresh() { | ||||
|             showloading(true); | ||||
|             var searchtxt = ""; | ||||
|             searchtxt = htmlencode($.trim($('#searchinputtxt').val())); | ||||
|  | ||||
|             assetrequest("GetAssetMerges", searchtxt, function (data) { | ||||
|                 showloading(false); | ||||
|                 if (typeof (data) === "string") { | ||||
|                     showAlert(data, GetTextByKey("P_MR_ERROR", 'Error')); | ||||
|                     return; | ||||
|                 } | ||||
|                 showMerges(data); | ||||
|             }, function (err) { | ||||
|                 showloading(false); | ||||
|             }); | ||||
|         } | ||||
|  | ||||
|  | ||||
|         function showMerges(data) { | ||||
|             var rows = []; | ||||
|             for (var i = 0; i < data.length; i++) { | ||||
|                 var r = data[i]; | ||||
|                 for (var j in r) { | ||||
|                     if (j === "CompletedOn") | ||||
|                         r[j] = { DisplayValue: r["CompletedOnStr"], Value: r[j] }; | ||||
|                     else if (j === "MergeOn") | ||||
|                         r[j] = { DisplayValue: r["MergeOnStr"], Value: r[j] }; | ||||
|                     else if (j === "Completed") | ||||
|                         r[j] = { DisplayValue: r["Completed"] ? "Yes" : "No", Value: r[j] }; | ||||
|                     else if (j === "FromAsset") { | ||||
|                         r.FromAssetName = r["FromAsset"].Name; | ||||
|                         r.FromAssetName2 = r["FromAsset"].Name2; | ||||
|                         r.FromAssetVIN = r["FromAsset"].VIN; | ||||
|                         r.FromAssetMakeName = r["FromAsset"].MakeName; | ||||
|                         r.FromAssetModelName = r["FromAsset"].ModelName; | ||||
|                         r.FromAssetTypeName = r["FromAsset"].TypeName; | ||||
|                         r.FromAssetDisplayName = r["FromAsset"].DisplayName; | ||||
|                     } | ||||
|                     else if (j === "ToAsset") { | ||||
|                         r.ToAssetName = r["ToAsset"].Name; | ||||
|                         r.ToAssetName2 = r["ToAsset"].Name2; | ||||
|                         r.ToAssetVIN = r["ToAsset"].VIN; | ||||
|                         r.ToAssetMakeName = r["ToAsset"].MakeName; | ||||
|                         r.ToAssetModelName = r["ToAsset"].ModelName; | ||||
|                         r.ToAssetTypeName = r["ToAsset"].TypeName; | ||||
|                         r.ToAssetDisplayName = r["ToAsset"].DisplayName; | ||||
|                     } | ||||
|                 } | ||||
|                 var fr = { Values: r }; | ||||
|                 rows.push(fr); | ||||
|             } | ||||
|  | ||||
|             grid_dt.setData(rows); | ||||
|         } | ||||
|  | ||||
|         var grid_dt; | ||||
|         function InitGridData() { | ||||
|  | ||||
|             grid_dt = new GridView('#mergelist'); | ||||
|             grid_dt.lang = { | ||||
|                 all: GetTextByKey("P_GRID_ALL", "(All)"), | ||||
|                 ok: GetTextByKey("P_GRID_OK", "OK"), | ||||
|                 reset: GetTextByKey("P_GRID_RESET", "Reset") | ||||
|             }; | ||||
|             var list_columns = [ | ||||
|                 { name: 'FromAssetDisplayName', caption: GetTextByKey("P_MA_FROMASSETNAME", "From Asset Name"), valueIndex: 'FromAssetDisplayName', css: { 'width': 180, 'text-align': 'left' } }, | ||||
|                 { name: 'FromAssetVIN', caption: GetTextByKey("P_MA_FROMASSETVIN", "From Asset VIN"), valueIndex: 'FromAssetVIN', css: { 'width': 180, 'text-align': 'left' } }, | ||||
|                 { name: 'ToAssetDisplayName', caption: GetTextByKey("P_MA_TOSSETNAME", "To Asset Name"), valueIndex: 'ToAssetDisplayName', css: { 'width': 180, 'text-align': 'left' } }, | ||||
|                 { name: 'ToAssetVIN', caption: GetTextByKey("P_MA_TOASSETVIN", "To Asset VIN"), valueIndex: 'ToAssetVIN', css: { 'width': 180, 'text-align': 'left' } }, | ||||
|                 { name: 'MergeOn', caption: GetTextByKey("P_MA_MERGEDATE", "Merge Time"), valueIndex: 'MergeOn', css: { 'width': 130, 'text-align': 'left' } }, | ||||
|                 { name: 'MergeByName', caption: GetTextByKey("P_MA_MERGEBY", "Merge By"), valueIndex: 'MergeByName', css: { 'width': 130, 'text-align': 'left' } }, | ||||
|                 { name: 'Completed', caption: GetTextByKey("P_MA_COMPLETED", "Completed"), valueIndex: 'Completed', css: { 'width': 75, 'text-align': 'center' } }, | ||||
|                 { name: 'CompletedOn', caption: GetTextByKey("P_MA_COMPLETEDDATE", "Completed Date"), valueIndex: 'CompletedOn', css: { 'width': 130, 'text-align': 'left' } }, | ||||
|                 { name: 'Notes', caption: GetTextByKey("P_MA_NOTES", "Notes"), valueIndex: 'Notes', css: { 'width': 180, 'text-align': 'left' } } | ||||
|             ]; | ||||
|             var columns = []; | ||||
|             // head | ||||
|             for (var hd in list_columns) { | ||||
|                 var col = {}; | ||||
|                 col.name = list_columns[hd].name; | ||||
|                 col.caption = list_columns[hd].caption; | ||||
|                 col.visible = true; | ||||
|                 col.sortable = true; | ||||
|                 col.width = list_columns[hd].css.width; | ||||
|                 col.align = list_columns[hd].css["text-align"] | ||||
|                 col.key = list_columns[hd].valueIndex; | ||||
|                 col.allowFilter = list_columns[hd].allowFilter; | ||||
|                 columns.push(col); | ||||
|             } | ||||
|             grid_dt.canMultiSelect = false; | ||||
|             grid_dt.columns = columns; | ||||
|             grid_dt.init(); | ||||
|  | ||||
|         } | ||||
|  | ||||
|  | ||||
|         $(function () { | ||||
|             $("#content").applyFleetLanguageText(); | ||||
|             InitGridData(); | ||||
|             OnRefresh(); | ||||
|  | ||||
|             $('#searchinputtxt').keydown(searchEnter); | ||||
|  | ||||
|             $(window).resize(function () { | ||||
|                 $("#mergelist").css("height", $(window).height() - $("#mergelist").offset().top - 4); | ||||
|                 grid_dt && grid_dt.resize(); | ||||
|             }).resize(); | ||||
|  | ||||
|         }); | ||||
|  | ||||
|         function searchEnter(e) { | ||||
|             if (e.keyCode == 13 || e.keyCode == 9) { | ||||
|                 OnRefresh(); | ||||
|             } | ||||
|         } | ||||
|     </script> | ||||
| </asp:Content> | ||||
| <asp:Content ID="Content3" ContentPlaceHolderID="holder_content" runat="Server"> | ||||
|     <div id="recordcontent" style="padding: 0px; margin: 0px;"> | ||||
|         <div class="page_title" data-lgid="P_MA_MERGEASSETHISTORY">Asset Merge History</div> | ||||
|         <table style="width: 100%; border-collapse: collapse; line-height: 32px; min-width: 1200px;"> | ||||
|             <tr> | ||||
|                 <td> | ||||
|                     <input id="searchinputtxt" autocomplete="off" style="width: 300px; margin-left: 10px;" /> | ||||
|                     <input class="search" type="button" onclick="OnRefresh();" value="Search" data-lgid="P_MR_SEARCH" /> | ||||
|                 </td> | ||||
|             </tr> | ||||
|             <tr> | ||||
|                 <td> | ||||
|                     <div class="function_title"> | ||||
|                         <span class="sbutton iconrefresh" onclick="OnRefresh();" data-lgid="P_MR_REFRESH">Refresh</span> | ||||
|                     </div> | ||||
|                 </td> | ||||
|             </tr> | ||||
|         </table> | ||||
|         <div class="clear"></div> | ||||
|         <div id="mergelist"></div> | ||||
|     </div> | ||||
|     <div id="mask_bg" style="display: none;"><div class="loading c-spin"></div></div> | ||||
|  | ||||
| </asp:Content> | ||||
		Reference in New Issue
	
	Block a user