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)",
|
||||
"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){
|
||||
case 1:;//list
|
||||
//add a new element with product name new item
|
||||
|
@ -31,7 +31,7 @@ void normal_menu(){
|
||||
"Search item",
|
||||
"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)
|
||||
{
|
||||
case 1://List items
|
||||
@ -86,7 +86,7 @@ void search_item(){
|
||||
char * items[] = {
|
||||
"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){
|
||||
break;
|
||||
}
|
||||
@ -160,7 +160,7 @@ void self_help_sale_system(){
|
||||
"scan barcode",
|
||||
"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)
|
||||
{
|
||||
case 1:
|
||||
|
@ -13,7 +13,7 @@ void role_control(){
|
||||
"add admin 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){
|
||||
case 3:
|
||||
break;
|
||||
|
@ -12,7 +12,7 @@ void tran_control(){
|
||||
"List 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){
|
||||
case 1:
|
||||
char * SortItems[] = {
|
||||
|
@ -10,13 +10,10 @@ void user_control(){
|
||||
int choice = 0;
|
||||
while(choice != 3){
|
||||
Cls();
|
||||
printf("User Control\n");
|
||||
printf("1. Add User(shortcut)\n");
|
||||
printf("2. List User\n");
|
||||
printf("3. Exit\n");
|
||||
printf("Please input your choice\n>");
|
||||
fflush_stdin();
|
||||
scanf("%d",&choice);
|
||||
choice = choices_selecter((char*[]){
|
||||
"Add user",
|
||||
"List user",
|
||||
},3,"><Welcome to the Student Union POS system><\nUser control\n");
|
||||
switch(choice){
|
||||
case 1:
|
||||
db = add_user(db);
|
||||
|
Loading…
x
Reference in New Issue
Block a user