public ActionResult Add(Sys_userEntity newsEntity) { if (ModelState.IsValid) { newsEntity.CreateDate = DateTime.Now; newsEntity.UpdateDate = DateTime.Now; bool editFlag = false; newsEntity.SetDefaultValue(); editFlag = DalHelper.Instance.Insert <Sys_userEntity>(newsEntity) > 0; } return(View(newsEntity)); }
public ActionResult Editor(Sys_userEntity newsEntity) { newsEntity.CreateDate = DateTime.Now; if (ModelState.IsValid) { bool editFlag = false; newsEntity.SetDefaultValue(); if (newsEntity.SysUserID > 0) { editFlag = DalHelper.Instance.Edit <Sys_userEntity>(newsEntity); } else { editFlag = DalHelper.Instance.Insert <Sys_userEntity>(newsEntity) > 0; } //MessageShow(); } return(View(newsEntity)); }