初始化CRICS

This commit is contained in:
2025-12-11 09:17:16 +08:00
commit 83247ec0a2
2735 changed files with 787765 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#appHotelForm table th
{
width: 75px;
font-weight: normal;
text-align: right;
}
</style>
<div class="easyui-panel" data-options="fit:true,border:false">
<div class="datagrid-toolbar">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="loadAppHotel();">
<%: Html.Language("Refresh")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-save',plain:true" onclick="saveAppHotel();">
<%: Html.Language("Save")%></a>
</div>
<form id="appHotelForm" class="easyui-form" method="post" action="#">
<table cellpadding="5px">
<tr>
<th>
<label for="txtHotelName"><%: Html.Language("HotelName")%></label>
</th>
<td>
<input id="txtHotelName" name="H01" class="easyui-validatebox textbox text" data-options="validType:'length[0,30]'" style="width: 350px;" />
</td>
<th><label for="txtHotelEnglishName"><%: Html.Language("HotelEnglishName")%></label></th>
<td>
<input id="txtHotelEnglishName" name="H03" class="easyui-validatebox textbox text" data-options="validType:'length[0,30]'" style="width: 350px;" />
</td>
</tr>
<tr>
<th style="vertical-align: top">
<label for="txtHotelIntroduce">
<%: Html.Language("IntroductionContent")%>
</label>
</th>
<td>
<textarea id="txtHotelIntroduce" name="H02" class="easyui-validatebox textbox text" data-options="validType:'length[0,4000]'" rows="50" cols="25" maxlength="4000" style="width:350px;height:300px;white-space:normal;overflow-y:auto;"></textarea>
</td>
<th style="vertical-align: top">
<label for="txtHotelEnglishIntroduce"><%: Html.Language("HotelEnglishIntroduce")%></label>
</th>
<td>
<textarea id="txtHotelEnglishIntroduce" name="H04" class="easyui-validatebox textbox text" data-options="validType:'length[0,4000]'" rows="50" cols="25" maxlength="4000" style="width:350px;height:300px;white-space:normal;overflow-y:auto;"></textarea>
</td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
$(function () { loadAppHotel() });
function loadAppHotel() {
$('#appHotelForm').form('load', '/MobileApp/LoadAppHotel/');
}
function saveAppHotel() {
var form = $('#appHotelForm');
if (form.form('enableValidation').form('validate')) {
var entry = $("#appHotelForm").serializeJson();
var params = { jsonData: JSON.stringify(entry) };
$.tools.post(params, '/MobileApp/SaveAppHotel/');
}
}
</script>

View File

@@ -0,0 +1,177 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#appMenuForm table
{
margin: 0 auto;
}
#appMenuForm table th
{
font-weight: normal;
}
</style>
<% switch ((int)Session["isCN"]){case 1: %>
<script type="text/javascript" src="/Scripts/en-US.js"></script>
<% break; case 2: %>
<script type="text/javascript" src="/Scripts/zh-TW.js"></script>
<% break;default: %>
<script type="text/javascript" src="/Scripts/zh-CN.js"></script>
<% break; } %>
<table id="dgAppMenu" class="easyui-datagrid" style="width: 100%; height: auto;"
data-options="
toolbar: '#tbAppMenu',
border: false,
singleSelect: true,
rownumbers: true,
striped: true,
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
url: '/MobileApp/LoadMenus/',
queryParams: { type:0},
onDblClickRow: function(index, row) { editAppMenu(row); }
">
<thead>
<tr>
<th data-options="field:'Name',sortable:true,width:30,resizable:false">
<%: Html.Language("MenuName")%>
</th>
<th data-options="field:'EnglishName',sortable:true,width:100,resizable:false">
<%: Html.Language("EnglishName")%>
</th>
<th data-options="field:'Icon',sortable:true,align:'center',formatter:iconFormatter,resizable:false">
<%: Html.Language("Icon")%>
</th>
<th data-options="field:'Sort',sortable:true,align:'center',resizable:false">
<%: Html.Language("Sort")%>
</th>
<th data-options="field:'ActiveIndicator',sortable:true,align:'center',resizable:false,formatter:function(val){return val ? '<%: Html.Language("Yes")%>':'<%: Html.Language("No")%>';}">
<%: Html.Language("StartUsing")%>
</th>
</tr>
</thead>
</table>
<div id="tbAppMenu">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#dgAppMenu').datagrid('reload')">
<%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-edit',plain:true" onclick="editAppMenu();">
<%: Html.Language("Edit")%></a>
</div>
<div id="dialog" class="easyui-window" style="padding: 5px; width: 300px; height: 250px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom: 5px;">
<form id="appMenuForm" class="easyui-form" method="post" data-options="novalidate:true"
enctype="multipart/form-data">
<input type="hidden" id="hfID" name="ID" value="0" />
<table cellspacing="5px">
<tr>
<th>
<label for="txtName">
<%: Html.Language("MenuName")%></label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtName" name="Name" data-options="required:true" />
</td>
</tr>
<tr>
<th>
<label for="txtEnglishName">
<%: Html.Language("EnglishName")%></label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtEnglishName" name="EnglishName"
data-options="required:false" />
</td>
</tr>
<tr>
<th>
<label for="txtIcon">
<%: Html.Language("Icon")%></label>
</th>
<td>
<input class="easyui-filebox" name="Icon" data-options="buttonText:lang.Browse" />
</td>
</tr>
<tr>
<th>
<label for="txtSort">
<%: Html.Language("Sort")%></label>
</th>
<td>
<input class="easyui-numberspinner textbox text" id="txtSort" name="Sort" data-options="min:1"
value="1" data-options="required:true" />
</td>
</tr>
<tr>
<th>
<label for="chkActiveIndicator">
<%: Html.Language("StartUsing")%></label>
</th>
<td>
<label>
<input type="radio" id="rad1" name="ActiveIndicator" value="true" />
<%: Html.Language("Yes")%></label>&nbsp;<label><input id="rad2" type="radio" name="ActiveIndicator"
value="false" /><%: Html.Language("No")%></label>
</td>
</tr>
</table>
</form>
</div>
<div class="dlg-footer" style="text-align: right; padding: 5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="saveAppMenu();">
<%: Html.Language("Save")%></a> <a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#dialog').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
<script type="text/javascript">
function iconFormatter(val) {
if (val && val != '') {
return '<img src="/' + val + '" height="25px" />';
}
return '';
}
function editAppMenu(row) {
var row = row || $('#dgAppMenu').datagrid('getSelected');
if (row) {
$('#appMenuForm').form('reset');
$('#hfID').val(row.ID);
$('#txtName').val(row.Name);
$('#txtEnglishName').val(row.EnglishName);
$('#txtSort').numberspinner('setValue', row.Sort);
if (row.ActiveIndicator) {
$('#appMenuForm input[name=ActiveIndicator][value=false]').removeAttr('checked');
$('#appMenuForm input[name=ActiveIndicator][value=true]').attr('checked', 'checked');
} else {
$('#appMenuForm input[name=ActiveIndicator][value=true]').removeAttr('checked');
$('#appMenuForm input[name=ActiveIndicator][value=false]').attr('checked', 'checked');
}
$('#dialog').window({ title: lang.EditMenu }).window('open');
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function saveAppMenu() {
$('#appMenuForm').form('submit', {
url: '/MobileApp/SaveAppMenu/',
success: function (r) {
r = $.parseJSON(r);
if (r.IsSuccess) {
$('#dgAppMenu').datagrid('reload');
$('#dialog').window('close');
}
$.tools.alert(r.Message);
}
});
}
</script>

View File

@@ -0,0 +1,153 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#appRoomForm table
{
margin: 0 auto;
}
#appRoomForm table th
{
font-weight: normal;
}
</style>
<table id="dgAppRoom" class="easyui-datagrid" style="width: 100%; height: auto;"
data-options="
toolbar: '#tbAppRoom',
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
url: '/MobileApp/LoadAppRoomsByPage/',
onDblClickRow: function(index, row) { editAppRoom(row); }
">
<thead>
<tr>
<th data-options="field:'ID',sortable:true,align:'center',resizable:false">
<%: Html.Language("ID") %>
</th>
<th data-options="field:'MAC',sortable:true,width:100,resizable:false">
MAC
</th>
<th data-options="field:'RoomNumber',sortable:true,width:20,resizable:false">
<%: Html.Language("RoomNumber")%>
</th>
</tr>
</thead>
</table>
<div id="tbAppRoom">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#dgAppRoom').datagrid('reload')">
<%: Html.Language("Refresh")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-add',plain:true" onclick="addAppRoom()">
<%: Html.Language("New")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-edit',plain:true" onclick="editAppRoom()">
<%: Html.Language("Edit")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-remove',plain:true" onclick="delAppRoom()">
<%: Html.Language("Delete")%></a>
</div>
<div id="AppRoomdialog" class="easyui-window" style="padding: 5px; width: 300px; height: 160px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom: 5px;">
<form id="appRoomForm" class="easyui-form" method="post" data-options="novalidate:true"
enctype="multipart/form-data">
<input type="hidden" id="RID" name="ID" value="0" />
<table cellspacing="5px">
<tr>
<th>
<label for="txtMAC">
MAC</label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtMAC" name="MAC" data-options="required:true,validType:'length[3,20]'" />
</td>
</tr>
<tr>
<th>
<label for="txtRoomNumber">
<%: Html.Language("RoomNumber")%></label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtRoomNumber" name="RoomNumber"
data-options="required:false" />
</td>
</tr>
</table>
</form>
</div>
<div class="dlg-footer" style="text-align: right; padding: 5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="saveAppRoom();">
<%: Html.Language("Save")%></a> <a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#AppRoomdialog').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
<script type="text/javascript">
function addAppRoom() {
$('#appRoomForm').form('reset');
$('#AppRoomdialog').window({ title: lang.NewPADRoomNumberSetting }).window('open');
}
function editAppRoom(row) {
var row = row || $('#dgAppRoom').datagrid('getSelected');
if (row) {
$('#appRoomForm').form('reset');
$('#RID').val(row.ID);
$('#txtMAC').val(row.MAC);
$('#txtRoomNumber').val(row.RoomNumber);
$('#AppRoomdialog').window({ title: lang.EditPADRoomNumberSetting }).window('open');
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function saveAppRoom() {
var params = $('#appRoomForm').serialize();
$.tools.post(params, '/MobileApp/SaveAppRoom/', function (r) {
if (r.IsSuccess) {
$('#dgAppRoom').datagrid('reload');
$('#AppRoomdialog').window('close');
}
$.tools.alert(r.Message);
});
}
function delAppRoom() {
var rows = $('#dgAppRoom').datagrid('getSelections');
if (!rows || rows.length == 0) {
$.tools.alert(lang.PleaseSelectTheData);
return;
}
var param;
$.each(rows, function (i, n) {
if (i == 0) {
param = "idList=" + n.ID;
}
else {
param += "&idList=" + n.ID;
}
});
$.tools.delPost(param, "/MobileApp/DeleteAppRoom/", function () {
$('#dgAppRoom').datagrid("clearSelections");
$('#dgAppRoom').datagrid("reload");
}, this);
}
</script>

View File

@@ -0,0 +1,28 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#tbHotel {
width: 100%;
}
#tbHotel th {
width: 60px;
font-weight: normal;
}
#tbHotel th,
#tbHotel td {
/*border:1px solid red;*/
}
</style>
<table id="tbHotel" cellpadding="5px">
<tr>
<th><label for="txtHotelName">酒店名称</label></th>
<td><input id="txtHotelName" class="easyui-validatebox textbox text" style="width:500px;" /></td>
</tr>
<tr>
<th style="vertical-align:top"><label for="txtHotelIntroduce">介绍内容</label></th>
<td>
<textarea id="txtHotelIntroduce" class="easyui-validatebox textbox text" style="width:500px;height:500px;"></textarea>
</td>
</tr>
</table>

View File

@@ -0,0 +1,41 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tb',
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST'
">
<thead>
<tr>
<th data-options="field:'Name',sortable:true">
菜单名称
</th>
<th data-options="field:'Icon',sortable:true">
LOGO
</th>
<th data-options="field:'Sort',sortable:true">
排序
</th>
<th data-options="field:'ActiveIndicator',sortable:true">
启用
</th>
</tr>
</thead>
</table>
<div id="tb">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dg').datagrid('reload')">刷新</a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="">新增</a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="">编辑</a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="">删除</a>
</div>

View File

@@ -0,0 +1,19 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("MobileClientManagement")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="easyui-tabs" data-options="plain:true,fit:true">
<div title='<%: Html.Language("MenuSettings")%>' data-options="href:'/MobileApp/AppMenu/'"></div>
<div title='<%: Html.Language("HotelIntroduction")%>' data-options="href:'/MobileApp/AppHotel/'"></div>
<div title='<%: Html.Language("ServiceInformation")%>' data-options="href:'/MobileApp/Service/'"></div>
<div title='<%: Html.Language("LightControl")%>' data-options="href:'/MobileApp/Light/'"></div>
<div title='<%: Html.Language("SceneControl")%>' data-options="href:'/MobileApp/Scene/'"></div>
<div title='<%: Html.Language("PADRoomNumberSetting")%>' data-options="href:'/MobileApp/AppRoom/'"></div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>

View File

@@ -0,0 +1,79 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgLight" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
toolbar: '#tbLight',
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
url: '/MobileApp/LoadLightsByPage/'
">
<thead>
<tr>
<th data-options="field:'Outlet',resizable:false">
<%: Html.Language("DeliveryOutlet")%>
</th>
<th data-options="field:'Name',width:30,resizable:false">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'EnglishName',width:100,resizable:false">
<%: Html.Language("EnglishName")%>
</th>
<th data-options="field:'Type',resizable:false">
<%: Html.Language("Type")%>
</th>
<th data-options="
field: 'AppApply',
align: 'center',
formatter: lightAppApplyFormatter,
resizable:false
">
<%: Html.Language("Display")%>
</th>
</tr>
</thead>
</table>
<div id="tbLight">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#dgLight').datagrid('reload')">
<%: Html.Language("Refresh")%></a>
<label>
<%: Html.Language("RoomType")%></label>
<select id="cbxLightRoomType" class="easyui-combobox" style="width: 100px;" data-options="
valueField: 'ID',
textField: 'Name',
required: true,
panelHeight: 'auto',
editable: false,
url: '/RoomType/LoadRoomType/',
onSelect: cbxLightRoomTypeOnSelect
">
</select>
</div>
<script type="text/javascript">
function cbxLightRoomTypeOnSelect(r) {
$("#dgLight").datagrid('reload', { RoomTypeID: r.ID });
}
function lightAppApplyFormatter(val, row) {
if (val) {
return '<input type="checkbox" checked="checked" onchange="lightAppApplyOnChange(this,\'' + row.ID + '\')" />';
} else {
return '<input type="checkbox" onchange="lightAppApplyOnChange(this,\'' + row.ID + '\')" />';
}
}
function lightAppApplyOnChange(sender, id) {
var params = { ID: id, AppApply: $(sender).is(":checked") };
$.tools.post(params, '/MobileApp/SaveLight/');
}
</script>

View File

@@ -0,0 +1,177 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgScene" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
toolbar: '#tbScene',
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
url: '/MobileApp/LoadScenesByPage/'
">
<thead>
<tr>
<th data-options="field:'Name',width:30,resizable:false">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'EnglishName',width:100,resizable:false">
<%: Html.Language("EnglishName")%>
</th>
<th data-options="field:'Icon',sortable:true,align:'center',resizable:false,formatter:iconFormatter">
<%: Html.Language("Icon")%>
</th>
<th data-options="
field: 'AppApply',
align: 'center',
resizable:false,
formatter: sceneAppApplyFormatter
">
<%: Html.Language("Display")%>
</th>
</tr>
</thead>
</table>
<div id="tbScene">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#dgScene').datagrid('reload')">
<%: Html.Language("Refresh")%></a>
<label>
<%: Html.Language("RoomType")%></label>
<select id="cbxSceneRoomType" class="easyui-combobox" style="width: 100px;" data-options="
valueField: 'ID',
textField: 'Name',
required: true,
panelHeight: 'auto',
editable: false,
url: '/RoomType/LoadRoomType/',
onSelect: cbxSceneRoomTypeOnSelect
">
</select>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true"
onclick="editScene();">
<%: Html.Language("Edit")%></a>
</div>
<div id="Scenedialog" class="easyui-window" style="padding: 5px; width: 300px; height: 210px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom: 5px;">
<form id="SceneForm" class="easyui-form" method="post" data-options="novalidate:true"
enctype="multipart/form-data">
<input type="hidden" id="SID" name="ID" value="0" />
<table cellspacing="5px">
<tr>
<th>
<label for="txtSceneName">
<%: Html.Language("Name")%></label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtSceneName" name="Name" readonly="true"
data-options="required:true" />
</td>
</tr>
<tr>
<th>
<label for="txtEnglishName">
<%: Html.Language("EnglishName")%></label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtSceneEnglishName" readonly="true"
name="EnglishName" data-options="required:false" />
</td>
</tr>
<tr>
<th>
<label for="txtIcon">
<%: Html.Language("Icon")%></label>
</th>
<td>
<input class="easyui-filebox" name="Icon" data-options="buttonText:lang.Browse" />
</td>
</tr>
<tr>
<th>
<label for="chkAppApply">
<%: Html.Language("Visible")%></label>
</th>
<td>
<label>
<input type="radio" id="rad1" name="AppApply" value="true" />
<%: Html.Language("Yes")%></label>&nbsp;
<label>
<input id="rad2" type="radio" name="AppApply" value="false" /><%: Html.Language("No")%></label>
</td>
</tr>
</table>
</form>
</div>
<div class="dlg-footer" style="text-align: right; padding: 5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="saveScene();">
<%: Html.Language("Save")%></a> <a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#Scenedialog').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
<script type="text/javascript">
function cbxSceneRoomTypeOnSelect(r) {
$("#dgScene").datagrid('reload', { RoomTypeID: r.ID });
}
function sceneAppApplyFormatter(val, row) {
if (val) {
return '<input type="checkbox" checked="checked" onchange="sceneAppApplyOnChange(this,\'' + row.ID + '\')" />';
} else {
return '<input type="checkbox" onchange="sceneAppApplyOnChange(this,\'' + row.ID + '\')" />';
}
}
function sceneAppApplyOnChange(sender, id) {
var params = { ID: id, AppApply: $(sender).is(":checked") };
$.tools.post(params, '/MobileApp/SaveScene/');
}
function editScene() {
var row = row || $('#dgScene').datagrid('getSelected');
if (row) {
$('#SceneForm').form('reset');
$('#SID').val(row.ID);
$('#txtSceneName').val(row.Name);
$('#txtSceneEnglishName').val(row.EnglishName);
if (row.AppApply) {
$('#SceneForm input[name=AppApply][value=false]').removeAttr('checked');
$('#SceneForm input[name=AppApply][value=true]').attr('checked', 'checked');
} else {
$('#SceneForm input[name=AppApply][value=true]').removeAttr('checked');
$('#SceneForm input[name=AppApply][value=false]').attr('checked', 'checked');
}
$('#Scenedialog').window({ title: lang.EditScene }).window('open');
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function saveScene() {
$('#SceneForm').form('submit', {
url: '/MobileApp/SaveEditScene/',
success: function (r) {
r = $.parseJSON(r);
if (r.IsSuccess) {
$('#dgScene').datagrid('reload');
$('#Scenedialog').window('close');
}
$.tools.alert(r.Message);
}
});
}
</script>

View File

@@ -0,0 +1,46 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgAppService" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tbAppService',
border: false,
singleSelect: true,
rownumbers: true,
striped: true,
fit: true,
fitColumns: true,
method: 'POST',
url: '/MobileApp/LoadServices/'
">
<thead>
<tr>
<th data-options="field:'Name',width:100,resizable:false">
<%: Html.Language("ServiceName")%>
</th>
<th data-options="
field: 'AppApply',
align: 'center',
resizable:false,
formatter: appApplyFormatter
">
<%: Html.Language("Display")%>
</th>
</tr>
</thead>
</table>
<div id="tbAppService">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dgAppService').datagrid('reload')"><%: Html.Language("Refresh")%></a>
</div>
<script type="text/javascript">
function appApplyFormatter(val,row) {
if (val) {
return '<input type="checkbox" checked="checked" onchange="appApplyOnChange(this,\'' + row.Type + '\',\'' + row.Code + '\')" />';
} else {
return '<input type="checkbox" onchange="appApplyOnChange(this,\'' + row.Type + '\',\'' + row.Code + '\')" />';
}
}
function appApplyOnChange(sender,type,code) {
var params = { Type: type, Code: code, AppApply: $(sender).is(":checked") };
$.tools.post(params, '/MobileApp/SaveService/');
}
</script>

View File

@@ -0,0 +1,20 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SimonMasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("MobileClientManagement")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="easyui-tabs" data-options="plain:true,fit:true">
<div title='<%: Html.Language("MenuSettings")%>' data-options="href:'/MobileApp/AppMenu/'"></div>
<div title='<%: Html.Language("HotelIntroduction")%>' data-options="href:'/MobileApp/AppHotel/'"></div>
<div title='<%: Html.Language("ServiceInformation")%>' data-options="href:'/MobileApp/Service/'"></div>
<div title='<%: Html.Language("LightControl")%>' data-options="href:'/MobileApp/Light/'"></div>
<div title='<%: Html.Language("SceneControl")%>' data-options="href:'/MobileApp/Scene/'"></div>
<div title='<%: Html.Language("PADRoomNumberSetting")%>' data-options="href:'/MobileApp/AppRoom/'"></div>
<%--<div title='<%: Html.Language("WXMenu")%>' data-options="href:'/MobileApp/WXMenu/'"></div>--%>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>

View File

@@ -0,0 +1,51 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgWXMenu" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tbWXMenu',
border: false,
singleSelect: true,
rownumbers: true,
striped: true,
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
url: '/MobileApp/LoadMenus/',
queryParams: { type:1}
">
<thead>
<tr>
<th data-options="field:'Name',width:100,resizable:false">
<%: Html.Language("MenuName")%>
</th>
<th data-options="field:'Sort',sortable:true,align:'center',resizable:false">
<%: Html.Language("Sort")%>
</th>
<th data-options="
field: 'ActiveIndicator',
align: 'center',
resizable:false,
formatter: appApplyWXFormatter
">
<%: Html.Language("Display")%>
</th>
</tr>
</thead>
</table>
<div id="tbWXMenu">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dgWXMenu').datagrid('reload')"><%: Html.Language("Refresh")%></a>
</div>
<script type="text/javascript">
function appApplyWXFormatter(val, row) {
if (val) {
return '<input type="checkbox" checked="checked" onchange="appApplyWXOnChange(this,\'' + row.ID + '\',\'' + row.Name + '\')" />';
} else {
return '<input type="checkbox" onchange="appApplyWXOnChange(this,\'' + row.ID + '\',\'' + row.Name + '\')" />';
}
}
function appApplyWXOnChange(sender, id, name) {
var params = { id: id, activeIndicator: $(sender).is(":checked") };
$.tools.post(params, '/MobileApp/SaveWXMenu/');
}
</script>