Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Client.SampleInbounds.V4.0
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
陶然
Kivii.Client.SampleInbounds.V4.0
Commits
3d77630c
Commit
3d77630c
authored
Jul 19, 2023
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化交接人信息记录到本地方便下次直接选择
parent
8f6ab6a0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
19 deletions
+71
-19
Configs.cs
Src/Configs.cs
+1
-0
UiSetting.cs
Src/Entities/UiSetting.cs
+9
-0
FrmMain.Designer.cs
Src/FrmMain.Designer.cs
+9
-9
FrmMain.cs
Src/FrmMain.cs
+50
-8
AssemblyInfo.cs
Src/Properties/AssemblyInfo.cs
+2
-2
No files found.
Src/Configs.cs
View file @
3d77630c
...
...
@@ -10,6 +10,7 @@ namespace Kivii.Client
public
const
string
DefaultBaseUrl
=
"http://k5.jst-gov.com"
;
public
const
string
TableUiSetting
=
"ui_settings"
;
public
const
string
TableUiHandover
=
"ui_Handovers"
;
public
const
string
RouteLocationQuery
=
"/Restful/Kivii.Samples.Entities.Location/Query"
;
public
const
string
RouteSampleQuery
=
"/Restful/Kivii.Samples.Entities.Sample/Query"
;
...
...
Src/Entities/UiSetting.cs
View file @
3d77630c
...
...
@@ -19,4 +19,13 @@ namespace Kivii.Client.SampleInbounds.Entities
[
Default
(
""
)]
public
string
ControlValue
{
get
;
set
;
}
}
[
Api
(
Description
=
"移交人"
)]
[
Alias
(
Configs
.
TableUiHandover
)]
public
class
Handover
:
Entity
{
[
Unique
]
[
StringLength
(
200
)]
public
string
Name
{
get
;
set
;
}
}
}
Src/FrmMain.Designer.cs
View file @
3d77630c
...
...
@@ -174,7 +174,7 @@
this
.
cbAssignOperatorName
.
Name
=
"cbAssignOperatorName"
;
this
.
cbAssignOperatorName
.
Size
=
new
System
.
Drawing
.
Size
(
187
,
35
);
this
.
cbAssignOperatorName
.
TabIndex
=
33
;
this
.
cbAssignOperatorName
.
KeyDown
+=
new
System
.
Windows
.
Forms
.
KeyEventHandler
(
this
.
cbAssignOperatorName_KeyDown
);
this
.
cbAssignOperatorName
.
MouseLeave
+=
new
System
.
EventHandler
(
this
.
cbAssignOperatorName_MouseLeave
);
//
// lbAssignOperatorName
//
...
...
@@ -182,7 +182,7 @@
this
.
lbAssignOperatorName
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
);
this
.
lbAssignOperatorName
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
402
);
this
.
lbAssignOperatorName
.
Name
=
"lbAssignOperatorName"
;
this
.
lbAssignOperatorName
.
Size
=
new
System
.
Drawing
.
Size
(
7
2
,
16
);
this
.
lbAssignOperatorName
.
Size
=
new
System
.
Drawing
.
Size
(
7
1
,
16
);
this
.
lbAssignOperatorName
.
TabIndex
=
32
;
this
.
lbAssignOperatorName
.
Text
=
"交接人:"
;
//
...
...
@@ -213,7 +213,7 @@
this
.
lbCurrentPackage
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
);
this
.
lbCurrentPackage
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
288
);
this
.
lbCurrentPackage
.
Name
=
"lbCurrentPackage"
;
this
.
lbCurrentPackage
.
Size
=
new
System
.
Drawing
.
Size
(
80
,
16
);
this
.
lbCurrentPackage
.
Size
=
new
System
.
Drawing
.
Size
(
79
,
16
);
this
.
lbCurrentPackage
.
TabIndex
=
6
;
this
.
lbCurrentPackage
.
Text
=
"当前箱号:"
;
//
...
...
@@ -236,7 +236,7 @@
this
.
lbCurrentLocation
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
);
this
.
lbCurrentLocation
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
231
);
this
.
lbCurrentLocation
.
Name
=
"lbCurrentLocation"
;
this
.
lbCurrentLocation
.
Size
=
new
System
.
Drawing
.
Size
(
80
,
16
);
this
.
lbCurrentLocation
.
Size
=
new
System
.
Drawing
.
Size
(
79
,
16
);
this
.
lbCurrentLocation
.
TabIndex
=
5
;
this
.
lbCurrentLocation
.
Text
=
"当前位置:"
;
//
...
...
@@ -259,7 +259,7 @@
this
.
lbPackageDepartment
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
);
this
.
lbPackageDepartment
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
345
);
this
.
lbPackageDepartment
.
Name
=
"lbPackageDepartment"
;
this
.
lbPackageDepartment
.
Size
=
new
System
.
Drawing
.
Size
(
11
2
,
16
);
this
.
lbPackageDepartment
.
Size
=
new
System
.
Drawing
.
Size
(
11
1
,
16
);
this
.
lbPackageDepartment
.
TabIndex
=
4
;
this
.
lbPackageDepartment
.
Text
=
"样品所属部门:"
;
//
...
...
@@ -279,7 +279,7 @@
this
.
lblUrl
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
);
this
.
lblUrl
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
15
);
this
.
lblUrl
.
Name
=
"lblUrl"
;
this
.
lblUrl
.
Size
=
new
System
.
Drawing
.
Size
(
6
4
,
16
);
this
.
lblUrl
.
Size
=
new
System
.
Drawing
.
Size
(
6
3
,
16
);
this
.
lblUrl
.
TabIndex
=
21
;
this
.
lblUrl
.
Text
=
"地 址:"
;
//
...
...
@@ -289,7 +289,7 @@
this
.
lblUser
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
);
this
.
lblUser
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
72
);
this
.
lblUser
.
Name
=
"lblUser"
;
this
.
lblUser
.
Size
=
new
System
.
Drawing
.
Size
(
6
4
,
16
);
this
.
lblUser
.
Size
=
new
System
.
Drawing
.
Size
(
6
3
,
16
);
this
.
lblUser
.
TabIndex
=
22
;
this
.
lblUser
.
Text
=
"用户名:"
;
//
...
...
@@ -299,7 +299,7 @@
this
.
lblPassword
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
);
this
.
lblPassword
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
128
);
this
.
lblPassword
.
Name
=
"lblPassword"
;
this
.
lblPassword
.
Size
=
new
System
.
Drawing
.
Size
(
6
4
,
16
);
this
.
lblPassword
.
Size
=
new
System
.
Drawing
.
Size
(
6
3
,
16
);
this
.
lblPassword
.
TabIndex
=
23
;
this
.
lblPassword
.
Text
=
"密 码:"
;
//
...
...
@@ -838,7 +838,7 @@
this
.
Controls
.
Add
(
this
.
plLeft
);
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"FrmMain"
;
this
.
Text
=
"样品入库交接客户端 1.
3(23.7.18
)"
;
this
.
Text
=
"样品入库交接客户端 1.
4(23.7.19
)"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmMain_Load
);
this
.
plLeft
.
ResumeLayout
(
false
);
this
.
gbInfo
.
ResumeLayout
(
false
);
...
...
Src/FrmMain.cs
View file @
3d77630c
...
...
@@ -93,6 +93,49 @@ namespace Kivii.Client.SampleInbounds
dgvRfidSamples
.
DataSource
=
null
;
}
private
void
saveHandover
()
{
if
(
cbAssignOperatorName
.
Text
.
IsNullOrEmpty
())
return
;
var
existd
=
true
;
try
{
using
(
var
conn
=
KiviiContext
.
GetOpenedDbConnection
<
Handover
>())
{
if
(!
conn
.
Exists
<
Handover
>(
o
=>
o
.
Name
.
ToLower
()
==
cbAssignOperatorName
.
Text
.
ToLower
()))
{
existd
=
false
;
var
handover
=
new
Handover
();
handover
.
Name
=
cbAssignOperatorName
.
Text
;
conn
.
Insert
(
handover
);
}
}
if
(!
existd
)
loadHandover
();
}
catch
{
}
}
private
void
loadHandover
()
{
var
textd
=
cbAssignOperatorName
.
Text
;
try
{
using
(
var
conn
=
KiviiContext
.
GetOpenedDbConnection
<
Handover
>())
{
var
query
=
conn
.
From
<
Handover
>();
query
.
Select
(
o
=>
o
.
Name
);
var
handovers
=
conn
.
Select
<
string
>(
query
);
if
(!
handovers
.
IsNullOrEmpty
())
cbAssignOperatorName
.
DataSource
=
handovers
;
if
(!
textd
.
IsNullOrEmpty
())
cbAssignOperatorName
.
Text
=
textd
;
else
cbAssignOperatorName
.
Text
=
string
.
Empty
;
}
}
catch
{
}
}
private
void
loadDefault
(
params
Control
[]
ctls
)
{
try
...
...
@@ -1068,6 +1111,7 @@ namespace Kivii.Client.SampleInbounds
tbxPassword
.
Enabled
=
btnLogin
.
Enabled
;
//tbSetCurrentPackage.Enabled = !btnLogin.Enabled;
setDefault
(
tbxServiceUrl
,
tbxUserName
,
tbxPassword
);
loadHandover
();
outputMessage
(
$"登录成功,登录人:
{
resp
.
DisplayName
}
"
,
true
);
if
(!
isConnected
||
reader
==
null
)
{
...
...
@@ -1283,6 +1327,7 @@ namespace Kivii.Client.SampleInbounds
MessageBox
.
Show
(
"请先设置好交接人信息"
,
"设置"
);
return
;
}
saveHandover
();
if
(
_currentScanSamples
.
IsNullOrEmpty
())
return
;
var
assignSamples
=
_currentScanSamples
.
ToList
();
//new一个list不影响原来的数组
preSampleAssigning
(
assignSamples
);
...
...
@@ -1339,14 +1384,6 @@ namespace Kivii.Client.SampleInbounds
}));
}
private
void
cbAssignOperatorName_KeyDown
(
object
sender
,
KeyEventArgs
e
)
{
if
(
e
.
KeyCode
==
Keys
.
Enter
)
{
}
}
private
void
btnSetCurrentPackage_Click
(
object
sender
,
EventArgs
e
)
{
if
(
tbSetCurrentPackage
.
Text
.
IsNullOrEmpty
())
...
...
@@ -1392,5 +1429,10 @@ namespace Kivii.Client.SampleInbounds
preSampleAssigning
(
new
List
<
Sample
>
{
currentRowSample
});
//sampleAssigning(new List<Guid> { currentRowSample.Kvid });
}
private
void
cbAssignOperatorName_MouseLeave
(
object
sender
,
EventArgs
e
)
{
saveHandover
();
}
}
}
Src/Properties/AssemblyInfo.cs
View file @
3d77630c
...
...
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2023.71
8
0")]
[assembly: AssemblyFileVersion("5.4.2023.71
8
0")]
[assembly: AssemblyVersion("5.4.2023.71
9
0")]
[assembly: AssemblyFileVersion("5.4.2023.71
9
0")]
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