예제 #1
0
        private void btnParkGoster_Click(object sender, EventArgs e)
        {
            DataTable         dtTempParking = ParkingTickets;
            FrmParkingTickets frmParking    = new FrmParkingTickets(ref dtTempParking);

            frmParking.ShowDialog();

            if (frmParking.IsCalledParkingTickets)
            {
                ParkingTickets = null;
                ParkingTickets = dtTempParking;

                int             TicketID, TicketNo, GroupID;
                bool            IsAssistGroup, IsMainGroup, IsTransferTicket, IsFiktifTicket;
                DataGridViewRow drCalledTickets = frmParking.CalledTicket;
                TicketID = int.Parse(drCalledTickets.Cells["BID"].Value.ToString());
                TicketNo = int.Parse(drCalledTickets.Cells["BNo"].Value.ToString());
                GroupID  = int.Parse(drCalledTickets.Cells["GRPID"].Value.ToString());

                IsMainGroup = TerminalHasThisGroup(
                    drCalledTickets.Cells["GRPID"].Value.ToString(), out IsAssistGroup);
                IsTransferOrFiktifTicket(TicketID, out IsTransferTicket, out IsFiktifTicket);

                _kuyruk.KillTicket();
                _kuyruk.CallTicketManuel(TicketNo, TicketID, GroupID, IsTransferTicket,
                                         IsFiktifTicket, IsAssistGroup, IsMainGroup);

                LblWaitingTickets.Text = _kuyruk.GetWaitingTicketsCount().ToString();

                SetWaitingLamb();
                ParkingTickets.Rows.RemoveAt(frmParking.CalledIndex);
            }
        }
예제 #2
0
        private void FrmVirtualTerminal_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Alt && e.Control)
            {
                MenuStripTop.Visible = !MenuStripTop.Visible;
                return;
            }

            if (e.KeyCode == Keys.Right && e.Shift)
            {
                BtnNextTicket.PerformClick();
                return;
            }
            else if (e.KeyCode == Keys.R && e.Shift)
            {
                BtnReCallTicket.PerformClick();
            }
            else if (e.KeyCode == Keys.X && e.Shift)
            {
                TCPIPCommunicating.CloseDisplay(_kuyruk.terminal.ElTerminalID);
            }
            else if (e.KeyCode == Keys.Z && e.Shift)
            {
                TCPIPCommunicating.OpenDisplay(_kuyruk.terminal.ElTerminalID);
            }
            else if (e.KeyCode == Keys.L && e.Shift)
            {
                TCPIPCommunicating.MakeLineOnDisplay(_kuyruk.terminal.ElTerminalID);
            }
            else if (e.KeyCode == Keys.K && e.Shift)
            {
                DataTable         dtTempParking = ParkingTickets;
                FrmParkingTickets frmParking    = new FrmParkingTickets(ref dtTempParking);
                frmParking.ShowDialog();

                if (frmParking.IsCalledParkingTickets)
                {
                    ParkingTickets = null;
                    ParkingTickets = dtTempParking;

                    int             TicketID, TicketNo, GroupID;
                    bool            IsAssistGroup, IsMainGroup, IsTransferTicket, IsFiktifTicket;
                    DataGridViewRow drCalledTickets = frmParking.CalledTicket;
                    TicketID = int.Parse(drCalledTickets.Cells["BID"].Value.ToString());
                    TicketNo = int.Parse(drCalledTickets.Cells["BNo"].Value.ToString());
                    GroupID  = int.Parse(drCalledTickets.Cells["GRPID"].Value.ToString());

                    IsMainGroup = TerminalHasThisGroup(
                        drCalledTickets.Cells["GRPID"].Value.ToString(), out IsAssistGroup);
                    IsTransferOrFiktifTicket(TicketID, out IsTransferTicket, out IsFiktifTicket);

                    _kuyruk.KillTicket();
                    _kuyruk.CallTicketManuel(TicketNo, TicketID, GroupID, IsTransferTicket,
                                             IsFiktifTicket, IsAssistGroup, IsMainGroup);

                    LblWaitingTickets.Text = _kuyruk.GetWaitingTicketsCount().ToString();

                    SetWaitingLamb();
                    ParkingTickets.Rows.RemoveAt(frmParking.CalledIndex);
                }
            }
            else if (e.KeyCode == Keys.P)
            {
                if (LblTicketNo.Tag != null && !string.IsNullOrEmpty(LblTicketNo.Tag.ToString()))
                {
                    ParkingTickets.Rows.Add(
                        int.Parse(LblSisTar.Tag.ToString()), int.Parse(LblTicketGroupName.Tag.ToString()),
                        LblTicketNo.Text);
                    TmrOtoTicketCall.Start();
                    TmrTicketProcessCounter.Stop();
                    SetEnabledForTransferControls(false);
                    ClearTicketInf();
                    _kuyruk.terminal.SetActiveTicketID(0);

                    _kuyruk.terminal.SetTerminalState(Terminaller.TerminalDurum.Bosta);

                    NotifiyCurrentState("idled...", Color.Red);
                }
            }
        }