前台 格式化控件
$("#CustomerNo").combobox({ valueField:‘Value‘, textField:‘Text‘, panelHeight:‘auto‘, editable:false });
后台取值
var selectItems = new List<SelectListItem>(); List<CustomerModel> lst = _DeliveryListService.Get_receipt_CustomerInfo(ReceiptNo); foreach (CustomerModel item in lst) { selectItems.Add(new SelectListItem { Text = item.CustomerNm, Value = item.CustomerNo.ToString() }); } var msg = "用户信息查看:" + "修改成功:" + LoginUser.UserID; addLog(0, 1, msg, VarKey.ServicePage.UserInfoManager.ToString()); return Json(new { result = 1, Customer = selectItems, Msg = BaseRes.USE_MSG_015 });// "修改成功!" }
前台绑定
$(‘#CustomerNo‘).combobox("loadData",packJson.Customer);
时间: 2024-09-30 17:29:25