Ejemplo n.º 1
0
        private void btnTestQrPrinter_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();
            PRINTER_STATE QRStatus = QRPrinter.Instance.CheckQrPrinterStatus();

            if (QRStatus == PRINTER_STATE.OK)
            {
                if (StockOperations.qrSlip > 0)
                {
                    long trxId = Convert.ToInt64(TransactionInfo.SelTrxId((long)TransactionType.TT_REMOVE_QR));
                    StockOperations.InsStock(trxId, (int)StockType.QRSlip, (int)DeviceType.QRPrinter, (int)UpdateType.Decrease, 1);

                    QRPrinter.Instance.PrintQR("TestTestTestTestTestTestTestTestTest", "Test", "Test", "Test", "Test", 0, 0, "Test");
                    //CustomKPM150HPrinter.Instance.PrintTestQRTicket(qr);
                    MessageBoxOperations.ShowMessage("QR Printer Test", "Test completed successfully.", MessageBoxButtonSet.OK);
                }
                else
                {
                    MessageBoxOperations.ShowMessage("ERROR", "No paper in Qr printer." + QRStatus, MessageBoxButtonSet.OK);
                }
            }
            else
            {
                MessageBoxOperations.ShowMessage("ERROR", "Qr Printer Error." + QRStatus, MessageBoxButtonSet.OK);
            }
        }
Ejemplo n.º 2
0
        private void btnBack_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();
            switch (Ticket.journeyType)
            {
            case JourneyType.Group_Ticket:
            case JourneyType.SJT:
            case JourneyType.RJT:
                if (!Constants.IsMapPageActive)
                {
                    NavigationService.Navigate(new Pages.StationPage());
                }
                else
                {
                    NavigationService.Navigate(new Pages.StationMapPage());
                }
                break;

            case JourneyType.Day_Pass:
            case JourneyType.Weekend_Pass:
                NavigationService.Navigate(new Pages.JourneyTypePage());
                break;

            default:
                break;
            }
        }
Ejemplo n.º 3
0
        private void gridDT_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (Constants.IsMaintenanceActive)
            {
                return;
            }

            if (Constants.MaintenanceSeq == 0)
            {
                return;
            }

            if (Constants.MaintenanceSeq == 1)
            {
                return;
            }

            TVMUtility.PlayClick();
            Constants.MaintenanceSeq++;
            if (Constants.MaintenanceSeq == 3)
            {
                maintanceTimeTimer.Dispose();
                Constants.MaintenanceSeq      = 0;
                Constants.IsMaintenanceActive = true;
                frameHomeMain.Navigate(new Pages.Maintenance.AdminLoginPage());
            }
        }
Ejemplo n.º 4
0
        private void btnFinish_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();
            Custom.MessageBoxResult messageBoxResult = MessageBoxOperations.ShowMessage("Log Out", "Do you want to Log Out?", MessageBoxButtonSet.OKCancel);

            if (messageBoxResult == Custom.MessageBoxResult.OK)
            {
                int status = KMY200DoorAlarm.Instance.GetStatus();
                Enums.DoorStatus doorStatus = (Enums.DoorStatus)(status);
                if (doorStatus == Enums.DoorStatus.DOOR_ALL_CLOSE)
                {
                    KMY200DoorAlarm.Instance.SetAlarm();
                    TVMUtility.killExplorer();
                    NavigationService.Navigate(new Pages.MainPage());
                }
                else
                {
                    outofservice.Visibility  = Visibility.Visible;
                    txtErrorCode.Text        = "Door Open";
                    checkDeviceTimerDelegate = new TimerCallback(CheckDeviceAction);
                    checkDeviceTimer         = new Timer(checkDeviceTimerDelegate, null, 1000, Constants.CheckDeviceTime);
                    //MessageBoxOperations.ShowMessage("Door", "Please close the all doors.", MessageBoxButtonSet.OKCancel);
                }
            }
        }
Ejemplo n.º 5
0
        private void btnReduceCoin2_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                TVMUtility.PlayClick();
                CCTalkManager.Instance.coinHopperEV4000_2.GetHighLowStatus();
                //if (CCTalkManager.Instance.coinHopperEV4000_2.Manufacture == null)
                //{
                //    MessageBoxOperations.ShowMessage("ATTENTION!!", "Coin hopper error!", MessageBoxButtonSet.OKCancel);
                //    return;
                //}
                if (!coin2)
                {
                    return;
                }
                int count = Convert.ToInt32(lblTypeCoin2.Text);

                if (count == 0)
                {
                    MessageBoxOperations.ShowMessage("ATTENTION!!", "Please enter count", MessageBoxButtonSet.OKCancel);
                    return;
                }

                if (Convert.ToInt32(lblTypeCoin2.Text) < 0)
                {
                    MessageBoxOperations.ShowMessage("ATTENTION!!", "Please enter valid count", MessageBoxButtonSet.OKCancel);
                    return;
                }

                if (StockOperations.coin2 == 0)
                {
                    MessageBoxOperations.ShowMessage("ATTENTION!!", "There is no coin in the hopper!", MessageBoxButtonSet.OKCancel);
                }
                else if (count > StockOperations.coin2)
                {
                    MessageBoxOperations.ShowMessage("ATTENTION!!", "Reduce value cant be greater than total value!", MessageBoxButtonSet.OKCancel);
                }
                else
                {
                    decimal?trxId = TransactionInfo.SelTrxId((long)TransactionType.TT_REMOVE_COIN2);
                    if (StockOperations.InsStock((Int64)trxId, (int)StockType.Coin2, (int)DeviceType.Hopper2, (int)UpdateType.Decrease, count))
                    {
                        if (MoneyOperations.InsMoney((Int64)trxId, (int)StockType.Coin2, (int)DeviceType.Hopper2, (int)UpdateType.Decrease, Convert.ToDecimal(count) * Constants.HopperAddress2Coin))
                        {
                            if (StockOperations.SelStockStatus())
                            {
                                UpdValOnScr();
                                MessageBoxOperations.ShowMessage("REDUCED COIN", "Reduced Type : ₹ " + Constants.HopperAddress2Coin + "\nReduced Count : " + count +
                                                                 "\nReduced Amount : " + "₹ " + count * Constants.HopperAddress2Coin + "\n", MessageBoxButtonSet.OK);
                            }
                        }
                    }
                }
                coin2 = false;
            }
            catch (Exception ex)
            {
                log.Error("Error CoinDispenserTestPage -> btnMinusCoin2_Click() : " + ex.ToString());
            }
        }
Ejemplo n.º 6
0
        private void btnNumber_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();
            Button btn   = (Button)sender;
            int    count = Int32.Parse(btn.Content.ToString());

            StockOperations.SelStockStatus();

            Ticket.peopleCount = 1;
            Ticket.ticketCount = 1;

            if (Ticket.journeyType == JourneyType.Group_Ticket)
            {
                int minGroupCount = Convert.ToInt32(Parameters.TVMDynamic.GetParameter("sys_MinGroupCount"));
                int maxGroupCount = Convert.ToInt32(Parameters.TVMDynamic.GetParameter("sys_MaxGroupCount"));
                if (count >= minGroupCount && count <= maxGroupCount)
                {
                    if (count <= StockOperations.qrSlip)
                    {
                        Ticket.peopleCount = count;
                        ElectronicJournal.NumberOfTicket(count.ToString());
                        NavigationService.Navigate(new Pages.OrderPreviewPage());
                        //    PageControl.ShowPage(Pages.paymentTypePage);
                    }
                    else if (StockOperations.qrSlip == 0)
                    {
                        //MessageBoxOperations.ShowMessage("Paper Count..", "Not enough paper, You can buy " + StockOperations.qrSlip.ToString()+ " tickets.", MessageBoxButtonSet.OK);
                        MessageBoxOperations.ShowMessage(MultiLanguage.GetText("paperCount"), MultiLanguage.GetText("noQrSlip"), MessageBoxButtonSet.OK);
                    }
                    else
                    {
                        MessageBoxOperations.ShowMessage(MultiLanguage.GetText("paperCount"), MultiLanguage.GetText("notEnoughPaper") + ", " + MultiLanguage.GetText("youCanBuy") + " " + StockOperations.qrSlip.ToString() + MultiLanguage.GetText("tickets"), MessageBoxButtonSet.OK);
                    }
                }
            }
            else
            {
                int maxTicket = Convert.ToInt32(Parameters.TVMDynamic.GetParameter("sys_MaxTicket"));
                if (count >= 1 && count <= maxTicket)
                {
                    if (count <= StockOperations.qrSlip)
                    {
                        Ticket.ticketCount = count;
                        ElectronicJournal.NumberOfTicket(count.ToString());
                        NavigationService.Navigate(new Pages.OrderPreviewPage());
                        //PageControl.ShowPage(Pages.paymentTypePage);
                    }
                    else if (StockOperations.qrSlip == 0)
                    {
                        //MessageBoxOperations.ShowMessage("Paper Count..", "Not enough paper, You can buy " + StockOperations.qrSlip.ToString()+ " tickets.", MessageBoxButtonSet.OK);
                        MessageBoxOperations.ShowMessage(MultiLanguage.GetText("paperCount"), MultiLanguage.GetText("noQrSlip"), MessageBoxButtonSet.OK);
                    }
                    else
                    {
                        MessageBoxOperations.ShowMessage(MultiLanguage.GetText("paperCount"), MultiLanguage.GetText("notEnoughPaper") + ", " + MultiLanguage.GetText("youCanBuy") + " " + StockOperations.qrSlip.ToString() + MultiLanguage.GetText("tickets"), MessageBoxButtonSet.OK);
                    }
                }
            }
        }
Ejemplo n.º 7
0
 private void gridGrp_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     TVMUtility.PlayClick();
     Ticket.journeyType = JourneyType.Group_Ticket;
     ElectronicJournal.ItemSelected("GROUP");
     GoToNextStep();
     NavigationService.Navigate(new Pages.StationPage());
 }
Ejemplo n.º 8
0
        private void btnShutDown_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();

            var result = MessageBoxOperations.ShowMessage("SHUTDOWN", "Are you sure you want to Shutdown the TVM?", MessageBoxButtonSet.YesNo);

            if (result == Custom.MessageBoxResult.OK)
            {
                TVMUtility.ShutDownSystem();
            }
        }
Ejemplo n.º 9
0
        private void btnRestart_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();

            var result = MessageBoxOperations.ShowMessage("RESTART", "Are you sure you want to Restart the TVM?", MessageBoxButtonSet.YesNo);

            if (result == Custom.MessageBoxResult.OK)
            {
                TVMUtility.RestartSystem();
            }
        }
Ejemplo n.º 10
0
        private void btnStation_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();
            int selectedStationId = 0;

            SetDefaultStatus();
            selectedStationId = Convert.ToInt32(((Button)sender).Tag);
            if (Stations.stationList.ContainsKey(selectedStationId))
            {
                SetStation(selectedStationId);
            }
        }
Ejemplo n.º 11
0
 private void btnTestBNA_Click(object sender, RoutedEventArgs e)
 {
     TVMUtility.PlayClick();
     BNRManager.Instance.PollingAction();
     if (Constants.BNRStatus == "DISABLED")
     {
         CustomTL60Printer.Instance.TestBNA();
         MessageBoxOperations.ShowMessage("BNA Test", "Test completed successfully.", MessageBoxButtonSet.OK);
     }
     else
     {
         MessageBoxOperations.ShowMessage("BNA Test", "BNA error.", MessageBoxButtonSet.OK);
     }
 }
Ejemplo n.º 12
0
        private void btnAddCoin1_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                TVMUtility.PlayClick();

                if (!coin1)
                {
                    return;
                }

                int count = Convert.ToInt32(lblTypeCoin1.Text);
                if (count == 0)
                {
                    MessageBoxOperations.ShowMessage("ATTENTION!!", "Please enter count", MessageBoxButtonSet.OKCancel);
                    return;
                }

                if (Convert.ToInt32(count) < 0)
                {
                    MessageBoxOperations.ShowMessage("ATTENTION!!", "Please enter valid count", MessageBoxButtonSet.OKCancel);
                    return;
                }

                decimal?trxId = TransactionInfo.SelTrxId((long)TransactionType.TT_ADD_COIN1);
                if (StockOperations.InsStock(Convert.ToInt64(trxId), (int)StockType.Coin1, (int)DeviceType.Hopper1, (int)UpdateType.Increase, Convert.ToInt32(lblTypeCoin1.Text)))
                {
                    if (MoneyOperations.InsMoney(Convert.ToInt64(trxId), (int)StockType.Coin1, (int)DeviceType.Hopper1, (int)UpdateType.Increase, Convert.ToDecimal(lblTypeCoin1.Text) * Constants.HopperAddress1Coin))
                    {
                        if (StockOperations.SelStockStatus())
                        {
                            if (CustomTL60Printer.Instance.getStatusWithUsb() == Enums.PRINTER_STATE.OK)
                            {
                                CustomTL60Printer.Instance.CoinAddPrint(Convert.ToInt32(lblTypeCoin1.Text), Constants.HopperAddress1Coin, StockOperations.coin1);
                            }
                            UpdValOnScr();
                            MessageBoxOperations.ShowMessage("ADD COIN", "Added Type : ₹ " + Constants.HopperAddress1Coin + "\n" + "Added Count : " + count +
                                                             "\nAdded Amount : " + "₹ " + count * Constants.HopperAddress1Coin + "\n", MessageBoxButtonSet.OK);
                        }
                    }
                }

                coin1 = false;
            }
            catch (Exception ex)
            {
                log.Error("Error CoinDispenserTestPage -> btnAddCoin1_Click() : " + ex.ToString());
            }
        }
Ejemplo n.º 13
0
        private void btnSetServiceMode_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();

            if (svcMode)
            {
                svcMode = false;
                btnSetServiceMode.Content = "Out Of Service Mode";
            }
            else
            {
                svcMode = true;
                btnSetServiceMode.Content = "Set Service Mode";
            }
        }
Ejemplo n.º 14
0
        private void btnStation_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();
            int selectedStationId = 0;

            selectedStationId = Convert.ToInt32(((Button)sender).Tag.ToString());//Stations.GetStation().id;
            //if (Stations.stationList.ContainsKey(selectedStationId))
            //    SetStation(selectedStationId);
            Ticket.endStation   = Stations.GetStation(selectedStationId);
            Ticket.startStation = Stations.currentStation;
            ElectronicJournal.DestinationSelected(Ticket.endStation.name.ToString());
            Constants.IsMapPageActive = false;
            NavigationService.Navigate(new Pages.TicketCountPage());
            //PageControl.ShowPage(Pages.journeyPage);
        }
Ejemplo n.º 15
0
        private void btnTestReceiptPrinter_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();
            PRINTER_STATE ReceiptPrinter = CustomTL60Printer.Instance.getStatusWithUsb();

            if (ReceiptPrinter == PRINTER_STATE.OK)
            {
                CustomTL60Printer.Instance.TestReceiptPrinter();
                MessageBoxOperations.ShowMessage("Receipt Printer Test", "Test completed successfully.", MessageBoxButtonSet.OK);
            }
            else
            {
                MessageBoxOperations.ShowMessage("ERROR", "Receipt Printer Error." + ReceiptPrinter, MessageBoxButtonSet.OK);
            }
        }
Ejemplo n.º 16
0
        private void btnEmptyCoin5_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                TVMUtility.PlayClick();
                CCTalkManager.Instance.coinHopperEV4000_3.GetHighLowStatus();
                //if (CCTalkManager.Instance.coinHopperEV4000_3.Manufacture == null)
                //{
                //    MessageBoxOperations.ShowMessage("ATTENTION!!", "Coin hopper error!", MessageBoxButtonSet.OKCancel);
                //    return;
                //}
                Custom.MessageBoxResult messageBoxResult = MessageBoxOperations.ShowMessage("ATTENTION!!", "Do you want empty the hopper. ₹" + Constants.HopperAddress3Coin, MessageBoxButtonSet.OKCancel);
                if (messageBoxResult == Custom.MessageBoxResult.OK)
                {
                    if (StockOperations.coin5 == 0)
                    {
                        MessageBoxOperations.ShowMessage("ATTENTION!!", "Stock is already empty.", MessageBoxButtonSet.OKCancel);
                        return;
                    }
                    int stock = StockOperations.coin5;

                    CCTalkManager.Instance.coinHopperEV4000_3.EmptyHopper();

                    decimal?trxId = TransactionInfo.SelTrxId((long)TransactionType.TT_EMPTY_COIN5);
                    if (StockOperations.InsStock((Int64)trxId, (int)StockType.Coin5, (int)DeviceType.Hopper5, (int)UpdateType.Empty, stock))
                    {
                        if (MoneyOperations.InsMoney((Int64)trxId, (int)StockType.Coin5, (int)DeviceType.Hopper5, (int)UpdateType.Empty, Convert.ToDecimal(stock) * 1))
                        {
                            if (StockOperations.SelStockStatus())
                            {
                                if (CustomTL60Printer.Instance.getStatusWithUsb() == Enums.PRINTER_STATE.OK)
                                {
                                    CustomTL60Printer.Instance.CoinEmptyBoxPrint(stock, Constants.HopperAddress3Coin, StockOperations.coin5);
                                }
                                UpdValOnScr();
                            }
                        }
                    }

                    MessageBoxOperations.ShowMessage("EMPTY COIN", "Removed Type :₹" + Constants.HopperAddress3Coin + "\nRemoved Count : " + stock +
                                                     "\nRemoved Amount : " + "₹ " + stock * Constants.HopperAddress3Coin + "\n", MessageBoxButtonSet.OK);
                }
            }
            catch (Exception ex)
            {
                log.Error("Error CoinDispenserTestPage -> btnEmptyCoin5_Click() : " + ex.ToString());
            }
        }
Ejemplo n.º 17
0
        private void btnCash_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();
            PRINTER_STATE ReceiptPrinter = CustomTL60Printer.Instance.getStatusWithUsb();

            if (ReceiptPrinter == PRINTER_STATE.OK)
            {
                Constants.NoReceiptMode = false;
            }
            else
            {
                Constants.NoReceiptMode = true;
            }
            PRINTER_STATE QRStatus = QRPrinter.Instance.CheckQrPrinterStatus();//CustomKPM150HPrinter.Instance.getStatusWithUsb();

            if (QRStatus != PRINTER_STATE.OK)
            {
                Custom.MessageBoxResult messageBoxResult = MessageBoxOperations.ShowMessage("QR Printer", "QR Printer Error.", MessageBoxButtonSet.OK);
                if (messageBoxResult == Custom.MessageBoxResult.OK)
                {
                    ElectronicJournal.OrderCancelled();
                    NavigationService.Navigate(new Pages.MainPage());
                    return;
                }
            }
            else
            {
                if (StockOperations.qrSlip >= Ticket.ticketCount)
                {
                    ElectronicJournal.AmountPayable(Ticket.totalPrice.ToString());
                    ElectronicJournal.MediaSelected("CASH");
                    NavigationService.Navigate(new Pages.PayByCashPage());
                }
                else
                {
                    Custom.MessageBoxResult messageBoxResult = MessageBoxOperations.ShowMessage("QR Printer", "QR Printer Low Paper.", MessageBoxButtonSet.OK);
                    if (messageBoxResult == Custom.MessageBoxResult.OK)
                    {
                        ElectronicJournal.OrderCancelled();
                        NavigationService.Navigate(new Pages.MainPage());
                        return;
                    }
                }
            }
        }
Ejemplo n.º 18
0
        private void gridLogo_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (Constants.IsMaintenanceActive)
            {
                return;
            }

            if (Constants.MaintenanceSeq >= 1)
            {
                return;
            }

            TVMUtility.PlayClick();

            maintanceTimerDelegate = new TimerCallback(maintanceTimerAction);
            maintanceTimeTimer     = new Timer(maintanceTimerDelegate, null, 2000, 0);

            Constants.MaintenanceSeq++;
        }
Ejemplo n.º 19
0
        private void btnSendBox3_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                TVMUtility.PlayClick();
                if (Constants.BNRStatus == "DISABLED")
                {
                    if (noteincasset3 != 0)
                    {
                        unloadedCasset = 3;

                        UnloadCassette(3, noteincasset3);

                        long trxId1 = Convert.ToInt64(TransactionInfo.SelTrxId((long)(TransactionType)Enum.Parse(typeof(TransactionType), "TT_REMOVE_BANKNOTE" + notevalincasset3)));
                        if (StockOperations.InsStock(trxId1, (int)(StockType)Enum.Parse(typeof(StockType), "Banknote" + notevalincasset3), (int)DeviceType.Cassette3, (int)UpdateType.Decrease, noteincasset3))
                        {
                            if (MoneyOperations.InsMoney(trxId1, (int)(StockType)Enum.Parse(typeof(StockType), "Banknote" + notevalincasset3), (int)DeviceType.Cassette3, (int)UpdateType.Decrease, notevalincasset3 * noteincasset3))
                            {
                                long trxId2 = Convert.ToInt64(TransactionInfo.SelTrxId((long)TransactionType.TT_ADD_BOX));
                                if (StockOperations.InsStock(trxId2, (int)(StockType)Enum.Parse(typeof(StockType), "Banknote" + notevalincasset3), (int)DeviceType.Box, (int)UpdateType.Increase, noteincasset3))
                                {
                                    if (MoneyOperations.InsMoney(trxId2, (int)(StockType)Enum.Parse(typeof(StockType), "Banknote" + notevalincasset3), (int)DeviceType.Box, (int)UpdateType.Increase, notevalincasset3 * noteincasset3))
                                    {
                                        if (MoneyOperations.SelMoneyStatus())
                                        {
                                            if (CustomTL60Printer.Instance.getStatusWithUsb() == Enums.PRINTER_STATE.OK)
                                            {
                                                CustomTL60Printer.Instance.SendBoxNotes(noteincasset3, notevalincasset3);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error("Error BNROperationPage -> btnSendBox3_Click() : " + ex.ToString());
            }
        }
Ejemplo n.º 20
0
        private void gridBankLogo_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (Constants.IsMaintenanceActive)
            {
                return;
            }

            if (Constants.MaintenanceSeq == 0)
            {
                return;
            }

            if (Constants.MaintenanceSeq == 2)
            {
                return;
            }

            TVMUtility.PlayClick();
            Constants.MaintenanceSeq++;
        }
Ejemplo n.º 21
0
 private void btnOk_Click(object sender, RoutedEventArgs e)
 {
     TVMUtility.PlayClick();
     grdNoChangeMode.Visibility = Visibility.Hidden;
     if (nochageMode && noReceiptprinter)
     {
         grdNoReceiptPrinterMode.Visibility = Visibility.Visible;
         i++;
         if (i == 2)
         {
             i = 0;
             ElectronicJournal.OrderStarted();
             NavigationService.Navigate(new Pages.JourneyTypePage());
         }
     }
     else
     {
         ElectronicJournal.OrderStarted();
         NavigationService.Navigate(new Pages.JourneyTypePage());
     }
 }
Ejemplo n.º 22
0
        private void btnAddCoin2_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();
            if (!coin2)
            {
                return;
            }

            if (lblTypeCoin2.Text != "0")
            {
                if (CCTalkManager.Instance.coinHopperEV4000_2.Category != null)
                {
                    CCTalkManager.Instance.coinHopperEV4000_2.GetHighLowStatus();

                    if (level == "Low Level")
                    {
                        if (Constants.CoinAvailable.Contains(lblTypeCoin1.Text))
                        {
                            CoinValues.setCoin2(lblTypeCoin2.Text);
                            Constants.HopperAddress2Coin = Convert.ToInt16(lblTypeCoin2.Text);
                            MessageBoxOperations.ShowMessage("COIN", "Coin hopper 2 value saved.", MessageBoxButtonSet.OK);
                        }
                        else
                        {
                            MessageBoxOperations.ShowMessage("COIN", "Entered coin value is wrong.", MessageBoxButtonSet.OK);
                        }
                    }
                    else
                    {
                        MessageBoxOperations.ShowMessage("COIN", "Please empty the hopper 2.", MessageBoxButtonSet.OK);
                    }
                }
            }
            else
            {
                MessageBoxOperations.ShowMessage("COIN", "Please enter the coin value.", MessageBoxButtonSet.OK);
                lblTypeCoin2.Focus();
            }
            coin2 = false;
        }
Ejemplo n.º 23
0
        private void btnLogin_Click(object sender, RoutedEventArgs e)
        {
            TVMUtility.PlayClick();
            bool notAuthorized = false;
            bool log           = Login(txtUserID.Text, pbUserPassword.Password, Stations.currentStation.id, ref notAuthorized);

            if (notAuthorized)
            {
                Parameters.userId = txtUserID.Text;

                Parameters.menuItems.Clear();

                using (var context = new TVM_Entities())
                {
                    int?userRecId = context.sp_SelUserId(Parameters.userId).FirstOrDefault();

                    var menu = context.sp_userAuth(userRecId, "TVM").ToList();

                    foreach (var row2 in menu)
                    {
                        Parameters.menuItems.Add(row2.explanation.ToString());
                    }
                }
                TVMUtility.RestartExplorer();
                NavigationService.Navigate(new Pages.Maintenance.AdminMainPage());
            }
            else
            {
                if (notAuthorized)
                {
                    MessageBoxOperations.ShowMessage("Login Failed", "User is not authorized..", MessageBoxButtonSet.OK);
                }
                else
                {
                    MessageBoxOperations.ShowMessage("Login Failed", "User Id or password is wrong..", MessageBoxButtonSet.OK);
                }
            }
        }
Ejemplo n.º 24
0
 private void btnFinish_Click(object sender, RoutedEventArgs e)
 {
     TVMUtility.PlayClick();
     NavigationService.Navigate(new Pages.Maintenance.AdminMainPage());
 }
Ejemplo n.º 25
0
 private void btnCollection_Click(object sender, RoutedEventArgs e)
 {
     TVMUtility.PlayClick();
     NavigationService.Navigate(new Pages.Maintenance.OperationPage());
 }
Ejemplo n.º 26
0
 private void btnTestDevice_Click(object sender, RoutedEventArgs e)
 {
     TVMUtility.PlayClick();
     NavigationService.Navigate(new Pages.Maintenance.DeviceTestsPage());
 }
Ejemplo n.º 27
0
 private void btnFinish_Click(object sender, RoutedEventArgs e)
 {
     TVMUtility.PlayClick();
     ElectronicJournal.OrderCancelled();
     NavigationService.Navigate(new Pages.MainPage());
 }
Ejemplo n.º 28
0
 private void btnStationList_Click(object sender, RoutedEventArgs e)
 {
     TVMUtility.PlayClick();
     NavigationService.Navigate(new Pages.StationPage());
 }
Ejemplo n.º 29
0
 private void btnBack_Click(object sender, RoutedEventArgs e)
 {
     TVMUtility.PlayClick();
     NavigationService.Navigate(new Pages.JourneyTypePage());
 }
Ejemplo n.º 30
0
 private void btnDel_Click(object sender, MouseButtonEventArgs e)
 {
     TVMUtility.PlayClick();
     Delete();
 }