我有一个具有以下定义的模型:
namespace ESimSolChemical.Models
{
public class Employee
{
public int EmployeeID{ get; set; }
public string EmployeeName{ get; set; }
public string Age{ get; set; }
public string Address{ get; set; }
}
我有以下 JavaScript:
<script type="text/javascript">
$(function () {
$('#btnEmployeePiker').click(function () {
var oParameter = new Object();
oParameter.MultipleReturn = false;
var oReturnObject = window.showModalDialog('/Employee/EmployeePiker/', oParameter, 'dialogHeight:470px;dialogWidth:550px;dialogLeft:400;dialogTop:100;center:yes;resizable:no;status:no;scroll:no');
});
});
</script>
我的 JavascriptoReturnObject
包含两个属性,例如:
oReturnObject.EmployeeID;
oReturnObject.EmployeeName;
现在我想分配:
@Model.employeeID= oReturnObject.EmployeeID;
我怎样才能完成这项任务?