/// <summary> /// 通过数据库构造 /// </summary> /// <param name="row"></param> /// <param name="tree"></param> public BaseDocDetailList(Db_BaseDoc row, List <Db_BaseTree> tree) : base(row) { if (tree.Count > 0) { this.TreeNames = string.Join(",", tree.Select(p => p.Name)); } }
private void SetValue(Db_BaseDoc row) { this.Id = row.Id; this.DocType = (BaseDocType)row.DocType; this.DocTypeString = this.DocType.ToString(); this.Code = row.Code; this.Caption = row.Caption; this.CreatedOn = row.CreatedOn; this.CreatedOnString = this.CreatedOn.ToString("yyyy-MM-dd HH:mm"); this.Seq = row.Seq; this.IsDeleted = row.IsDeleted; this.IsDisabled = row.IsDisabled; }
/// <summary> /// 使用数据库对象构造 /// </summary> /// <param name="row"></param> public BaseDoc(Db_BaseDoc row) { SetValue(row); }