Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
ticket_half_auto
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李佳
ticket_half_auto
Commits
4162a502
Commit
4162a502
authored
Jun 18, 2021
by
李佳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
5b76b879
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
AutoEncashView.Designer.cs
...o.AutoPrint.Desktop/AutoEncash/AutoEncashView.Designer.cs
+15
-0
AutoEncashView.cs
ChuPiao.AutoPrint.Desktop/AutoEncash/AutoEncashView.cs
+42
-0
ChuPiao_Linux.suo
ChuPiao_Linux.suo
+0
-0
No files found.
ChuPiao.AutoPrint.Desktop/AutoEncash/AutoEncashView.Designer.cs
View file @
4162a502
...
...
@@ -55,6 +55,7 @@
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblStatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
chkMacNumber
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
linkLabel2
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
gbxMachine
.
SuspendLayout
();
this
.
SuspendLayout
();
//
...
...
@@ -63,6 +64,7 @@
this
.
gbxMachine
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
gbxMachine
.
Controls
.
Add
(
this
.
linkLabel2
);
this
.
gbxMachine
.
Controls
.
Add
(
this
.
label7
);
this
.
gbxMachine
.
Controls
.
Add
(
this
.
linkLabel1
);
this
.
gbxMachine
.
Controls
.
Add
(
this
.
textBox2
);
...
...
@@ -358,6 +360,18 @@
this
.
chkMacNumber
.
UseVisualStyleBackColor
=
true
;
this
.
chkMacNumber
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chkMacNumber_CheckedChanged
);
//
// linkLabel2
//
this
.
linkLabel2
.
AutoSize
=
true
;
this
.
linkLabel2
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
linkLabel2
.
Location
=
new
System
.
Drawing
.
Point
(
455
,
41
);
this
.
linkLabel2
.
Name
=
"linkLabel2"
;
this
.
linkLabel2
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
14
);
this
.
linkLabel2
.
TabIndex
=
89
;
this
.
linkLabel2
.
TabStop
=
true
;
this
.
linkLabel2
.
Text
=
"导出文件"
;
this
.
linkLabel2
.
LinkClicked
+=
new
System
.
Windows
.
Forms
.
LinkLabelLinkClickedEventHandler
(
this
.
linkLabel2_LinkClicked
);
//
// AutoEncashView
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
...
@@ -400,5 +414,6 @@
private
System
.
Windows
.
Forms
.
TextBox
textBox1
;
private
System
.
Windows
.
Forms
.
Label
label3
;
private
System
.
Windows
.
Forms
.
Label
label7
;
private
System
.
Windows
.
Forms
.
LinkLabel
linkLabel2
;
}
}
ChuPiao.AutoPrint.Desktop/AutoEncash/AutoEncashView.cs
View file @
4162a502
...
...
@@ -9,6 +9,7 @@ using ChuPiao.AutoPrint.Services.AutoEncash;
using
ChuPiao.Common.Enums
;
using
ChuPiao.Common.Models
;
using
ChuPiao.AutoPrint.Desktop.Properties
;
using
System.IO
;
namespace
ChuPiao.AutoPrint.Desktop.AutoEncash
{
...
...
@@ -355,5 +356,46 @@ namespace ChuPiao.AutoPrint.Desktop.AutoEncash
}
}
private
void
linkLabel2_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
if
(
this
.
lvwTicket
.
CheckedItems
.
Count
==
0
)
{
MessageBox
.
Show
(
"请选择要导出的记录!"
);
return
;
}
FolderBrowserDialog
dialog
=
new
FolderBrowserDialog
();
dialog
.
Description
=
"请选择导出文件到哪个目录"
;
//dialog.RootFolder = Environment.SpecialFolder.Programs;
if
(
dialog
.
ShowDialog
()
==
DialogResult
.
OK
)
{
string
prnPath
=
Path
.
Combine
(
dialog
.
SelectedPath
,
_service
.
LotMachine
.
MachineInfo
.
M_Number
+
"_"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
));
if
(!
Directory
.
Exists
(
prnPath
))
{
Directory
.
CreateDirectory
(
prnPath
);
}
string
ticketFilePath
;
foreach
(
ListViewItem
item
in
this
.
lvwTicket
.
CheckedItems
)
{
L_LotTicketEntity
entity
=
item
.
Tag
as
L_LotTicketEntity
;
ticketFilePath
=
Path
.
Combine
(
prnPath
,
entity
.
L_TicketCode
+
".prn"
);
try
{
File
.
WriteAllText
(
ticketFilePath
,
entity
.
L_PrnText
);
LoggingService
.
Info
(
string
.
Concat
(
"导出电子票文件:"
,
ticketFilePath
));
}
catch
(
Exception
exception
)
{
LoggingService
.
Warn
(
string
.
Concat
(
ticketFilePath
,
"导出电子票文件异常。错误信息:"
,
exception
.
ToString
()));
}
}
}
}
}
}
ChuPiao_Linux.suo
View file @
4162a502
No preview for this file type
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