Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
Ftt_Common
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Ftt_Common
Commits
7de75e4d
Commit
7de75e4d
authored
Aug 24, 2021
by
tr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、员工管理:数据初始化改为异步加载
parent
e610f2d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
SegPicture.cs
Tools/MyUtils/SegPicture.cs
+3
-3
wUser.cs
Tools/UI/wUser.cs
+12
-10
No files found.
Tools/MyUtils/SegPicture.cs
View file @
7de75e4d
...
...
@@ -63,7 +63,7 @@ namespace Tools.MyUtils
/// <returns></returns>
private
static
FtpClient
GetFtpClient
()
{
return
new
FtpClient
(
Seg
Config
.
UploadFtpUrl
,
SegConfig
.
UploadFtpUserID
,
Seg
Config
.
UploadFtpPassword
);
return
new
FtpClient
(
Seg
PictureConfig
.
UploadFtpUrl
,
SegPictureConfig
.
UploadFtpUserID
,
SegPicture
Config
.
UploadFtpPassword
);
}
/// <summary>
/// 获取HTTP客户端实例
...
...
@@ -74,7 +74,7 @@ namespace Tools.MyUtils
/// <returns></returns>
private
static
HttpClient
GetHttpClient
(
string
md5
,
bool
enableCachedDisk
,
Dictionary
<
string
,
object
>
paras
)
{
return
new
HttpClient
(
SegConfig
.
DownloadHttpBaseUrl
,
md5
,
enableCachedDisk
,
paras
);
return
new
HttpClient
(
Seg
Picture
Config
.
DownloadHttpBaseUrl
,
md5
,
enableCachedDisk
,
paras
);
}
#
endregion
...
...
@@ -82,7 +82,7 @@ namespace Tools.MyUtils
/// <summary>
/// 图片分离配置
/// </summary>
public
class
SegConfig
public
class
Seg
Picture
Config
{
/// <summary>
/// 下载的Http基础路径
...
...
Tools/UI/wUser.cs
View file @
7de75e4d
...
...
@@ -24,7 +24,7 @@ namespace Tools.UI
//事件:窗体加载
private
void
wUser_Load
(
object
sender
,
EventArgs
e
)
{
this
.
InitData
(
);
Task
.
Run
(()
=>
this
.
InitData
()
);
this
.
InitUI
();
}
//事件:添加
...
...
@@ -54,13 +54,17 @@ namespace Tools.UI
public
override
void
InitData
()
{
var
link
=
Utils
.
GetDbLinkString204
(
"FTT_Work"
);
this
.
InitDBHelper
(
link
);
this
.
ModuleTableList
=
new
List
<
TQuery
>
{
new
TQuery
(
"AC_User"
,
"SELECT * FROM dbo.AC_User"
)
};
this
.
_ds
=
this
.
_db
.
GetData
(
this
.
ModuleTableList
,
true
);
//图片分离兼容处理
SegConfig
.
Init
(
link
);
Utils
.
FetchImage
(
this
.
_ds
);
this
.
AsyncUI
(()
=>
{
var
link
=
Utils
.
GetDbLinkString204
(
"FTT_Work"
);
this
.
InitDBHelper
(
link
);
this
.
ModuleTableList
=
new
List
<
TQuery
>
{
new
TQuery
(
"AC_User"
,
"SELECT * FROM dbo.AC_User"
)
};
this
.
_ds
=
this
.
_db
.
GetData
(
this
.
ModuleTableList
,
true
);
//图片分离兼容处理
SegPictureConfig
.
Init
(
link
);
Utils
.
FetchImage
(
this
.
_ds
);
//绑定数据源
this
.
dgvDetail
.
DataSource
=
this
.
_ds
.
Tables
[
0
].
DefaultView
;
});
}
public
override
void
InitUI
()
{
...
...
@@ -71,8 +75,6 @@ namespace Tools.UI
//事件
this
.
dgvDetail
.
CellFormatting
+=
DgvDetail_CellFormatting
;
this
.
dgvDetail
.
DataError
+=
DgvDetail_DataError
;
//绑定数据源
this
.
dgvDetail
.
DataSource
=
this
.
_ds
.
Tables
[
0
].
DefaultView
;
}
//事件:单元格格式化
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment