Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
Jst.Client.Report.Download
Project
Overview
Details
Activity
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
陶然
Jst.Client.Report.Download
Commits
39ea0664
Commit
39ea0664
authored
Nov 14, 2022
by
任天宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统升级更新命名方式
parent
35f1994f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
FrmMain.Designer.cs
Src/FrmMain.Designer.cs
+26
-0
FrmMain.cs
Src/FrmMain.cs
+17
-0
No files found.
Src/FrmMain.Designer.cs
View file @
39ea0664
...
...
@@ -94,6 +94,8 @@ namespace Jst.Report.Download
this
.
colDealDate
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
colProductJudgement
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
lblMessage
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cbxPgName
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cbxPNandSN
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
pnlLeft
.
SuspendLayout
();
this
.
gbQuery
.
SuspendLayout
();
this
.
pnlCommands
.
SuspendLayout
();
...
...
@@ -553,6 +555,8 @@ namespace Jst.Report.Download
//
// gbDownloadConfig
//
this
.
gbDownloadConfig
.
Controls
.
Add
(
this
.
cbxPNandSN
);
this
.
gbDownloadConfig
.
Controls
.
Add
(
this
.
cbxPgName
);
this
.
gbDownloadConfig
.
Controls
.
Add
(
this
.
cbxRenameFileByAjt
);
this
.
gbDownloadConfig
.
Controls
.
Add
(
this
.
cbxRenameFileByWph
);
this
.
gbDownloadConfig
.
Controls
.
Add
(
this
.
cbxRenameFileByBatchNumber
);
...
...
@@ -781,6 +785,26 @@ namespace Jst.Report.Download
this
.
lblMessage
.
TabIndex
=
8
;
this
.
lblMessage
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
//
// cbxPgName
//
this
.
cbxPgName
.
AutoSize
=
true
;
this
.
cbxPgName
.
Location
=
new
System
.
Drawing
.
Point
(
674
,
29
);
this
.
cbxPgName
.
Name
=
"cbxPgName"
;
this
.
cbxPgName
.
Size
=
new
System
.
Drawing
.
Size
(
138
,
24
);
this
.
cbxPgName
.
TabIndex
=
13
;
this
.
cbxPgName
.
Text
=
"文件名+品名"
;
this
.
cbxPgName
.
UseVisualStyleBackColor
=
true
;
//
// cbxPNandSN
//
this
.
cbxPNandSN
.
AutoSize
=
true
;
this
.
cbxPNandSN
.
Location
=
new
System
.
Drawing
.
Point
(
467
,
30
);
this
.
cbxPNandSN
.
Name
=
"cbxPNandSN"
;
this
.
cbxPNandSN
.
Size
=
new
System
.
Drawing
.
Size
(
188
,
24
);
this
.
cbxPNandSN
.
TabIndex
=
14
;
this
.
cbxPNandSN
.
Text
=
"文件名+品名+批号"
;
this
.
cbxPNandSN
.
UseVisualStyleBackColor
=
true
;
//
// FrmMain
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
...
@@ -874,6 +898,8 @@ namespace Jst.Report.Download
private
System
.
Windows
.
Forms
.
TextBox
tbxUserName
;
private
System
.
Windows
.
Forms
.
Button
btnLogout
;
private
System
.
Windows
.
Forms
.
Button
btnLogin
;
private
System
.
Windows
.
Forms
.
CheckBox
cbxPgName
;
private
System
.
Windows
.
Forms
.
CheckBox
cbxPNandSN
;
}
}
Src/FrmMain.cs
View file @
39ea0664
...
...
@@ -35,6 +35,10 @@ namespace Jst.Report.Download
private
bool
_renameFileByAjt
=
false
;
private
bool
_renameFileByProductName
=
false
;
private
bool
_renameFileByProductNameAndSN
=
false
;
private
string
_fileRootPath
=
string
.
Empty
;
#
endregion
...
...
@@ -338,6 +342,8 @@ namespace Jst.Report.Download
_renameFileByBatchNumber
=
cbxRenameFileByBatchNumber
.
Checked
;
_renameFileByWph
=
cbxRenameFileByWph
.
Checked
;
_renameFileByAjt
=
cbxRenameFileByAjt
.
Checked
;
_renameFileByProductName
=
cbxPgName
.
Checked
;
_renameFileByProductNameAndSN
=
cbxPNandSN
.
Checked
;
Thread
thread
=
new
Thread
(
download
);
thread
.
Start
();
}
...
...
@@ -359,6 +365,17 @@ namespace Jst.Report.Download
lblMessage
.
Text
=
$"正在下载报告
{
result
.
ReportId
}
,共
{
_results
.
Results
.
Count
}
条,正在处理第
{
index2
}
条...."
;
});
string
text
=
$"
{
result
.
ReportId
}
.pdf"
;
if
(
_renameFileByProductNameAndSN
)
{
string
Text6
=
result
.
SampleName
.
Trim
();
string
Text7
=
result
.
SampleBatchNumber
.
Trim
();
text
=
$"
{
result
.
ReportId
}
{
Text6
}{
Text7
}
.pdf"
;
}
if
(
_renameFileByProductName
)
{
string
Text5
=
result
.
SampleName
.
Trim
();
text
=
$"
{
result
.
ReportId
}
{
Text5
}
.pdf"
;
}
if
(
_renameFileByBatchNumber
)
{
string
text2
=
result
.
SampleBatchNumber
.
Trim
();
...
...
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