我们正在开发诊所的应用程序。为了快速添加新处方,我们使用模式视图,通过该视图可以输入必要的条目并向数据库添加新处方。在此模态医生名称中显示一个下拉菜单,然后设置一个btn,通过该btn打开另一个模态以添加新医生。 这是第一个模式的代码:
`<form id="QuickFrm" class="col-md-12 form-horizontal">
<div class="col-md-6">
@Html.EditorFor(m => m.CustomerBasicInfo.DocNO)
@Html.EditorFor(m => m.CustomerBasicInfo.FirstName)
@Html.EditorFor(m => m.CustomerBasicInfo.LastName)
@Html.EditorFor(m => m.CustomerBasicInfo.CustomerBirthDateEn)
</div>
<div class="col-md-6">
@Html.EditorFor(m => m.CustomerBasicInfo.checkUpDate)
<div class="row">
<div class="col-md-11">
@Html.EditorFor(m => m.CustomerBasicInfo.CheckUpDR)@*<= doctors dropdown list*@
</div>
<div class="col-md-1">
<a href="#" class="btn" sdata-placement="top" onclick="MinaDent.SearchModal.QuickUserRegistration()">
<i class="fa fa-plus"></i>
</a>
</div>
</div>
@Html.EditorFor(m => m.CustomerBasicInfo.MobileNumber)
</div>
`
这是QuickUserRegistration()代码:
function QuickUserRegistration() {
$.ajax({
type: "Get",
url: "/UserManagement/Register/QuickCreateUser",
beforeSend: function () { new UserInterface.Notification().showWaiting(); },
success: function (result) {
bootbox.dialog({
message: result,
size: 'large',
className: "large",
title: MinaDent.Common.QuickRegistration,
buttons: {
Custom: {
label: MinaDent.Common.addBtnTxt,
className: "blue",
callback: function () {
debugger;
//$("#CreateUserFrm").data('formValidation').validate();
//if ($("#CreateUserFrm").data('formValidation').isValid()) {
$.post("/UserManagement/Register/QuickCreateUser",
$("#CreateUserFrm").serialize(),function (res) { },
cancel: {
label: '<i class="fa fa-times"></i> ' + MinaDent.Common.cancelBtnTxt
},
}
});
},
问题是添加新医生并从第二个模式中恢复后,我如何更新医生下拉菜单?