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
09fa31df
Commit
09fa31df
authored
May 13, 2021
by
tr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、清空表,日志优化
parent
dbf01564
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
wEmptyTable.cs
Tools/UI/wEmptyTable.cs
+3
-2
No files found.
Tools/UI/wEmptyTable.cs
View file @
09fa31df
...
...
@@ -91,7 +91,7 @@ namespace Tools.UI
{
//外键表,需要删除数据,然后重置自增主键
var
foreign_sql
=
$@"
DELETE FROM
{
table
}
DELETE FROM
{
table
}
DBCC CHECKIDENT('
{
table
}
',RESEED,0)"
;
this
.
_db
.
ExecNonSql
(
foreign_sql
);
this
.
EmptyLog
.
Add
(
foreign_sql
.
Trim
());
...
...
@@ -99,7 +99,8 @@ namespace Tools.UI
}
}
//记录日志
string
path
=
$@"
{
Utils
.
TempPath
}
\EmptyTable_
{
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
)}
.txt"
;
this
.
EmptyLog
.
Insert
(
0
,
$@"--数据库:
{
this
.
tslbLinkString
.
Text
}
"
);
string
path
=
$@"
{
Utils
.
TempPath
}
\
{
this
.
tstbMainTable
.
Text
}
_
{
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
)}
.txt"
;
File
.
WriteAllText
(
path
,
string
.
Join
(
"\r\n"
,
this
.
EmptyLog
));
//完成提示
Utils
.
Tip
(
$"已清空
{
this
.
tstbMainTable
.
Text
}
的关联表!"
);
...
...
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