Example #1
0
        private static void SaveToDB(string name, string type, IEnumerable <IList <int> > lists)
        {
            DmDPCBiz     biz      = new DmDPCBiz(name, type);
            List <DmDPC> entities = new List <DmDPC>(lists.Count());

            foreach (var list in lists)
            {
                entities.Add(GetDmFCAn(list, type));
            }
            biz.DataAccessor.Insert(entities, SqlInsertMethod.SqlBulkCopy);
        }
Example #2
0
        private static void SaveToDB(string name, string type, List <string> list)
        {
            DmDPCBiz     biz      = new DmDPCBiz(name, type);
            List <DmDPC> entities = new List <DmDPC>(list.Count);

            foreach (string str in list)
            {
                entities.Add(GetDmFCAn(str.ToList(), type));
            }
            biz.DataAccessor.Insert(entities, SqlInsertMethod.SqlBulkCopy);
        }
Example #3
0
        private static void ModifyNumberType(string name, string type)
        {
            DmDPCBiz biz     = new DmDPCBiz(name, type);
            var      numbers = biz.GetAll("Id", "Number");

            foreach (var number in numbers)
            {
                number.NumberType = number.Id.GetNumberType();
                biz.Modify(number, number.Id, DmDPC.C_NumberType);
            }
        }
Example #4
0
        private static void Modify(string name, string type)
        {
            DmDPCBiz biz     = new DmDPCBiz(name, type);
            var      numbers = biz.GetAll("Id", "Number");

            foreach (var number in numbers)
            {
                List <int> digits = number.Number.ToList(' ');
                number.Ji    = digits.GetJi();
                number.JiWei = number.Ji.GetWei();
                number.KuaDu = digits.GetKuaDu();
                number.AC    = digits.GetAC();

                //biz.Modify(number, number.Id, DmFCAn.C_Ji, DmFCAn.C_JiWei, DmFCAn.C_KuaDu, DmFCAn.C_AC);
            }
        }
Example #5
0
 private void LoadData()
 {
     string[] numberTypes = new string[] { "C2", "C3"};
     DmDPCBiz biz = new DmDPCBiz(ConfigHelper.SSLDmTableConnStringName, string.Empty);
     foreach (var numberType in numberTypes)
     {
         biz.DataAccessor.TableName = ConfigHelper.GetDmTableName(numberType.GetDmTableSuffix());
         List<DmDPC> list = biz.GetAll("Id", "Number");
         this.FillToDictionary(numberType, list);
     }
 }
Example #6
0
 public List<string> GetNumbers(string numberType)
 {
     string dmTableNameSuffix = numberType.GetDmTableSuffix();
     DmDPCBiz biz = new DmDPCBiz(ConfigHelper.SSLDmTableConnStringName, dmTableNameSuffix);
     return biz.GetAll("Id").Select(x => x.Id).ToList();
 }
Example #7
0
        private static void SaveToDB(string name, string type, List<string> list)
        {
            DmDPCBiz biz = new DmDPCBiz(name, type);
            List<DmDPC> entities = new List<DmDPC>(list.Count);

            foreach (string str in list)
            {
                entities.Add(GetDmDPC(str.ToList(), type));
            }

            biz.DataAccessor.Truncate();
            biz.DataAccessor.Insert(entities, SqlInsertMethod.SqlBulkCopy);
        }
Example #8
0
 private static void SaveToDB(string name, string type, IEnumerable<IList<int>> lists)
 {
     DmDPCBiz biz = new DmDPCBiz(name, type);
     List<DmDPC> entities = new List<DmDPC>(lists.Count());
     foreach (var list in lists)
     {
         entities.Add(GetDmFCAn(list,type));
     }
     biz.DataAccessor.Insert(entities, SqlInsertMethod.SqlBulkCopy);
 }
Example #9
0
        private static void Modify(string name, string type)
        {
            DmDPCBiz biz = new DmDPCBiz(name, type);
            var numbers = biz.GetAll("Id", "Number");
            foreach (var number in numbers)
            {
                List<int> digits = number.Number.ToList(' ');
                number.Ji = digits.GetJi();
                number.JiWei = number.Ji.GetWei();
                number.KuaDu = digits.GetKuaDu();
                number.AC = digits.GetAC();

                //biz.Modify(number, number.Id, DmFCAn.C_Ji, DmFCAn.C_JiWei, DmFCAn.C_KuaDu, DmFCAn.C_AC);
            }
        }
Example #10
0
 public List<DmDPC> GetNumberList(string numberType)
 {
     string dmTableNameSuffix = numberType.GetDmTableSuffix();
     DmDPCBiz biz = new DmDPCBiz(ConfigHelper.D11x5DmTableConnStringName, dmTableNameSuffix);
     return biz.GetAll("Id", "Number");
 }
Example #11
0
        private void LoadData()
        {
            this.caching.Clear();

            string[] numberTypes = new string[] { "C2", "C3", "C4", "C5", "C6", "C7", "C8" };
            DmDPCBiz Biz = new DmDPCBiz(ConfigHelper.D11x5DmTableConnStringName, string.Empty);
            foreach (var numberType in numberTypes)
            {
                Biz.DataAccessor.TableName = ConfigHelper.GetDmTableName(numberType.GetDmTableSuffix());
                List<DmDPC> list = Biz.GetAll("Id", "Number");
                this.FillToDictionary(numberType, list);
            }
        }
Example #12
0
 private static void ModifyNumberType(string name, string type)
 {
     DmDPCBiz biz = new DmDPCBiz(name, type);
     var numbers = biz.GetAll("Id", "Number");
     foreach (var number in numbers)
     {
         number.NumberType = number.Id.GetNumberType();
         biz.Modify(number, number.Id, DmDPC.C_NumberType);
     }
 }