Пример #1
0
        public static List <string> CheckTablesStruct()
        {
            TableInfoRepo OriTableRepo = new TableInfoRepo(ConnetionInfoFactory.GetMsOriginDbInfo());
            TableInfoRepo CpyTableRepo = new TableInfoRepo(ConnetionInfoFactory.GetMsCopyDbInfo());
            List <string> list         = new List <string>();

            var listOri = OriTableRepo.GetInformation_Class();
            var listCpy = CpyTableRepo.GetInformation_Class();

            foreach (TableInfo oInfo in listOri)
            {
                foreach (TableInfo cInfo in listCpy)
                {
                    if (oInfo.TABLE_NAME == cInfo.TABLE_NAME)
                    {
                        bool x = CheckTableStruct(oInfo.TABLE_NAME, OriTableRepo, CpyTableRepo);

                        if (x == false)
                        {
                            list.Add(oInfo.TABLE_NAME);
                        }
                    }
                }
            }

            return(list);
        }
Пример #2
0
        private static bool CheckTableStruct(
            string tableName, TableInfoRepo OriTableRepo, TableInfoRepo CpyTableRepo)
        {
            DataTable oriInfo = OriTableRepo.GetStructInfomation_DataTable(tableName);
            DataTable cpyInfo = CpyTableRepo.GetStructInfomation_DataTable(tableName);

            return(TryIsTableSame(oriInfo, cpyInfo));
        }
Пример #3
0
        public static List <string> GetNotMatchTableData()
        {
            TableInfoRepo OriTableRepo = new TableInfoRepo(ConnetionInfoFactory.GetMsOriginDbInfo());
            TableInfoRepo CpyTableRepo = new TableInfoRepo(ConnetionInfoFactory.GetMsCopyDbInfo());

            var listOri = OriTableRepo.GetInformation_Class();
            var listCpy = CpyTableRepo.GetInformation_Class();

            return(GetErrorList(listOri, listCpy));
        }
Пример #4
0
        private void AddTableStructNotMatch(string tableName, TableInfoRepo OriTableRepo, TableInfoRepo CpyTableRepo)
        {
            var ori = OriTableRepo.GetStructInfomation_DataTable(tableName);
            var cpy = OriTableRepo.GetStructInfomation_DataTable(tableName);

            if (isTableStructSame(ori, cpy) == false)
            {
                resultNameList.Add(tableName);
                resultTableList.Add(GetTableDataSet(ori, cpy));
            }
        }
Пример #5
0
        public TableAnalyzeService()
        {
            var oriInfo = ConnetionInfoFactory.GetMsOriginDbInfo();

            oriRepo = new TableInfoRepo(oriInfo);

            var cpyInfo = ConnetionInfoFactory.GetMsCopyDbInfo();

            cpyRepo = new TableInfoRepo(oriInfo);

            resultTableList = new List <DataSet>();
            resultNameList  = new List <string>();
        }