示例代码 /// <summary> /// 设置默认值 /// </summary> protected override void OnSetDefaultValue() { base.OnSetDefaultValue(); if (string.IsNullOrEmpty(this.CreatedBy)) this.CreatedBy = UFSoft.UBF.Util.Context.PlatformContext.Current.UserName; if (this.CreatedOn.Ticks == 0) this.CreatedOn = DateTime.Now; if (string.IsNullOrEmpty(this.ModifiedBy)) this.ModifiedBy = UFSoft.UBF.Util.Context.PlatformContext.Current.UserName; if (this.ModifiedOn.Ticks == 0) this.ModifiedOn = DateTime.Now; }
U9 档案或单据在做表单的时候数据连续插入多行CreatedBy等为空的解决方案
示例代码