Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
NS100
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0d8e1c53
由
张东亮
编写于
2023-07-28 15:34:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
ab16c896
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
21 行增加
和
21 行删除
BLL/Config.cs
BLL/ExtraFileData.cs
SmartScan/SetControl/UsrDataSource.cs
SmartScan/SetControl/UsrExportData.cs
BLL/Config.cs
查看文件 @
0d8e1c5
...
@@ -314,8 +314,8 @@ namespace BLL
...
@@ -314,8 +314,8 @@ namespace BLL
[
MyConfigComment
(
"数据源类型"
)]
[
MyConfigComment
(
"数据源类型"
)]
public
static
MyConfig
<
string
>
DataSource_Type
;
public
static
MyConfig
<
string
>
DataSource_Type
;
[
MyConfigComment
(
"数据源
字符串
"
)]
[
MyConfigComment
(
"数据源
文件路径
"
)]
public
static
MyConfig
<
string
>
DataSource_
String
;
public
static
MyConfig
<
string
>
DataSource_
FilePath
;
[
MyConfigComment
(
"数据源编码"
)]
[
MyConfigComment
(
"数据源编码"
)]
public
static
MyConfig
<
string
>
DataSource_Encoding
;
public
static
MyConfig
<
string
>
DataSource_Encoding
;
[
MyConfigComment
(
"数据源匹配Key"
)]
[
MyConfigComment
(
"数据源匹配Key"
)]
...
...
BLL/ExtraFileData.cs
查看文件 @
0d8e1c5
...
@@ -15,7 +15,7 @@ namespace BLL
...
@@ -15,7 +15,7 @@ namespace BLL
public
static
Dictionary
<
string
,
Dictionary
<
string
,
string
>>
AllData
=
new
Dictionary
<
string
,
Dictionary
<
string
,
string
>>();
public
static
Dictionary
<
string
,
Dictionary
<
string
,
string
>>
AllData
=
new
Dictionary
<
string
,
Dictionary
<
string
,
string
>>();
public
static
List
<
string
>
Titles
=
new
List
<
string
>();
public
static
List
<
string
>
Titles
=
new
List
<
string
>();
public
static
void
Init
()
{
public
static
void
Init
()
{
var
ext
=
Path
.
GetExtension
(
Config
.
DataSource_
String
);
var
ext
=
Path
.
GetExtension
(
Config
.
DataSource_
FilePath
);
if
(
string
.
IsNullOrEmpty
(
ext
))
if
(
string
.
IsNullOrEmpty
(
ext
))
{
{
return
;
return
;
...
@@ -29,24 +29,24 @@ namespace BLL
...
@@ -29,24 +29,24 @@ namespace BLL
}
}
public
static
void
LoadCSVALlData
()
public
static
void
LoadCSVALlData
()
{
{
LogNet
.
log
.
Info
(
"数据源:"
+
Config
.
DataSource_
String
);
LogNet
.
log
.
Info
(
"数据源:"
+
Config
.
DataSource_
FilePath
);
if
(!
File
.
Exists
(
Config
.
DataSource_
String
))
if
(!
File
.
Exists
(
Config
.
DataSource_
FilePath
))
{
{
return
;
return
;
throw
new
FileNotFoundException
(
Config
.
DataSource_
String
);
throw
new
FileNotFoundException
(
Config
.
DataSource_
FilePath
);
}
}
Titles
=
ParseCSVFileTitle
(
Config
.
DataSource_
String
);
Titles
=
ParseCSVFileTitle
(
Config
.
DataSource_
FilePath
);
//Common.extraKey = titles;
//Common.extraKey = titles;
string
[]
files
;
string
[]
files
;
if
(
Config
.
DataSource_Recursive
)
if
(
Config
.
DataSource_Recursive
)
{
{
var
ext
=
Path
.
GetExtension
(
Config
.
DataSource_
String
);
var
ext
=
Path
.
GetExtension
(
Config
.
DataSource_
FilePath
);
var
path
=
Path
.
GetDirectoryName
(
Config
.
DataSource_
String
);
var
path
=
Path
.
GetDirectoryName
(
Config
.
DataSource_
FilePath
);
files
=
Directory
.
GetFiles
(
path
,
"*"
+
ext
);
files
=
Directory
.
GetFiles
(
path
,
"*"
+
ext
);
}
}
else
else
{
{
files
=
new
string
[]
{
Config
.
DataSource_
String
};
files
=
new
string
[]
{
Config
.
DataSource_
FilePath
};
}
}
...
@@ -97,23 +97,23 @@ namespace BLL
...
@@ -97,23 +97,23 @@ namespace BLL
public
static
void
LoadXLSALlData
()
{
public
static
void
LoadXLSALlData
()
{
if
(!
File
.
Exists
(
Config
.
DataSource_
String
))
{
if
(!
File
.
Exists
(
Config
.
DataSource_
FilePath
))
{
return
;
return
;
//throw new FileNotFoundException(Config.DataSource_String);
//throw new FileNotFoundException(Config.DataSource_String);
}
}
Titles
=
ParseXLSFileTitle
(
Config
.
DataSource_
String
);
Titles
=
ParseXLSFileTitle
(
Config
.
DataSource_
FilePath
);
//Common.extraKey = titles;
//Common.extraKey = titles;
string
[]
files
;
string
[]
files
;
if
(
Config
.
DataSource_Recursive
)
if
(
Config
.
DataSource_Recursive
)
{
{
var
ext
=
Path
.
GetExtension
(
Config
.
DataSource_
String
);
var
ext
=
Path
.
GetExtension
(
Config
.
DataSource_
FilePath
);
var
path
=
Path
.
GetDirectoryName
(
Config
.
DataSource_
String
);
var
path
=
Path
.
GetDirectoryName
(
Config
.
DataSource_
FilePath
);
files
=
Directory
.
GetFiles
(
path
,
"*"
+
ext
);
files
=
Directory
.
GetFiles
(
path
,
"*"
+
ext
);
}
}
else
else
{
{
files
=
new
string
[]
{
Config
.
DataSource_
String
};
files
=
new
string
[]
{
Config
.
DataSource_
FilePath
};
}
}
...
...
SmartScan/SetControl/UsrDataSource.cs
查看文件 @
0d8e1c5
...
@@ -20,7 +20,7 @@ namespace SmartScan
...
@@ -20,7 +20,7 @@ namespace SmartScan
CboDataType
.
Items
.
Add
(
"Excel/CSV"
);
CboDataType
.
Items
.
Add
(
"Excel/CSV"
);
CboDataType
.
SelectedIndex
=
0
;
CboDataType
.
SelectedIndex
=
0
;
TxtDataSource
.
TextChanged
+=
TxtDataSource_TextChanged
;
TxtDataSource
.
TextChanged
+=
TxtDataSource_TextChanged
;
TxtDataSource
.
Text
=
Config
.
DataSource_
String
;
TxtDataSource
.
Text
=
Config
.
DataSource_
FilePath
;
ChkRecursive
.
Checked
=
Config
.
DataSource_Recursive
;
ChkRecursive
.
Checked
=
Config
.
DataSource_Recursive
;
Asa
.
FaceControl
.
Language
.
SetLanguage
(
this
);
Asa
.
FaceControl
.
Language
.
SetLanguage
(
this
);
}
}
...
@@ -92,7 +92,7 @@ namespace SmartScan
...
@@ -92,7 +92,7 @@ namespace SmartScan
CboDataKey
.
SelectedText
=
Config
.
DataSource_DataKey
;
CboDataKey
.
SelectedText
=
Config
.
DataSource_DataKey
;
}
}
TxtDataSource
.
Text
=
Config
.
DataSource_
String
;
TxtDataSource
.
Text
=
Config
.
DataSource_
FilePath
;
return
facePanel1
;
return
facePanel1
;
}
}
...
@@ -103,7 +103,7 @@ namespace SmartScan
...
@@ -103,7 +103,7 @@ namespace SmartScan
else
else
Config
.
DataSource_Type
=
"none"
;
Config
.
DataSource_Type
=
"none"
;
Config
.
DataSource_
String
=
TxtDataSource
.
Text
;
Config
.
DataSource_
FilePath
=
TxtDataSource
.
Text
;
Config
.
DataSource_DataKey
=
CboDataKey
.
Text
;
Config
.
DataSource_DataKey
=
CboDataKey
.
Text
;
Config
.
DataSource_DataTitle
=
CboDataTitle
.
Text
;
Config
.
DataSource_DataTitle
=
CboDataTitle
.
Text
;
Config
.
DataSource_Recursive
=
ChkRecursive
.
Checked
;
Config
.
DataSource_Recursive
=
ChkRecursive
.
Checked
;
...
...
SmartScan/SetControl/UsrExportData.cs
查看文件 @
0d8e1c5
...
@@ -20,7 +20,7 @@ namespace SmartScan
...
@@ -20,7 +20,7 @@ namespace SmartScan
CboDataType
.
Items
.
Add
(
"Excel/CSV"
);
CboDataType
.
Items
.
Add
(
"Excel/CSV"
);
CboDataType
.
SelectedIndex
=
0
;
CboDataType
.
SelectedIndex
=
0
;
TxtDataSource
.
TextChanged
+=
TxtDataSource_TextChanged
;
TxtDataSource
.
TextChanged
+=
TxtDataSource_TextChanged
;
TxtDataSource
.
Text
=
Config
.
DataSource_
String
;
TxtDataSource
.
Text
=
Config
.
DataSource_
FilePath
;
ChkRecursive
.
Checked
=
Config
.
DataSource_Recursive
;
ChkRecursive
.
Checked
=
Config
.
DataSource_Recursive
;
Asa
.
FaceControl
.
Language
.
SetLanguage
(
this
);
Asa
.
FaceControl
.
Language
.
SetLanguage
(
this
);
}
}
...
@@ -92,7 +92,7 @@ namespace SmartScan
...
@@ -92,7 +92,7 @@ namespace SmartScan
CboDataKey
.
SelectedText
=
Config
.
DataSource_DataKey
;
CboDataKey
.
SelectedText
=
Config
.
DataSource_DataKey
;
}
}
TxtDataSource
.
Text
=
Config
.
DataSource_
String
;
TxtDataSource
.
Text
=
Config
.
DataSource_
FilePath
;
return
facePanel1
;
return
facePanel1
;
}
}
...
@@ -103,7 +103,7 @@ namespace SmartScan
...
@@ -103,7 +103,7 @@ namespace SmartScan
else
else
Config
.
DataSource_Type
=
"none"
;
Config
.
DataSource_Type
=
"none"
;
Config
.
DataSource_
String
=
TxtDataSource
.
Text
;
Config
.
DataSource_
FilePath
=
TxtDataSource
.
Text
;
Config
.
DataSource_DataKey
=
CboDataKey
.
Text
;
Config
.
DataSource_DataKey
=
CboDataKey
.
Text
;
Config
.
DataSource_DataTitle
=
CboDataTitle
.
Text
;
Config
.
DataSource_DataTitle
=
CboDataTitle
.
Text
;
Config
.
DataSource_Recursive
=
ChkRecursive
.
Checked
;
Config
.
DataSource_Recursive
=
ChkRecursive
.
Checked
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论