fix bugs and some cleanup
This commit is contained in:
parent
314e3c7ae3
commit
87840349db
@ -15,7 +15,7 @@ void inv_control(){
|
|||||||
"List(allow all operation include add)",
|
"List(allow all operation include add)",
|
||||||
"Add item(shortcut to add item)"
|
"Add item(shortcut to add item)"
|
||||||
};
|
};
|
||||||
choice = choices_selecter(items,2,NULL);
|
choice = choices_selecter(items,2,"><Welcome to the Student Union POS system><\nInventory control\n");
|
||||||
switch (choice){
|
switch (choice){
|
||||||
case 1:;//list
|
case 1:;//list
|
||||||
//add a new element with product name new item
|
//add a new element with product name new item
|
||||||
|
@ -31,7 +31,7 @@ void normal_menu(){
|
|||||||
"Search item",
|
"Search item",
|
||||||
"Self help sale system"
|
"Self help sale system"
|
||||||
};
|
};
|
||||||
choice = choices_selecter(items,3,"><Welcome to the Student Union POS system><\nNormal User Menu");
|
choice = choices_selecter(items,3,"><Welcome to the Student Union POS system><\nNormal User Menu\n");
|
||||||
switch (choice)
|
switch (choice)
|
||||||
{
|
{
|
||||||
case 1://List items
|
case 1://List items
|
||||||
@ -86,7 +86,7 @@ void search_item(){
|
|||||||
char * items[] = {
|
char * items[] = {
|
||||||
"search"
|
"search"
|
||||||
};
|
};
|
||||||
breakout = choices_selecter(items,1,"><Welcome to the Student Union POS system><");
|
breakout = choices_selecter(items,1,"><Welcome to the Student Union POS system><\n");
|
||||||
if(breakout == 2){
|
if(breakout == 2){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -160,7 +160,7 @@ void self_help_sale_system(){
|
|||||||
"scan barcode",
|
"scan barcode",
|
||||||
"cart/checkout"
|
"cart/checkout"
|
||||||
};
|
};
|
||||||
choice = choices_selecter(items,2,"><Welcome to the Student Union POS system><");
|
choice = choices_selecter(items,2,"><Welcome to the Student Union POS system><\n");
|
||||||
switch (choice)
|
switch (choice)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -13,7 +13,7 @@ void role_control(){
|
|||||||
"add admin role",
|
"add admin role",
|
||||||
"list role"
|
"list role"
|
||||||
};
|
};
|
||||||
choice = choices_selecter(items,2,"><Welcome to the Student Union POS system><\nRole control");
|
choice = choices_selecter(items,2,"><Welcome to the Student Union POS system><\nRole control\n");
|
||||||
switch (choice){
|
switch (choice){
|
||||||
case 3:
|
case 3:
|
||||||
break;
|
break;
|
||||||
|
@ -12,7 +12,7 @@ void tran_control(){
|
|||||||
"List transaction",
|
"List transaction",
|
||||||
"new transaction"
|
"new transaction"
|
||||||
};
|
};
|
||||||
choice = choices_selecter(items,2,"><Welcome to the Student Union POS system><\nTransaction control");
|
choice = choices_selecter(items,2,"><Welcome to the Student Union POS system><\nTransaction control\n");
|
||||||
switch(choice){
|
switch(choice){
|
||||||
case 1:
|
case 1:
|
||||||
char * SortItems[] = {
|
char * SortItems[] = {
|
||||||
|
@ -10,13 +10,10 @@ void user_control(){
|
|||||||
int choice = 0;
|
int choice = 0;
|
||||||
while(choice != 3){
|
while(choice != 3){
|
||||||
Cls();
|
Cls();
|
||||||
printf("User Control\n");
|
choice = choices_selecter((char*[]){
|
||||||
printf("1. Add User(shortcut)\n");
|
"Add user",
|
||||||
printf("2. List User\n");
|
"List user",
|
||||||
printf("3. Exit\n");
|
},3,"><Welcome to the Student Union POS system><\nUser control\n");
|
||||||
printf("Please input your choice\n>");
|
|
||||||
fflush_stdin();
|
|
||||||
scanf("%d",&choice);
|
|
||||||
switch(choice){
|
switch(choice){
|
||||||
case 1:
|
case 1:
|
||||||
db = add_user(db);
|
db = add_user(db);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user