You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
@{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Index.cshtml"; } <style> #ISO { width: 10px; } </style> <link href="~/Content/js/select2/select2.min.css" rel="stylesheet" /> <script src="~/Content/js/select2/select2.min.js"></script> <script> var ID = $.request("ID"); $(function () { if (ID != "") { $("#WorkPointCode").val(WorkPointCode); $("#WorkPointName").val(WorkPointName); $("#ServerName").val(ServerName); $("#DataBaseName").val(DataBaseName); $("#DataBaseUser").val(DataBaseUser); $("#DataBasePwd").val(DataBasePwd); if (Enable == '是') { $("#StatusYes").prop("checked", true); } else { $("#StatusNo").prop("checked", true); } } });
function submitForm() { var WorkPointCode = $("#WorkPointCode").val(); var WorkPointName = $("#WorkPointName").val(); var ServerName = $("#ServerName").val(); var DataBaseName = $("#DataBaseName").val(); var DataBaseUser = $("#DataBaseUser").val(); var DataBasePwd = $("#DataBasePwd").val(); var Enable = $('input[name="State"]:checked').val(); if (WorkPointCode == "" || WorkPointCode==undefined) { $.modalAlert("请先输入站点编号!"); return; } if (WorkPointName == "" || WorkPointName == undefined) { $.modalAlert("请先输入站点名称!"); return; } if (ServerName == "" || ServerName == undefined) { $.modalAlert("请先输入数据库服务器地址!"); return; } if (DataBaseName == "" || DataBaseName == undefined) { $.modalAlert("请先输入数据库名称!"); return; } if (DataBaseUser == "" || DataBaseUser == undefined) { $.modalAlert("请先输入数据库用户名称!"); return; } if (DataBasePwd == "" || DataBasePwd == undefined) { $.modalAlert("请先输入数据库口令!"); return; } if (Enable == "" || Enable == undefined) { $.modalAlert("请选择是否启用!"); return; } var objArr = { ID:ID, WorkPointCode: WorkPointCode, WorkPointName: WorkPointName, ServerName: ServerName, DataBaseName: DataBaseName, DataBaseUser: DataBaseUser, DataBasePwd: DataBasePwd, Enable: Enable } debugger; if (ID!="") { $.submitForm({ url: "/WMS/BasicSettings/UpdateICSType" + "?" + Math.random(), param: { keyValue: JSON.stringify(objArr) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } else { $.submitForm({ url: "/WMS/BasicSettings/InsertICSType" + "?" + Math.random(), param: { keyValue: JSON.stringify(objArr) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } } //function ChcekboxChange() { // debugger; // $("#changechaeckbox").find("input[type='checkbox']").each(function (i, n) { // if ($(this).prop('checked') == false) { // $(this).val(""); // }
// });
</script>
<form id="form1"> <div style="padding-top: 20px; margin-right: 20px;"> <table class="form"> <tr> <th class="formTitle">站点编号:</th> <td class="formValue"> <input id="WorkPointCode" name="WorkPointCode" type="text" class="form-control required" style="width: 300px;" maxlength="100" placeholder="站点编号" /> </td> </tr> <tr> <th class="formTitle">站点名称:</th> <td class="formValue"> <input id="WorkPointName" name="WorkPointName" type="text" class="form-control required" style="width: 300px;" maxlength="100" placeholder="站点名称" /> </td> </tr> <tr> <th class="formTitle">数据库服务器地址:</th> <td class="formValue"> <input id="ServerName" name="ServerName" type="text" class="form-control required" style="width: 300px;" maxlength="100" placeholder="数据库服务器地址" /> </td> </tr> <tr> <th class="formTitle">数据库名称:</th> <td class="formValue"> <input id="DataBaseName" name="DataBaseName" type="text" class="form-control required" style="width: 300px;" maxlength="100" placeholder="数据库名称" /> </td> </tr> <tr> <th class="formTitle">数据库用户名称:</th> <td class="formValue"> <input id="DataBaseUser" name="DataBaseUser" type="text" class="form-control required" style="width: 300px;" maxlength="100" placeholder="数据库用户名称" /> </td> </tr> <tr> <th class="formTitle">数据库口令:</th> <td class="formValue"> <input id="DataBasePwd" name="DataBasePwd" type="password" class="form-control required" style="width: 300px;" maxlength="100" placeholder="数据库口令" /> </td> </tr> <tr> <td> <label> 是否启用:</label> </td> <td> <div class="input-group" id="changechaeckbox"> <input type="radio" name="State" value="1" id="StatusYes" style="width:30px" onchange="ChcekboxChange()" /><label for="cb-NoQuotedPrice">是</label> <label style="width:85px"></label> <input type="radio" name="State" value="0" id="StatusNo" style="width:30px" onchange="ChcekboxChange()" /><label for="cb-QuotedPrice">否</label> </div>
</td>
<td style="padding-left: 10px;"></td> </tr>
</table> </div> </form>
|