Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
islater
cowboy-cafe
Commits
866545e5
Commit
866545e5
authored
Apr 06, 2020
by
islater
Browse files
added pdfs
parent
b7748ba0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Documentation/RegisterControll.pdf
0 → 100644
View file @
866545e5
File added
Documentation/TransactionControll.pdf
0 → 100644
View file @
866545e5
File added
PointOfSale/RegisterControll.xaml
View file @
866545e5
...
...
@@ -116,9 +116,10 @@
<Button Content="Confirm" VerticalAlignment="Center" HorizontalAlignment="Center" Width="120" Height="43" Grid.Column="2" Grid.Row="3" Click="Confirm_Click"/>
<TextBlock VerticalAlignment="Center" Text="$0.00" Name="TotalBox" Grid.Column="3" Grid.Row="4"/>
<TextBlock VerticalAlignment="Center" Text="$0.00" Name="Register" Grid.Column="4" Grid.Row="4"/>
<TextBlock VerticalAlignment="Bottom" Text="Current" Name="Current" Grid.Column="3" Grid.Row="4"/>
...
...
PointOfSale/RegisterControll.xaml.cs
View file @
866545e5
...
...
@@ -26,16 +26,16 @@ namespace PointOfSale
public
int
Pennies
{
get
;
set
;
}
public
int
Nickles
{
get
;
set
;
}
public
int
Dimes
{
get
;
set
;
}
p
ublic
int
Quarters
{
get
;
set
;
}
p
ublic
int
HalfDollars
{
get
;
set
;
}
p
ublic
int
Dollars
{
get
;
set
;
}
p
ublic
int
Ones
{
get
;
set
;
}
p
ublic
int
Twos
{
get
;
set
;
}
p
rivate
int
Quarters
{
get
;
set
;
}
p
rivate
int
HalfDollars
{
get
;
set
;
}
p
rivate
int
Dollars
{
get
;
set
;
}
p
rivate
int
Ones
{
get
;
set
;
}
p
rivate
int
Twos
{
get
;
set
;
}
public
int
Fives
{
get
;
set
;
}
p
ublic
int
Tens
{
get
;
set
;
}
p
ublic
int
Twenties
{
get
;
set
;
}
p
ublic
int
Fifties
{
get
;
set
;
}
p
ublic
int
Hundreds
{
get
;
set
;
}
p
rivate
int
Tens
{
get
;
set
;
}
p
rivate
int
Twenties
{
get
;
set
;
}
p
rivate
int
Fifties
{
get
;
set
;
}
p
rivate
int
Hundreds
{
get
;
set
;
}
public
Double
Total
{
...
...
@@ -80,20 +80,35 @@ namespace PointOfSale
public
void
Clear_Order
()
{
Pennies
=
0
;
PenniesText
.
Text
=
Pennies
.
ToString
();
Nickles
=
0
;
NicklesText
.
Text
=
Nickles
.
ToString
();
Dimes
=
0
;
DimesText
.
Text
=
Dimes
.
ToString
();
Quarters
=
0
;
QuartersText
.
Text
=
Quarters
.
ToString
();
HalfDollars
=
0
;
HalfDollarsText
.
Text
=
HalfDollars
.
ToString
();
Dollars
=
0
;
DollarsText
.
Text
=
Dollars
.
ToString
();
Ones
=
0
;
OnesText
.
Text
=
Ones
.
ToString
();
Twos
=
0
;
TwosText
.
Text
=
Twos
.
ToString
();
Fives
=
0
;
FivesText
.
Text
=
Fives
.
ToString
();
Tens
=
0
;
TensText
.
Text
=
Tens
.
ToString
();
Twenties
=
0
;
TwentiesText
.
Text
=
Twenties
.
ToString
();
Fifties
=
0
;
FiftiesText
.
Text
=
Fifties
.
ToString
();
Hundreds
=
0
;
HundredsText
.
Text
=
Hundreds
.
ToString
();
}
TotalBox
.
Text
=
0.00
.
ToString
(
"C"
);
}
private
void
Pennies_minus
(
object
sender
,
RoutedEventArgs
e
)
{
...
...
@@ -348,14 +363,18 @@ namespace PointOfSale
else
if
(
Hundreds
!=
0
)
drawer
.
AddBill
(
Bills
.
Hundred
,
Hundreds
);
if
(
change
<
0
)
{
MessageBox
.
Show
(
"Insuficient Funds"
);
return
;
}
else
if
(
change
>
drawer
.
TotalValue
)
{
MessageBox
.
Show
(
"Error Not enough money to break this bill"
);
return
;
}
else
if
(
change
==
0
)
{
MessageBox
.
Show
(
"Sucess"
);
...
...
@@ -367,69 +386,69 @@ namespace PointOfSale
else
{
MessageBox
.
Show
(
"Change Due: "
+
change
.
ToString
(
"C"
));
while
(
change
>=
0.009999999999999999999999999999999999999
)
while
(
change
>=
0.009999999999999999999999999999999999999
)
{
if
(
change
-
100
>
0
&&
drawer
.
Hundreds
>
0
)
{
drawer
.
RemoveBill
(
Bills
.
Hundred
,
1
);
change
-=
100
;
}
else
if
(
change
-
50
>
0
&&
drawer
.
Fifties
>
0
)
if
(
change
-
50
>
0
&&
drawer
.
Fifties
>
0
)
{
drawer
.
RemoveBill
(
Bills
.
Fifty
,
1
);
change
-=
50
;
}
else
if
(
change
-
20
>
0
&&
drawer
.
Twenties
>
0
)
if
(
change
-
20
>
0
&&
drawer
.
Twenties
>
0
)
{
drawer
.
RemoveBill
(
Bills
.
Twenty
,
1
);
change
-=
20
;
}
else
if
(
change
-
10
>
0
&&
drawer
.
Tens
>
0
)
if
(
change
-
10
>
0
&&
drawer
.
Tens
>
0
)
{
drawer
.
RemoveBill
(
Bills
.
Ten
,
1
);
change
-=
10
;
}
else
if
(
change
-
5
>
0
&&
drawer
.
Fives
>
0
)
if
(
change
-
5
>
0
&&
drawer
.
Fives
>
0
)
{
drawer
.
RemoveBill
(
Bills
.
Five
,
1
);
change
-=
5
;
}
else
if
(
change
-
1
>
0
&&
drawer
.
Ones
>
0
)
if
(
change
-
1
>
0
&&
drawer
.
Ones
>
0
)
{
drawer
.
RemoveBill
(
Bills
.
One
,
1
);
change
-=
1
;
}
else
if
(
change
-
1
>
0
&&
drawer
.
Dollars
>
0
)
if
(
change
-
1
>
0
&&
drawer
.
Dollars
>
0
)
{
drawer
.
RemoveCoin
(
Coins
.
Dollar
,
1
);
change
-=
1
;
}
else
if
(
change
-
.
50
>
0
&&
drawer
.
HalfDollars
>
0
)
if
(
change
-
.
50
>
0
&&
drawer
.
HalfDollars
>
0
)
{
drawer
.
RemoveCoin
(
Coins
.
HalfDollar
,
1
);
change
-=
.
50
;
}
else
if
(
change
-
.
25
>
0
&&
drawer
.
Quarters
>
0
)
if
(
change
-
.
25
>
0
&&
drawer
.
Quarters
>
0
)
{
drawer
.
RemoveCoin
(
Coins
.
Quarter
,
1
);
change
-=
.
25
;
}
else
if
(
change
-
.
10
>
0
&&
drawer
.
Dimes
>
0
)
if
(
change
-
.
10
>
0
&&
drawer
.
Dimes
>
0
)
{
drawer
.
RemoveCoin
(
Coins
.
Dime
,
1
);
change
-=
.
10
;
}
else
if
(
change
-
.
05
>
0
&&
drawer
.
Nickels
>
0
)
if
(
change
-
.
05
>
0
&&
drawer
.
Nickels
>
0
)
{
drawer
.
RemoveCoin
(
Coins
.
Nickel
,
1
);
change
-=
.
05
;
}
else
if
(
change
-
.
01
>
0
&&
drawer
.
Pennies
>
0
)
if
(
change
-
.
01
>
0
&&
drawer
.
Pennies
>
0
)
{
drawer
.
RemoveCoin
(
Coins
.
Penny
,
1
);
change
-=
.
01
;
}
}
OrderControl
parent
=
(
OrderControl
)((
Border
)
Parent
).
Parent
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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