Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Joona Romppanen
/
Moya Info Tools
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 19a24f7e
authored
Jun 01, 2014
by
Liv Haapala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
1 parent
e8fe2cb7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
218 additions
and
81 deletions
Cloakroom/Cloakroom/Form1.Designer.cs
Cloakroom/Cloakroom/Form1.cs
Cloakroom/Cloakroom/Form1.resx
MoyaAdmin/MoyaAdminUI/MoyaAdminUI/MainForm.Designer.cs
MoyaAdmin/MoyaAdminUI/MoyaAdminUI/MainForm.cs
MoyaAdmin/MoyaAdminUI/MoyaAdminUI/MainForm.resx
MoyaAdmin/MoyaAdminUI/MoyaAdminUI/OrgMealCounter.Designer.cs
MoyaAdmin/MoyaAdminUI/MoyaAdminUI/OrgMealCounter.cs
Cloakroom/Cloakroom/Form1.Designer.cs
View file @
19a24f7
...
...
@@ -44,13 +44,14 @@
this
.
luggagesListView
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
columnHeader3
=
((
System
.
Windows
.
Forms
.
ColumnHeader
)(
new
System
.
Windows
.
Forms
.
ColumnHeader
()));
this
.
columnHeader4
=
((
System
.
Windows
.
Forms
.
ColumnHeader
)(
new
System
.
Windows
.
Forms
.
ColumnHeader
()));
this
.
columnHeader5
=
((
System
.
Windows
.
Forms
.
ColumnHeader
)(
new
System
.
Windows
.
Forms
.
ColumnHeader
()));
this
.
luggagesListContextMenuStrip
=
new
System
.
Windows
.
Forms
.
ContextMenuStrip
(
this
.
components
);
this
.
releaseToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
luggaageDescriptionTextBox
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
columnHeader5
=
((
System
.
Windows
.
Forms
.
ColumnHeader
)(
new
System
.
Windows
.
Forms
.
ColumnHeader
()));
this
.
eventUserEditor
=
new
MoyaAdminLib
.
Controls
.
EventUserEditor
();
this
.
barcodeFocusTimer
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
toolStrip1
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
cardsPictureBox
)).
BeginInit
();
this
.
luggagesListContextMenuStrip
.
SuspendLayout
();
...
...
@@ -111,6 +112,7 @@
this
.
barcodeTextBox
.
Size
=
new
System
.
Drawing
.
Size
(
740
,
20
);
this
.
barcodeTextBox
.
TabIndex
=
1
;
this
.
barcodeTextBox
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
barcodeTextBox_TextChanged
);
this
.
barcodeTextBox
.
Leave
+=
new
System
.
EventHandler
(
this
.
barcodeTextBox_Leave
);
//
// label1
//
...
...
@@ -167,16 +169,22 @@
this
.
luggagesListView
.
TabIndex
=
4
;
this
.
luggagesListView
.
UseCompatibleStateImageBehavior
=
false
;
this
.
luggagesListView
.
View
=
System
.
Windows
.
Forms
.
View
.
Details
;
this
.
luggagesListView
.
Enter
+=
new
System
.
EventHandler
(
this
.
luggagesListView_Enter
);
//
// columnHeader3
//
this
.
columnHeader3
.
Text
=
"Date"
;
this
.
columnHeader3
.
Width
=
73
;
this
.
columnHeader3
.
Width
=
85
;
//
// columnHeader4
//
this
.
columnHeader4
.
Text
=
"Description"
;
this
.
columnHeader4
.
Width
=
96
;
this
.
columnHeader4
.
Width
=
102
;
//
// columnHeader5
//
this
.
columnHeader5
.
Text
=
"Code"
;
this
.
columnHeader5
.
Width
=
108
;
//
// luggagesListContextMenuStrip
//
...
...
@@ -210,6 +218,7 @@
this
.
luggaageDescriptionTextBox
.
Name
=
"luggaageDescriptionTextBox"
;
this
.
luggaageDescriptionTextBox
.
Size
=
new
System
.
Drawing
.
Size
(
165
,
20
);
this
.
luggaageDescriptionTextBox
.
TabIndex
=
9
;
this
.
luggaageDescriptionTextBox
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
luggaageDescriptionTextBox_TextChanged
);
//
// groupBox1
//
...
...
@@ -225,11 +234,6 @@
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"Selected user"
;
//
// columnHeader5
//
this
.
columnHeader5
.
Text
=
"Code"
;
this
.
columnHeader5
.
Width
=
108
;
//
// eventUserEditor
//
this
.
eventUserEditor
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
...
...
@@ -238,6 +242,12 @@
this
.
eventUserEditor
.
Name
=
"eventUserEditor"
;
this
.
eventUserEditor
.
Size
=
new
System
.
Drawing
.
Size
(
297
,
133
);
this
.
eventUserEditor
.
TabIndex
=
2
;
this
.
eventUserEditor
.
Enter
+=
new
System
.
EventHandler
(
this
.
eventUserEditor_Enter
);
//
// barcodeFocusTimer
//
this
.
barcodeFocusTimer
.
Interval
=
6000
;
this
.
barcodeFocusTimer
.
Tick
+=
new
System
.
EventHandler
(
this
.
barcodeFocusTimer_Tick
);
//
// Form1
//
...
...
@@ -288,6 +298,7 @@
private
System
.
Windows
.
Forms
.
TextBox
luggaageDescriptionTextBox
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
ColumnHeader
columnHeader5
;
private
System
.
Windows
.
Forms
.
Timer
barcodeFocusTimer
;
}
}
Cloakroom/Cloakroom/Form1.cs
View file @
19a24f7
...
...
@@ -85,6 +85,7 @@ namespace Cloakroom
private
void
submitButton_Click
(
object
sender
,
EventArgs
e
)
{
barcodeFocusTimer
.
Start
();
string
ret
=
""
;
string
code
=
getUniqueCode
();
...
...
@@ -266,13 +267,25 @@ namespace Cloakroom
break
;
}
}
if
(
remove
!=
null
)
if
(
remove
!=
null
)
luggagesListView
.
Items
.
Remove
(
remove
);
addMessageToListView
(
"Luggage released for person "
+
eventUserEditor
.
GetName
());
}
else
{
MessageBox
.
Show
(
"No luggage found for code "
+
barcodeTextBox
.
Text
+
" for person "
+
selectedCard
.
wholeName
+
". Do not release luggage!"
);
}
}
else
{
MessageBox
.
Show
(
"No luggage found for code "
+
barcodeTextBox
.
Text
+
" for person "
+
selectedCard
.
wholeName
+
". Do not release luggage!"
);
}
}
else
if
(
barcodeTextBox
.
Text
.
Length
==
8
&&
selectedCard
==
null
)
addMessageToListView
(
"Enter barcode from card first!"
);
else
addMessageToListView
(
"Barcode not regognized."
);
barcodeTextBox
.
Text
=
""
;
}
...
...
@@ -324,6 +337,32 @@ namespace Cloakroom
}
}
private
void
barcodeFocusTimer_Tick
(
object
sender
,
EventArgs
e
)
{
barcodeFocusTimer
.
Stop
();
barcodeTextBox
.
Focus
();
}
private
void
barcodeTextBox_Leave
(
object
sender
,
EventArgs
e
)
{
barcodeFocusTimer
.
Start
();
}
private
void
eventUserEditor_Enter
(
object
sender
,
EventArgs
e
)
{
barcodeFocusTimer
.
Start
();
}
private
void
luggagesListView_Enter
(
object
sender
,
EventArgs
e
)
{
barcodeFocusTimer
.
Start
();
}
private
void
luggaageDescriptionTextBox_TextChanged
(
object
sender
,
EventArgs
e
)
{
barcodeFocusTimer
.
Start
();
}
}
...
...
Cloakroom/Cloakroom/Form1.resx
View file @
19a24f7
...
...
@@ -139,4 +139,7 @@
<metadata name="luggagesListContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>366, 17</value>
</metadata>
<metadata name="barcodeFocusTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>585, 17</value>
</metadata>
</root>
\ No newline at end of file
MoyaAdmin/MoyaAdminUI/MoyaAdminUI/MainForm.Designer.cs
View file @
19a24f7
...
...
@@ -48,12 +48,12 @@
this
.
cardLocationInputToolStripButton
=
new
System
.
Windows
.
Forms
.
ToolStripButton
();
this
.
incomingFormToolStripButton
=
new
System
.
Windows
.
Forms
.
ToolStripButton
();
this
.
cardInfoToolStripButton
=
new
System
.
Windows
.
Forms
.
ToolStripButton
();
this
.
toolStripButton2
=
new
System
.
Windows
.
Forms
.
ToolStripButton
();
this
.
orgMealToolStripButton
=
new
System
.
Windows
.
Forms
.
ToolStripButton
();
this
.
toolStripButton3
=
new
System
.
Windows
.
Forms
.
ToolStripButton
();
this
.
TopPanel
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
searchTextBox
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
MapsComboBox
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
searchTextBox
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
searchTimer
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
ImageRefreshTimer
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
...
...
@@ -146,7 +146,7 @@
this
.
cardLocationInputToolStripButton
,
this
.
incomingFormToolStripButton
,
this
.
cardInfoToolStripButton
,
this
.
toolStripButton2
,
this
.
orgMealToolStripButton
,
this
.
toolStripButton3
});
this
.
toolStrip1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
toolStrip1
.
Name
=
"toolStrip1"
;
...
...
@@ -241,14 +241,15 @@
this
.
cardInfoToolStripButton
.
Text
=
"Kortin tiedot"
;
this
.
cardInfoToolStripButton
.
Click
+=
new
System
.
EventHandler
(
this
.
cardInfoToolStripButton_Click
);
//
//
toolStripButton2
//
orgMealToolStripButton
//
this
.
toolStripButton2
.
DisplayStyle
=
System
.
Windows
.
Forms
.
ToolStripItemDisplayStyle
.
Image
;
this
.
toolStripButton2
.
Image
=
((
System
.
Drawing
.
Image
)(
resources
.
GetObject
(
"toolStripButton2.Image"
)));
this
.
toolStripButton2
.
ImageTransparentColor
=
System
.
Drawing
.
Color
.
Magenta
;
this
.
toolStripButton2
.
Name
=
"toolStripButton2"
;
this
.
toolStripButton2
.
Size
=
new
System
.
Drawing
.
Size
(
23
,
22
);
this
.
toolStripButton2
.
Text
=
"Ruokailutilasto"
;
this
.
orgMealToolStripButton
.
DisplayStyle
=
System
.
Windows
.
Forms
.
ToolStripItemDisplayStyle
.
Image
;
this
.
orgMealToolStripButton
.
Image
=
((
System
.
Drawing
.
Image
)(
resources
.
GetObject
(
"orgMealToolStripButton.Image"
)));
this
.
orgMealToolStripButton
.
ImageTransparentColor
=
System
.
Drawing
.
Color
.
Magenta
;
this
.
orgMealToolStripButton
.
Name
=
"orgMealToolStripButton"
;
this
.
orgMealToolStripButton
.
Size
=
new
System
.
Drawing
.
Size
(
23
,
22
);
this
.
orgMealToolStripButton
.
Text
=
"Ruokailutilasto"
;
this
.
orgMealToolStripButton
.
Click
+=
new
System
.
EventHandler
(
this
.
orgMealToolStripButton_Click
);
//
// toolStripButton3
//
...
...
@@ -269,16 +270,6 @@
this
.
TopPanel
.
Size
=
new
System
.
Drawing
.
Size
(
752
,
45
);
this
.
TopPanel
.
TabIndex
=
15
;
//
// searchTextBox
//
this
.
searchTextBox
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
searchTextBox
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
21
);
this
.
searchTextBox
.
Name
=
"searchTextBox"
;
this
.
searchTextBox
.
Size
=
new
System
.
Drawing
.
Size
(
314
,
20
);
this
.
searchTextBox
.
TabIndex
=
7
;
this
.
searchTextBox
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
searchTextBox_TextChanged
);
//
// label3
//
this
.
label3
.
AutoSize
=
true
;
...
...
@@ -298,6 +289,16 @@
this
.
MapsComboBox
.
TabIndex
=
5
;
this
.
MapsComboBox
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
MapsComboBox_SelectedIndexChanged
);
//
// searchTextBox
//
this
.
searchTextBox
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
searchTextBox
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
21
);
this
.
searchTextBox
.
Name
=
"searchTextBox"
;
this
.
searchTextBox
.
Size
=
new
System
.
Drawing
.
Size
(
314
,
20
);
this
.
searchTextBox
.
TabIndex
=
7
;
this
.
searchTextBox
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
searchTextBox_TextChanged
);
//
// panel1
//
this
.
panel1
.
Controls
.
Add
(
this
.
searchTextBox
);
...
...
@@ -378,7 +379,7 @@
private
System
.
Windows
.
Forms
.
ToolStripButton
cardLocationInputToolStripButton
;
private
System
.
Windows
.
Forms
.
ToolStripButton
incomingFormToolStripButton
;
private
System
.
Windows
.
Forms
.
ToolStripButton
cardInfoToolStripButton
;
private
System
.
Windows
.
Forms
.
ToolStripButton
toolStripButton2
;
private
System
.
Windows
.
Forms
.
ToolStripButton
orgMealToolStripButton
;
private
System
.
Windows
.
Forms
.
ToolStripButton
toolStripButton3
;
private
System
.
Windows
.
Forms
.
ToolStripButton
UnlockToolStripButton
;
private
System
.
Windows
.
Forms
.
TextBox
searchTextBox
;
...
...
MoyaAdmin/MoyaAdminUI/MoyaAdminUI/MainForm.cs
View file @
19a24f7
...
...
@@ -1168,8 +1168,14 @@ namespace MoyaAdminUI
private
void
MainForm_SizeChanged
(
object
sender
,
EventArgs
e
)
{
}
private
void
orgMealToolStripButton_Click
(
object
sender
,
EventArgs
e
)
{
OrgMealCounter
frm
=
new
OrgMealCounter
();
frm
.
Show
();
}
...
...
MoyaAdmin/MoyaAdminUI/MoyaAdminUI/MainForm.resx
View file @
19a24f7
...
...
@@ -171,39 +171,39 @@
<data name="usersToolStripPrintButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAL
sSURBVDhPjZJ7SBNQGMWnRNkilMIiakiUVEvyUajpjJQm
ma5yj8w2o0a+NqeZolM3H/lKnTnnUqdu0+mcD8xXvjWdKJVBYlQUPUAqKhIxSrOsnebcPwaCP/jg3nu+
c+B+9xLWws7O7pCnp6fa9airnkQiZRqPNq0o64R9msLMi7uGkDNeIFptMhZRZJbWR1NGOO/vuAp/+vLB
83fH5o1WVWZpfShjmVeXOjKw1JKI1vhzP4lEootZWs1+J4ot/Yb4hj2F6mbcWnrzkkKdGWxuRjgz8HdT
HBbrotAooKr2kMnbVhz/4Xs51Htk1oDez79QOvpyRlDdaeBUtqC8NulPf5rfwnByACpEhw0ijcZAl+qe
nhQk5+718PEyWjeYAvZTKLYNb2YNze/nUT/9AzVvvyFPW4J+tT2m5LvQkm6NBT0B34ZtkVwjA1PVg2DN
AOgS3Ywt2dHJFCKb+vBB8eIr5M++oGjqE/KffETOxDTErV0oV/MxqtiHOa0FxtXO8C+sBU2qw1lZI3Y6
uPibAsS9k105D98hfew1UvSvkDD0AonGShh8jri+p4jtmURUtQ6pOWHwERXhVFoJ3OKyvxs/i5UpgFN
c
lx3bPQl+x2Pw2icQdvcBQhpGcVE7jKC6IQRpBnGhph8cTT/cI4SgxN7EQVpws8m8jE9UCiukfhiXjA1M
VTcYVff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atVoQp74GhbLGs2aoOHBKIcZAvxgaSN8dmN79E+Dk3zp3ehb8DYla3W42V9ywDY2u6cLK8
CaFljZZ7B/DT4cmMW3R2dnax2QkENpvtcK1CnZSoNDyOkOnn6TI9aEU60EvqwGscRHzDADiqNhy7rgIl
XoQdR8P6bNZl2CclJbkUFyt8c8o1EoFcNUwrqJ6jZipAld4E64YW1KxS+MemYvN+8kWb57/YRUVFrS
0q
KvHJVlSl8gsrHoRkymcCL+XiUOIVUxCdudvWtyLsuFzumsJCuVdeWVWiRF6ZIxKJ1lslAuEP85t+R/qb
CD8AAAAASUVORK5CYII=
</value>
</data>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAM
KSURBVDhPdVJdTJJhGPW+bqp1U8uLmv1QtlWmYf9qaQ
lq
llpmQ7BQDIOZ5QSV1NSYfhB8gkqD/ETTnDgkg+oipqP1M502jdVUXOHUqa017cdZnvwQ58o823vx7jzP
ec9zntdnERrDk00kZRWrKautzGAel1e2jBeoG20SwijOLDJs8pb9HyRlY6prrebyNhPIrodQO3VQDRTg
mj0GXCUBYb7GzMtSMr3lf4N+mW6WPlag9EMOrJN2dH53Ie1hLuTvb4BrCkVYkQoXhcXmaIF0uRPadk6t
HryX+6EdyoZt0oE3U71492MCD4bNSK4oxLGKdzhYfAuRnJtib9sS6JmTFPXgP4lFgTMR9z4SMLgLQfYY
wDc24rLmM+LlQ9ihi8KJeJHN27YEOrA00oXYqhRwXhxD+uswZOivQ3DfihTNWySXDyOQNGJLzUkciUo
d
97YtgU5bpJ9FYr4Mx6lghDyKxXkVgfSKYfAUI0go7oefgQPfymAEsv8jQK9KWPUZgsoxxIuTEKZNwoHm
RDBrSFwodiEmrxehAhZ2Z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/xGgVyWomga/chJscTxCNPE48iQO
jBoSl4tsiM7tRzA/Ar63TuBQGHf1CBKCEouIdlzTzINLjCD8RgoOUNHwNpzDblUOQrO6EMhPwzHWJfiF
cVeHSH8Ses9Xy6xIJ14iW1OHmwo9EiRybLsbgIBUPpg8AkJZ9ScZ2TwuIertmcUUxZOomW6JJRflddJq
Q9uP3iEHZud+YfLLPJpf90Eg0yEiRYbKujb8y4kKtRNhCXksl0CBprnFanMiXaoa3XIwfMY7LHGhuLp1
UW/sgrz2zc/GV/3QGCwzW/0uWH1DeAOS8kcduicWMM5ntLgEZJqm2UUA6/acHfMJ4vpoGzu7fy3dv3wD
bJPz6B7+ivbez9i4l0lcFJb5SMnmsfaeCew4ljzrEsi519hi6bEtzVnVwRKUDuQqnw5s2BGxsH5XKJbP
vqDE8WXuXs3rjjtVrfDyj/3jILOkliVRPJx42PIOHT12PLeMIlfZhMAo0UR4kky+Frd5X+SfDGiwhSXM
UE4uxWCK7XuCOXavgFhq0/4IV9Jrcx4evwFU//SROPZWZgAAAABJRU5ErkJggg==
</value>
</data>
<data name="cardLocationInputToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
...
...
@@ -237,23 +237,23 @@
<data name="cardInfoToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAL
1SURBVDhPdVNbSJNhGP7FRt2YiEVelNPp5pxOxVqm5iH
U
1
H/ng4d5SlNJ00wrQwg0wrb9cydXzmxqVjdJV0EEXZQdSEhIjDIKA9HKS2EEuxn49r6/B5LohQd+eJ/n
+d7v+d6f2VUFA3tiWVtOHGvxxStti3Es91uI2Py2+KhHnC327krScBFxrLVXrLGvZFQ5NrIbbkP2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KIId7JbpLOuq8iF/Wt0opJ0fg5Qa
J6jKHRBjNPulWn5dghzi7si2S5zdd0iiHuyP1XHerAsTUNQ2AwWXXKC+PAuFbS5IR6OTVSMQX2oDOTvg
JS5pduQMI9GaK2ONnCevZQr0nXOCAds+A4+ef4Rnrz9BVr0DkipHQGkaxkmsEK3nPKQRxGGFA0dlBt6
d
2TABhq77oOm4J5xe0OqCsfkFmHn8ClIrBiGxbBgnsEO0YQjkegvItLybtIxEbWZVxfYtLQrJgG2fhZym
ScioHxc+wdg5CwoDD1KdBTADiNJwAmRG65ZEzbMMNnqS60Z9NHp+67QwqlTHQ33vPCx/24Sn7mVQaG+D
uGgQMOQ9yIqtPjlqMX0LR6dReDQeNcVFZjiF6b9bXoM3i18gRtP3j0FciQ35Fo5RGCw98eUOXxSOt9sk
MoX14v33/xpEl9p8cgNOINPzrBIzkOB3/U2gE14ubhvE6m4BLhNiu0cZkIa0wi2oTDZ3bLEVIrFJQcn1
Q5BS7YS3S2uwsPQVUsrMgiFNhYsm3EYCaoRboFIYrJVKk9WTYKKGXQiyg38Cn1c3YWX1B1zl5iG12gHJ
VU7BOLX2joc0gpiKtkpZYu8/0zDuzcQwKVC6lYobiO45MF6ZhtzmCchrmYacxrte4u7bRKpQ3O/E0uFu
3IENTceUn3ai+NoDKLn+EEoRhi6X/2zz5EYCcoi7I9urAISICZEEn8i4mB+n651Mr7V+yG10/sxusv/K
qOaX4rU3p8NONxYyweEhyKXTA0m4W/SLkusxhJgRiRICD0ecEx1RVIpC5TWBQeFq9E/CnhRxHEEmBxmG
CfgDMl6p29Sh7gQAAAAASUVORK5CYII=
</value>
</data>
<data name="
toolStripButton2
.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="
orgMealToolStripButton
.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
...
...
MoyaAdmin/MoyaAdminUI/MoyaAdminUI/OrgMealCounter.Designer.cs
View file @
19a24f7
...
...
@@ -59,6 +59,7 @@
this
.
amountsPerDayListView
.
Size
=
new
System
.
Drawing
.
Size
(
580
,
97
);
this
.
amountsPerDayListView
.
TabIndex
=
2
;
this
.
amountsPerDayListView
.
UseCompatibleStateImageBehavior
=
false
;
this
.
amountsPerDayListView
.
View
=
System
.
Windows
.
Forms
.
View
.
Details
;
//
// amountsPerPersonListView
//
...
...
@@ -67,6 +68,7 @@
this
.
amountsPerPersonListView
.
Size
=
new
System
.
Drawing
.
Size
(
580
,
248
);
this
.
amountsPerPersonListView
.
TabIndex
=
3
;
this
.
amountsPerPersonListView
.
UseCompatibleStateImageBehavior
=
false
;
this
.
amountsPerPersonListView
.
View
=
System
.
Windows
.
Forms
.
View
.
Details
;
//
// OrgMealCounter
//
...
...
MoyaAdmin/MoyaAdminUI/MoyaAdminUI/OrgMealCounter.cs
View file @
19a24f7
...
...
@@ -53,15 +53,18 @@ namespace MoyaAdminUI
RestClient
client
=
new
RestClient
(
Properties
.
Settings
.
Default
.
ApiURL
);
Dictionary
<
DateTime
,
int
>
amountsPerDay
=
new
Dictionary
<
DateTime
,
int
>();
Dictionary
<
Eventuser
,
Dictionary
<
DateTime
,
int
>>
amountsPerPersonPerDay
=
new
Dictionary
<
Eventuser
,
Dictionary
<
DateTime
,
int
>>();
Dictionary
<
Eventuser
,
int
>
amountsPerPerson
=
new
Dictionary
<
Eventuser
,
int
>();
int
totalAmount
=
0
;
try
{
ret
=
client
.
MakeRequest
(
"reader/readerevents/"
+
reader
.
readerId
+
"/
0
"
);
ret
=
client
.
MakeRequest
(
"reader/readerevents/"
+
reader
.
readerId
+
"/
-1
"
);
var
ser
=
new
JavaScriptSerializer
();
ReaderEventList
events
=
ser
.
Deserialize
<
ReaderEventList
>(
ret
);
if
(
events
!=
null
&&
events
.
readerEvents
!=
null
)
{
events
.
readerEvents
=
events
.
readerEvents
.
OrderBy
(
r
=>
r
.
readerEventTime
).
ToList
();
foreach
(
ReaderEvent
re
in
events
.
readerEvents
)
{
DateTime
date
=
re
.
readerEventTime
.
Date
;
...
...
@@ -70,19 +73,90 @@ namespace MoyaAdminUI
else
amountsPerDay
.
Add
(
date
,
1
);
totalAmount
++;
if
(
re
.
eventuser
!=
null
)
{
if
(
amountsPerPersonPerDay
.
Keys
.
Contains
(
re
.
eventuser
))
{
if
(
amountsPerPersonPerDay
[
re
.
eventuser
].
Keys
.
Contains
(
date
))
amountsPerPersonPerDay
[
re
.
eventuser
][
date
]
+=
1
;
else
amountsPerPersonPerDay
[
re
.
eventuser
].
Add
(
date
,
1
);
}
else
{
amountsPerPersonPerDay
.
Add
(
re
.
eventuser
,
new
Dictionary
<
DateTime
,
int
>());
amountsPerPersonPerDay
[
re
.
eventuser
].
Add
(
date
,
1
);
}
if
(
amountsPerPerson
.
Keys
.
Contains
(
re
.
eventuser
))
amountsPerPerson
[
re
.
eventuser
]
+=
1
;
else
amountsPerPerson
.
Add
(
re
.
eventuser
,
1
);
}
}
amountsPerDayListView
.
BeginUpdate
();
amountsPerDayListView
.
Columns
.
Clear
();
amountsPerDayListView
.
Items
.
Clear
();
ColumnHeader
header
;
foreach
(
DateTime
date
in
amountsPerDay
.
Keys
)
{
amountsPerDayListView
.
Columns
.
Add
(
new
ColumnHeader
(
date
.
ToShortDateString
()));
header
=
new
ColumnHeader
();
header
.
Text
=
date
.
ToShortDateString
();
amountsPerDayListView
.
Columns
.
Add
(
header
);
}
amountsPerDayListView
.
Columns
.
Add
(
new
ColumnHeader
(
"Yhteensä"
));
ListViewItem
lvi
=
new
ListViewItem
();
ColumnHeader
headerSum
=
new
ColumnHeader
();
headerSum
.
Text
=
"Total amount"
;
amountsPerDayListView
.
Columns
.
Add
(
headerSum
);
ListViewItem
lvi
=
null
;
foreach
(
DateTime
date
in
amountsPerDay
.
Keys
)
{
if
(
lvi
==
null
)
lvi
=
new
ListViewItem
(
amountsPerDay
[
date
].
ToString
());
else
lvi
.
SubItems
.
Add
(
amountsPerDay
[
date
].
ToString
());
}
if
(
lvi
!=
null
)
{
lvi
.
SubItems
.
Add
(
totalAmount
.
ToString
());
amountsPerDayListView
.
Items
.
Add
(
lvi
);
}
amountsPerDayListView
.
EndUpdate
();
List
<
ColumnHeader
>
headers
=
new
List
<
ColumnHeader
>();
amountsPerPersonListView
.
BeginUpdate
();
amountsPerPersonListView
.
Columns
.
Clear
();
header
=
new
ColumnHeader
();
header
.
Text
=
"Name"
;
headers
.
Add
(
header
);
foreach
(
DateTime
date
in
amountsPerDay
.
Keys
)
{
lvi
.
SubItems
.
Add
(
amountsPerDay
[
date
].
ToString
());
header
=
new
ColumnHeader
();
header
.
Text
=
date
.
ToShortDateString
();
headers
.
Add
(
header
);
}
lvi
.
SubItems
.
Add
(
totalAmount
.
ToString
());
header
=
new
ColumnHeader
();
header
.
Text
=
"Total amount"
;
headers
.
Add
(
header
);
amountsPerPersonListView
.
Columns
.
AddRange
(
headers
.
ToArray
());
foreach
(
Eventuser
user
in
amountsPerPersonPerDay
.
Keys
)
{
lvi
=
new
ListViewItem
(
user
.
firstname
+
" "
+
user
.
lastname
);
foreach
(
DateTime
date
in
amountsPerDay
.
Keys
)
{
if
(
amountsPerPersonPerDay
[
user
].
Keys
.
Contains
(
date
))
lvi
.
SubItems
.
Add
(
amountsPerPersonPerDay
[
user
][
date
].
ToString
());
else
lvi
.
SubItems
.
Add
(
"0"
);
}
lvi
.
SubItems
.
Add
(
amountsPerPerson
[
user
].
ToString
());
amountsPerPersonListView
.
Items
.
Add
(
lvi
);
}
amountsPerPersonListView
.
EndUpdate
();
}
}
catch
(
Exception
ex
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment