Esempio n. 1
0
        /// <summary>
        ///     设置活动类型
        /// </summary>
        /// <param name="actionCategory">活动类型</param>
        /// <param name="targetCategory">目标类别</param>
        public void SetActionCategory(ActionCategory actionCategory, ActionCategory targetCategory)
        {
            if (actionCategory == null || actionCategory.IsTransient())
            {
                throw new ArgumentException("活动类型参数为空!");
            }

            ActionCategory = actionCategory;
            ActionCategoryId = actionCategory.Id;

            if (targetCategory == null || targetCategory.IsTransient())
            {
                throw new ArgumentException("目标类别参数为空!");
            }

            TargetCategory = targetCategory;
            TargetCategoryId = targetCategory.Id;
        }
Esempio n. 2
0
        /// <summary>
        ///     设置引进方式
        /// </summary>
        /// <param name="importCategory">引进方式</param>
        public void SetImportCategory(ActionCategory importCategory)
        {
            if (importCategory == null || importCategory.IsTransient())
            {
                throw new ArgumentException("引进方式参数为空!");
            }

            ImportCategory = importCategory;
            ImportCategoryId = importCategory.Id;
        }