0
private Boolean Saveuser(bool isNew)
{
tb_User user = new tb_User();
user.User_Name = txtUserName.Text.Trim();
user.User_LoginName = txtLoginName.Text;
user.User_Password = txtPassord.Text;
user.User_ModifiedBy = clsGlobalVariable.strusername;
user.User_Modified = DateTime.Now;
user.User_IsDeleted = false;
user.User_IsUpdated = true;
user.User_UserGroup = "";
user.User_UserType = "";
user.User_WarehouseCode = "";
user.SetIsNew(isNew);
user.Save();
}
當我嘗試插入新用戶使用上述編碼時,它是worik,但嘗試通過傳遞isNew(false)來更新現有用戶。它不起作用,當我在activerecord.cs中追蹤時,新的和更新的髒列數始終爲0。我如何更新現有記錄? 請爲我回答? 謝謝。問題更新亞音速3.0中的現有記錄