コード例 #1
0
        public static void ImportSSC()
        {
            List <NumberType> numberTypes = NumberTypeBiz.Instance.GetAll().Where(x => x.RuleType.Contains("SSC")).ToList();

            string[] number1 = new string[] { "DaXiao", "DanShuang", "ZiHe", "Lu012" };
            string[] number2 = new string[] { "DaXiao", "DanShuang", "ZiHe", "Lu012", "He", "HeWei", "Ji", "JiWei", "KuaDu", "DaXiaoBi", "ZiHeBi", "DanShuangBi", "Lu012Bi" };
            string[] number3 = new string[] { "DaXiao", "DanShuang", "ZiHe", "Lu012", "He", "HeWei", "Ji", "JiWei", "KuaDu", "AC", "DaXiaoBi", "ZiHeBi", "DanShuangBi", "Lu012Bi" };

            foreach (var numberType in numberTypes)
            {
                Data.Biz.SSC.DmDPCBiz biz = new Data.Biz.SSC.DmDPCBiz("jiangxssc", numberType.Code.GetDmTableSuffix());

                List <DimensionNumberType> ntds = new List <DimensionNumberType>();
                if (numberType.Length == 1)
                {
                    ntds = biz.DataAccessor.SelectNumberTypeDimGroupBy(number1, numberType.Code);
                }
                else if (numberType.Length == 2)
                {
                    ntds = biz.DataAccessor.SelectNumberTypeDimGroupBy(number2, numberType.Code);
                }
                else
                {
                    ntds = biz.DataAccessor.SelectNumberTypeDimGroupBy(number3, numberType.Code);
                }

                foreach (var ntd in ntds)
                {
                    ntd.NumberType  = numberType.Code;
                    ntd.RuleType    = numberType.RuleType;
                    ntd.Amount      = ntd.Nums * numberType.Amount;
                    ntd.Probability = (ntd.Nums * 1.0) * numberType.Probability;
                }
                DimensionNumberTypeBiz.Instance.DataAccessor.Insert(ntds, SqlInsertMethod.SqlBulkCopy);
            }
        }
コード例 #2
0
        public static void ImportSSC()
        {
            List<NumberType> numberTypes = NumberTypeBiz.Instance.GetAll().Where(x => x.RuleType.Contains("SSC")).ToList();
            string[] number1 = new string[] { "DaXiao", "DanShuang", "ZiHe", "Lu012" };
            string[] number2 = new string[] { "DaXiao", "DanShuang", "ZiHe", "Lu012", "He", "HeWei", "Ji", "JiWei", "KuaDu", "DaXiaoBi", "ZiHeBi", "DanShuangBi", "Lu012Bi" };
            string[] number3 = new string[] { "DaXiao", "DanShuang", "ZiHe", "Lu012", "He", "HeWei", "Ji", "JiWei", "KuaDu", "AC", "DaXiaoBi", "ZiHeBi", "DanShuangBi", "Lu012Bi" };

            foreach (var numberType in numberTypes)
            {
                Data.Biz.SSC.DmDPCBiz biz = new Data.Biz.SSC.DmDPCBiz("jiangxssc", numberType.Code.GetDmTableSuffix());

                List<DimensionNumberType> ntds = new List<DimensionNumberType>();
                if (numberType.Length == 1)
                    ntds = biz.DataAccessor.SelectNumberTypeDimGroupBy(number1, numberType.Code);
                else if (numberType.Length == 2)
                    ntds = biz.DataAccessor.SelectNumberTypeDimGroupBy(number2, numberType.Code);
                else
                    ntds = biz.DataAccessor.SelectNumberTypeDimGroupBy(number3, numberType.Code);

                foreach (var ntd in ntds)
                {
                    ntd.NumberType = numberType.Code;
                    ntd.RuleType = numberType.RuleType;
                    ntd.Amount = ntd.Nums * numberType.Amount;
                    ntd.Probability = (ntd.Nums * 1.0) * numberType.Probability;
                }
                DimensionNumberTypeBiz.Instance.DataAccessor.Insert(ntds, SqlInsertMethod.SqlBulkCopy);
            }
        }