public ArticleConfigDetail(ConfigCode _code, ConfigName _name, ConfigGang _gang,
                                   ConfigType _type, ConfigBind _bind,
                                   TaxingBehaviour _taxing, HealthBehaviour _health, SocialBehaviour _social, params ConfigCode[] _path)
            : base(_code, _gang, _type, _bind, _taxing, _health, _social)
        {
            InternalName = _name;

            InternalPath = _path.ToList();
        }
        private IEnumerable <TargetItem> CreateTargetsQueue(ConfigCode code, TargetItem target, IEnumerable <TargetHead> heads, IEnumerable <Tuple <TargetHead, TargetPart> > parts)
        {
            IEnumerable <ArticleTarget> targetList = new List <ArticleTarget>();

            ConfigType targetType = ModelSourceProfile.GetConfigType(code);
            ConfigBind targetBind = ModelSourceProfile.GetConfigBind(code);

            TargetHead codeHead = 0;
            TargetPart codePart = 0;
            ConfigCode codeBody = code;
            TargetSeed seedBody = 0;

            if (targetBind == (ConfigBind)ArticleBind.ARTICLE_OPT)
            {
                return(targetList);
            }
            if (targetType == (ConfigType)ArticleType.NO_HEAD_PART_TYPE)
            {
                targetList = new List <ArticleTarget>()
                {
                    new ArticleTarget(codeHead, codePart, codeBody, seedBody)
                };
            }
            if (targetType == (ConfigType)ArticleType.HEAD_CODE_ARTICLE)
            {
                if (target.Head() != 0)
                {
                    codeHead   = target.Head();
                    targetList = new List <ArticleTarget>()
                    {
                        new ArticleTarget(codeHead, codePart, codeBody, seedBody)
                    };
                }
                else
                {
                    targetList = heads.Select((ch) => (new ArticleTarget(ch, codePart, codeBody, seedBody))).ToList();
                }
            }
            else if (targetType == (ConfigType)ArticleType.PART_CODE_ARTICLE)
            {
                if (target.Head() != 0 && target.Part() != 0)
                {
                    codeHead   = target.Head();
                    codePart   = target.Part();
                    targetList = new List <ArticleTarget>()
                    {
                        new ArticleTarget(codeHead, codePart, codeBody, seedBody)
                    };
                }
                else
                {
                    targetList = parts.Select((pp) => (new ArticleTarget(pp.Item1, pp.Item2, codeBody, seedBody))).ToList();
                }
            }

            return(targetList);
        }
        public ConfigStub CloneMasterStub(ConfigCode _code, ConfigRole _role, ConfigGang _gang,
                                          ConfigType _type, ConfigBind _bind,
                                          TaxingBehaviour _taxing, HealthBehaviour _health, SocialBehaviour _social)
        {
            ConfigStub returnStub = CloneUtils <ConfigStub> .CloneOrNull(InternalStub);

            returnStub.SetSourceConfig(_code, _role, _gang, _type, _bind, _taxing, _health, _social);

            return(returnStub);
        }
        public ArticleConfigFeatures(ConfigCode _code, ConfigGang _gang,
                                     ConfigType _type, ConfigBind _bind,
                                     TaxingBehaviour _taxing, HealthBehaviour _health, SocialBehaviour _social)
        {
            InternalCode = _code;

            InternalGang = _gang;

            InternalType = _type;

            InternalBind = _bind;

            InternalTaxing = _taxing;
            InternalHealth = _health;
            InternalSocial = _social;
        }
        public void SetSymbolData(ConfigCode _code, ConfigRole _role, ConfigGang _gang,
                                  ConfigType _type, ConfigBind _bind,
                                  TaxingBehaviour _taxing, HealthBehaviour _health, SocialBehaviour _social)
        {
            InternalCode = _code;

            InternalRole = _role;

            InternalGang = _gang;

            InternalType = _type;

            InternalTaxing = _taxing;
            InternalHealth = _health;
            InternalSocial = _social;
        }
Esempio n. 6
0
 public ArticleCodeConfigData(ConfigCode _code, ConfigRole _role,
                              ConfigGang _gang, ConfigType _type, ConfigBind _bind,
                              TaxingBehaviour taxingType, HealthBehaviour healthType, SocialBehaviour socialType,
                              SymbolName _name, params ConfigCode[] _path)
 {
     Code       = _code;
     Role       = _role;
     Gang       = _gang;
     Type       = _type;
     Bind       = _bind;
     Name       = _name;
     Path       = _path.ToArray();
     TaxingType = taxingType;
     HealthType = healthType;
     SocialType = socialType;
 }
Esempio n. 7
0
        public IEnumerable <ArticleCodeConfigItem> GetArticleCodeData()
        {
            const ConfigGang EARNINGS_GANG = 1;
            const ConfigGang TRANSFER_GANG = 2;
            //const ConfigGang GROSSNET_GANG = 3;
            //const ConfigGang DEDUCTED_GANG = 4;
            //const ConfigGang PAYMENTS_GANG = 5;

            const ConfigType NO_HEAD_PART_TYPE = 0;
            const ConfigType HEAD_CODE_ARTICLE = 1;
            const ConfigType PART_CODE_ARTICLE = 2;

            const ConfigBind ARTICLE_OPT = 0;
            const ConfigBind ARTICLE_REQ = 1;

            const TaxingBehaviour TAXING_ADVANCE = TaxingBehaviour.TAXING_ADVANCE;
            const TaxingBehaviour TAXING_NOTHING = TaxingBehaviour.TAXING_NOTHING;
            const HealthBehaviour HEALTH_NOTHING = HealthBehaviour.HEALTH_NOTHING;
            const HealthBehaviour HEALTH_INCOMES = HealthBehaviour.HEALTH_INCOMES;
            const SocialBehaviour SOCIAL_NOTHING = SocialBehaviour.SOCIAL_NOTHING;
            const SocialBehaviour SOCIAL_INCOMES = SocialBehaviour.SOCIAL_INCOMES;

            return(new List <ArticleCodeConfigItem>()
            {
                new ArticleCodeConfigData(0, 0, EARNINGS_GANG, NO_HEAD_PART_TYPE, ARTICLE_OPT,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_UNKNOWN"),
                new ArticleCodeConfigData(1, 1, EARNINGS_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_CONTRACT_TERM"),
                new ArticleCodeConfigData(2, 2, EARNINGS_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_CONTRACT_TIMESHEET", 1, 8),
                new ArticleCodeConfigData(5, 5, EARNINGS_GANG, HEAD_CODE_ARTICLE, ARTICLE_OPT,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_CONTRACT_ATTEND_ITEM", 2),
                new ArticleCodeConfigData(4, 4, EARNINGS_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_CONTRACT_ABSENCE", 2, 10),
                new ArticleCodeConfigData(3, 3, EARNINGS_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_CONTRACT_WORKING", 2, 9),
                new ArticleCodeConfigData(6, 6, EARNINGS_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_POSITION_TERM", 1),
                new ArticleCodeConfigData(7, 7, EARNINGS_GANG, PART_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_POSITION_SCHEDULE", 6),
                new ArticleCodeConfigData(8, 8, EARNINGS_GANG, PART_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_POSITION_TIMESHEET", 7),
                new ArticleCodeConfigData(10, 10, EARNINGS_GANG, PART_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_POSITION_ABSENCE", 8, 5),
                new ArticleCodeConfigData(9, 9, EARNINGS_GANG, PART_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_POSITION_WORKING", 8, 10),
                new ArticleCodeConfigData(10000, 1000, EARNINGS_GANG, PART_CODE_ARTICLE, ARTICLE_OPT,
                                          TAXING_ADVANCE, HEALTH_INCOMES, SOCIAL_INCOMES, "FACT_POSITION_MONTHLY_AMOUNT", 8, 9),
                new ArticleCodeConfigData(10001, 1001, TRANSFER_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_DECLARATION"),
                new ArticleCodeConfigData(10002, 1002, TRANSFER_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_INS_HEALTH_DECLARATION"),
                new ArticleCodeConfigData(10003, 1003, TRANSFER_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_INS_SOCIAL_DECLARATION"),
                new ArticleCodeConfigData(10004, 1004, TRANSFER_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_INCOMES_GENERAL", 10001),
                new ArticleCodeConfigData(10005, 1005, TRANSFER_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_INCOMES_HEALTH", 10001, 10002, 10012),
                new ArticleCodeConfigData(10006, 1006, TRANSFER_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_INCOMES_SOCIAL", 10001, 10003, 10013),
                new ArticleCodeConfigData(10012, 1012, TRANSFER_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_INS_INCOMES_HEALTH", 10002),
                new ArticleCodeConfigData(10013, 1013, TRANSFER_GANG, HEAD_CODE_ARTICLE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_INS_INCOMES_SOCIAL", 10003),
                new ArticleCodeConfigData(10007, 1007, TRANSFER_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_INCOMES_ADVANCE", 10004, 10005, 10006),
                new ArticleCodeConfigData(10008, 1008, TRANSFER_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_INCOMES_WITHHOLD_GENERAL", 10007, 10004, 10005, 10006),
                new ArticleCodeConfigData(10009, 1009, TRANSFER_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_INCOMES_WITHHOLD_LOLEVEL", 10007, 10004, 10005, 10006, 10008),
                new ArticleCodeConfigData(10010, 1010, TRANSFER_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_INCOMES_WITHHOLD_TASKAGR", 10007, 10004, 10005, 10006, 10008, 10009),
                new ArticleCodeConfigData(10011, 1011, TRANSFER_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_INCOMES_WITHHOLD_PARTNER", 10007, 10004, 10005, 10006, 10008, 10009, 10010),
                new ArticleCodeConfigData(10014, 1014, TRANSFER_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_BASE_ADVANCE", 10007, 10008, 10009, 10010, 10011),
                new ArticleCodeConfigData(10015, 1015, TRANSFER_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_BASE_ADVANCE_HEALTH", 10005),
                new ArticleCodeConfigData(10016, 1016, TRANSFER_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_BASE_ADVANCE_SOCIAL", 10006),
                new ArticleCodeConfigData(10017, 1017, TRANSFER_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_BASE_ADVANCE_PARTIAL", 10014, 10015, 10016),
                new ArticleCodeConfigData(10019, 1019, TRANSFER_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_BASE_ADVANCE_SOLIDARY", 10007),
                new ArticleCodeConfigData(10023, 1023, TRANSFER_GANG, NO_HEAD_PART_TYPE, ARTICLE_REQ,
                                          TAXING_NOTHING, HEALTH_NOTHING, SOCIAL_NOTHING, "FACT_TAX_BASE_WITHHOLD", 10007, 10008, 10009, 10010, 10011),
            });
        }
Esempio n. 8
0
 public void SetSourceConfig(ConfigCode _code, ConfigRole _role, ConfigGang _gang,
                             ConfigType _type, ConfigBind _bind,
                             TaxingBehaviour _taxing, HealthBehaviour _health, SocialBehaviour _social)
 {
     InternalConfig.SetSymbolData(_code, _role, _gang, _type, _bind, _taxing, _health, _social);
 }