/// <summary> /// 创建发文单位 /// </summary> /// <param name="cnShortName">名称</param> /// <param name="isInner">是否内部单位\部门</param> /// <returns></returns> public static IssuedUnit CreateIssuedUnit(string cnShortName,bool isInner) { var issuedUnit = new IssuedUnit { CnName = cnShortName, CnShortName = cnShortName, IsInner = isInner, }; issuedUnit.GenerateNewIdentity(); return issuedUnit; }
/// <summary> /// 设置发文单位 /// </summary> /// <param name="issuedUnit">发文单位</param> public void SetIssuedUnit(IssuedUnit issuedUnit) { if (issuedUnit == null || issuedUnit.IsTransient()) { throw new ArgumentException("发文单位Id参数为空!"); } IssuedUnit = issuedUnit; IssuedUnitId = issuedUnit.Id; }