如何初始化模型的datetime字段以设置所选日期

时间:2018-10-12 03:46:37

标签: asp.net-mvc datetime

  

这是在控制器中添加新的PreApproval,CCPA_SignedOn是日期时间字段

public CC_PreApproval NewPreApproval()
{
    return new CC_PreApproval {CCPA_Id=-1, CCPA_SignedBy = -1, CCPA_SignedOn = new DateTime(), Users = GetUsersSelectList(), CCPA_Status = "", Statuses = GetApprovalStatuses() };
}  

0 个答案:

没有答案