/// <summary> /// 删除记录(逻辑删除, 未提交保存) /// 作者:曾璐 /// </summary> /// <param name="model"></param> /// <returns></returns> public virtual bool PreDelete(XuHos.DAL.EF.DBEntities db, TEntity model) { if (model != null) { model.DeleteTime = DateTime.Now; model.DeleteUserID = string.IsNullOrEmpty(model.CreateUserID) ? (CurrentOperatorUserID ?? "") : model.CreateUserID; model.IsDeleted = true; helper.PreUpdate(db, model); } return(true); }
/// <summary> /// 更新(未提交保存) /// 作者:曾璐 /// </summary> /// <param name="model"></param> /// <returns></returns> public virtual XuHos.DAL.EF.DBEntities PreUpdate(XuHos.DAL.EF.DBEntities db, TEntity model) { model.ModifyTime = DateTime.Now; model.ModifyUserID = string.IsNullOrEmpty(model.ModifyUserID) ? (CurrentOperatorUserID ?? "") : model.ModifyUserID; return(helper.PreUpdate(db, model)); }
internal KMTransaction(DBEntities db, DbContextTransaction tran) { this.db = db; this.tran = tran; current = this; }