コード例 #1
0
        public async Task <GetDataAndColumnConfig_ProcesHanding> GetAllProcesHanding()
        {
            var sqlConfig = _sqlConfigsAppService.GetSqlConfigByCodeAsync("GAPC").Result;

            using (SqlConnection conn = new SqlConnection(connectionString))
            {
                if (conn.State == ConnectionState.Closed)
                {
                    await conn.OpenAsync();
                }
                var columnConfig = _sqlConfigDetailsAppService.GetColumnConfigBySqlId(sqlConfig.Id);

                var filterProcesHanding = conn.Query <object>(sqlConfig.SqlContent).ToList();

                return(new GetDataAndColumnConfig_ProcesHanding(filterProcesHanding, columnConfig));
            }
        }
コード例 #2
0
        public async Task <GetDataAndColumnConfig_HistoryUploads> GetAllHistoryUploads()
        {
            var sqlConfig = _sqlConfigsAppService.GetSqlConfigByCodeAsync("MHTL").Result;

            using (SqlConnection conn = new SqlConnection(connectionString))
            {
                if (conn.State == ConnectionState.Closed)
                {
                    await conn.OpenAsync();
                }
                var columnConfig = _sqlConfigDetailsAppService.GetColumnConfigBySqlId(sqlConfig.Id);

                var filterHistoryUploads = conn.Query <object>(sqlConfig.SqlContent).ToList();

                return(new GetDataAndColumnConfig_HistoryUploads(filterHistoryUploads, columnConfig));

                //return new DataVm { Code = "200", isSucceeded = dataString.Length > 0 ? true : false, Data = dataString, Message = "Success" };
            }
        }