Exemplo n.º 1
0
        //constructor called when logging in as guest
        public KioskWindow(CultureInfo language)
        {
            ci = language;                           //set the language
            a  = Assembly.Load("CustomerInterface"); //load the assembly and resourcemanager
            rm = new ResourceManager("CustomerInterface.Lang.lang", a);

            InitializeComponent();
            db = new NSADatabase();
            db.OpenConnection();
            componentsList = db.getComponents();
            menu           = db.getMenu();

            updateMenu();
            currentOrder = new NSAOrder();
            setLang(ci);
        }
Exemplo n.º 2
0
        //constructor called when logging in with a loyalty account
        public KioskWindow(CultureInfo language, List <string>[] accountNumber)
        {
            ci = language;                           //set the language
            a  = Assembly.Load("CustomerInterface"); //load the assembly and resourcemanager
            rm = new ResourceManager("CustomerInterface.Lang.lang", a);


            account = new NSALoyaltyAccount(accountNumber[0][0], accountNumber[1][0], accountNumber[2][0], accountNumber[3][0]);


            InitializeComponent();

            db = new NSADatabase();
            db.OpenConnection();
            componentsList = db.getComponents();
            menu           = db.getMenu();

            account.FavoriteItems = db.getFavoriteItems(account.getAccountNumber().ToString());
            foreach (NSAFavoriteItem it in account.FavoriteItems)
            {
                ListViewItem lvi = new ListViewItem(it.Name);
                lvi.Tag = it;
                favItemsListView.Items.Add(lvi);
            }

            account.FavoriteOrders = db.getFavoriteOrders(account.getAccountNumber());

            foreach (NSAOrder order in account.FavoriteOrders)
            {
                ListViewItem lvi = new ListViewItem(order.Id.ToString());
                lvi.Tag = order;
                FavOrdersView.Items.Add(lvi);
            }
            setAccountTab();
            updateMenu();
            currentOrder = new NSAOrder();
            setLang(ci);
        }