static void Main(string[] args)
        {
            ExportAccessTabletoExcel.ExportQuery(@"C:\Projects\CHIA\Cerner\Cerner_Multum_en-US_249_180601.accdb", "drc_gestational_age_non_continuous_infusion", @"C:\Projects\CHIA\drc_gestational_age_non_continuous_infusion.xlsx");

            ReadExcelFileReturnList GetGetExcel = new ReadExcelFileReturnList();

            GetGetExcel.getExcelFile(@"C:\Projects\CHIA\drc_gestational_age_non_continuous_infusion.xlsx", 1);

            //List<string> ExcelList = new List<string>();

            //ReadExcelFile GetExcel = new ReadExcelFile(@"C:\Projects\CHIA\Copyof20180513_drc_age2_updates_US_CA_v249.xlsx");

            ReadExcelFile GetExcel = new ReadExcelFile();
            //ReadExcelFile GetExcel = new ReadExcelFile();
            //GetExcel.ExcelList = ReadExcelFile.getExcelFile();


            List <string> ExcelList = GetExcel.getExcelFile(@"C:\Projects\CHIA\Copyof20180513_drc_age2_updates_US_CA_v251.xlsx", 3); //Pass in Excel path and string
            //List<string> ExcelList2 = GetExcel2.getExcelFile(@"C:\Projects\CHIA\Copyof20180513_drc_age2_updates_US_CA_v251.xlsx", 3);
            List <string> ExcelList2 = GetExcel.getExcelFile(@"C:\Projects\CHIA\drc_gestational_age_non_continuous_infusion.xlsx", 1);

            CompareList CompareTwoExcelLists = new CompareList();
            //List<string> ReturnLists = CompareTwoLists.Contains(ExcelList, DataList);
            IEnumerable <string> ReturnDiffLists = CompareTwoExcelLists.Contains(ExcelList, ExcelList2);

            PrintToFile.Print(ExcelList);
            PrintToFile.Print(ExcelList2);
            PrintToFile.Print(ReturnDiffLists);


            //ConsoleWriteLineList.DumpExcelSet(ExcelList);

            // Load an Access ACCDB file

            DataSet ds1 = AccessDbLoader.LoadFromFile(@"C:\Projects\CHIA\Cerner\Cerner_Multum_en-US_249_180601.accdb");
            //DataSet ds1 = AccessDbLoader.LoadFromFile(@"C:\Projects\CHIA\Cerner\Cerner_Multum_en-CA_249_180601.accdb");
            //DataSet ds1 = AccessDbLoader.LoadFromFile(@"C:\Projects\CHIA\Lexi\Cerner_LexiComp_en-US_249_180601.accdb");
            List <string> DataList = DataSetToList.DumpDataSet(ds1);

            //DumpDataSetToConsole.DumpDataSet(ds1);

            //var firstNotSecond = ExcelList.Except(DataList).ToList();
            //var secondNotFirst = DataList.Except(ExcelList).ToList();

            CompareList CompareTwoLists = new CompareList();
            //List<string> ReturnLists = CompareTwoLists.Contains(ExcelList, DataList);
            IEnumerable <string> ReturnLists = CompareTwoLists.Contains(ExcelList, DataList);

            PrintToFile.Print(ExcelList);
            PrintToFile.Print(DataList);
            PrintToFile.Print(ReturnLists);
            //ConsoleWriteLineList.DumpExcelSet(ReturnLists);
            Console.ReadLine();
        }
Exemple #2
0
        /// <summary>
        /// 人员列表
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">一页展示多少条</param>
        /// <param name="Name">名称</param>
        /// <param name="Count">总数返回</param>
        /// <returns></returns>
        public List <SMSModel.UserRoleInfoList> GetUserRoleList(int pageIndex, int pageSize, string condition, ref int Count)
        {
            DataSetToList List = new DataSetToList();

            DataSet dataSet = UserManager.GetUserRoleInfoList(condition);

            List <SMSModel.UserRoleInfoList> RoleInfolist = List.ToList <SMSModel.UserRoleInfoList>(dataSet, 0);

            Count = RoleInfolist.Count();
            int startRow = (pageIndex - 1) * pageSize;

            return(RoleInfolist.Skip(startRow).Take(pageSize).ToList());
        }
Exemple #3
0
        /// <summary>
        /// 角色列表
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">一页展示多少条</param>
        /// <param name="Name">名称</param>
        /// <param name="Count">总数返回</param>
        /// <returns></returns>
        public List <SMSModel.RoleInfo> GetPageList(int pageIndex, int pageSize, string RoleName, ref int Count)
        {
            DataSetToList List = new DataSetToList();

            StringBuilder where = new StringBuilder();
            where.Append(" 1=1 ");

            //where.Append( " Code Like '2%' " );
            if (!string.IsNullOrEmpty(RoleName))
            {
                where.Append(" and Name like '%" + RoleName + "%' ");
            }
            where.Append(" order by Code asc ");

            DataSet dt = UserManager.GetRoleList(where.ToString());

            List <SMSModel.RoleInfo> RoleInfolist = List.ToList <SMSModel.RoleInfo>(dt, 0);

            Count = RoleInfolist.Count();
            int startRow = (pageIndex - 1) * pageSize;

            return(RoleInfolist.Skip(startRow).Take(pageSize).ToList());
        }