コード例 #1
0
ファイル: FrmVirtualTerminal.cs プロジェクト: realyemin/omes
 private void BtnReCallTicket_Click(object sender, EventArgs e)
 {
     if (LblTicketNo.Tag != null)
     {
         TCPIPCommunicating.ReCallTicket(int.Parse(LblTicketNo.Tag.ToString()), _kuyruk.terminal.ElTerminalID);
     }
 }
コード例 #2
0
ファイル: Kuyruk.cs プロジェクト: realyemin/omes
        public void CallTicketManuel(int _TicketNo, int _TicketID, int _GrupID, bool _IsTransfer, bool _IsFiktif, bool _IsAssistGroup, bool _IsMainGroup)
        {
            BiletId         = _TicketID;
            BiletNo         = _TicketNo;
            Fiktif          = _IsFiktif;
            GrupId          = _GrupID;
            Transfer        = _IsTransfer;
            YardimGrubundan = _IsAssistGroup;
            var ticketHasMainGroups = _IsMainGroup;

            var callingSuccess = TCPIPCommunicating.CallTicket(BiletNo, terminal.ElTerminalID);

            if (!callingSuccess)
            {
                if (TicketCallingFalied != null)
                {
                    TicketCallingFalied();
                }
                return;
            }

            PopQueue();
            var currentTicket = new Bilet {
                TerminalID = terminal.TID, IslemBaslangicSaati = DateTime.Now
            };

            currentTicket.SetTicketOnProcess(BiletId);
            terminal.SetActiveTicketID(BiletId);
            terminal.SetTerminalState(Terminaller.TerminalDurum.MusteriIleMesgul);

            if (NextTicketDetected != null)
            {
                NextTicketDetected(new NextTicketDetectedEventArgs(this));
            }

            if (!ticketHasMainGroups)
            {
                return;
            }

            if (!Transfer)
            {
                terminal.ToIncreaseOrResetCallRatio(terminal.TID, GrupId);
            }
            else
            {
                terminal.ToIncreaseOrResetTransferRatio(terminal.TID, GrupId);
            }

            if (!YardimGrubundan)
            {
                terminal.SetLastCallingGroup(terminal.TID, GrupId, Transfer);
            }
        }
コード例 #3
0
ファイル: FrmVirtualTerminal.cs プロジェクト: realyemin/omes
        private void kuyruk_NotTicketDetected()
        {
            LblWaitingTickets.Text = "0";
            SetWaitingLamb();
            SetEnabledForTransferControls(false);
            TmrOtoTicketCall.Start();
            TmrTicketProcessCounter.Stop();

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

            LblTicketNo.Tag = null;
            TCPIPCommunicating.NotExistWaitingResponse(_kuyruk.terminal.ElTerminalID);
        }
コード例 #4
0
ファイル: FrmLogin.cs プロジェクト: realyemin/omes
 private void FrmLogin_Shown(object sender, EventArgs e)
 {
     if (!TCPIPCommunicating.CheckQPUServer())
     {
         MessageBox.Show(
             string.Format("{0}{1}{2}{1}{3}", "The QPU Server cannot be get at.",
                           Environment.NewLine,
                           "Ensure that the Server program is running and restart the virtual terminal software.",
                           "The virtual terminal will now be closed."),
             Settings.MessageBoxTitle,
             MessageBoxButtons.OK,
             MessageBoxIcon.Warning
             );
         v_bl_LoginState = false;
         this.Close();
     }
 }
コード例 #5
0
ファイル: Kuyruk.cs プロジェクト: realyemin/omes
        private void CallTicket()
        {
            var callingSuccess = TCPIPCommunicating.CallTicket(BiletNo, terminal.ElTerminalID);

            if (!callingSuccess)
            {
                TicketCallingFalied.Invoke();
                return;
            }

            PopQueue();
            var currentTicket = new Bilet {
                TerminalID = terminal.TID, IslemBaslangicSaati = DateTime.Now
            };

            currentTicket.SetTicketOnProcess(BiletId);
            terminal.SetActiveTicketID(BiletId);
            terminal.SetTerminalState(Terminaller.TerminalDurum.MusteriIleMesgul);

            if (!Transfer)
            {
                terminal.ToIncreaseOrResetCallRatio(terminal.TID, GrupId);
            }
            else
            {
                terminal.ToIncreaseOrResetTransferRatio(terminal.TID, GrupId);
            }

            if (!YardimGrubundan)
            {
                terminal.SetLastCallingGroup(terminal.TID, GrupId, Transfer);
            }

            if (NextTicketDetected != null)
            {
                NextTicketDetected(new NextTicketDetectedEventArgs(this));
            }
        }
コード例 #6
0
ファイル: FrmVirtualTerminal.cs プロジェクト: realyemin/omes
        private void BtnMola_Click(object sender, EventArgs e)
        {
            TmrOtoTicketCall.Stop();
            //TmrWaitingCountRefresh.Stop();
            if (!_startCoffeeBreak.Molada)
            {
                _startCoffeeBreak.PersonelID    = SanalTerminal.PersonelID;
                _startCoffeeBreak.MolaBaslangic = DateTime.Now;
                _startCoffeeBreak.LetsCoffeeBreak();

                TCPIPCommunicating.MakeLineOnDisplay(_kuyruk.terminal.ElTerminalID);

                if (Thread.CurrentThread.CurrentUICulture.Name == "tr-TR")
                {
                    NotifiyCurrentState("Molada...", Color.Red);
                }
                else
                {
                    NotifiyCurrentState("Takes Break...", Color.Red);
                }
                BtnMola.BackColor = Color.OrangeRed;
                BtnMola.FlatAppearance.BorderColor        = SystemColors.InactiveBorder;
                BtnMola.FlatAppearance.MouseDownBackColor = Color.Orange;
                BtnMola.FlatAppearance.MouseOverBackColor = Color.DarkOrange;
                ToolTipForProcess.SetToolTip(BtnMola, "End Break");

                SetEnabledCommonControls(false);
                BtnOutOfService.BackColor = SystemColors.InactiveBorder;
                BtnOutOfService.Enabled   = false;
                if (!string.IsNullOrEmpty(LblTicketNo.Text))
                {
                    _kuyruk.HasNotTicket();
                    ClearTicketInf();
                    TmrTicketProcessCounter.Stop();
                }

                _kuyruk.terminal.SetTerminalState(Terminaller.TerminalDurum.Molada);
            }
            else
            {
                _startCoffeeBreak.MolaBitis = DateTime.Now;
                _startCoffeeBreak.DoneCoffeeBreak();

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

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

                NotifiyCurrentState("idled...", Color.Red);
                BtnMola.BackColor = SystemColors.InactiveCaption;
                BtnMola.FlatAppearance.BorderColor        = SystemColors.ActiveCaption;
                BtnMola.FlatAppearance.MouseDownBackColor = Color.SkyBlue;
                BtnMola.FlatAppearance.MouseOverBackColor = SystemColors.GradientInactiveCaption;
                ToolTipForProcess.SetToolTip(BtnMola, "Start Break");

                TmrOtoTicketCall.Start();

                SetEnabledCommonControls(true);
                BtnOutOfService.BackColor = SystemColors.InactiveCaption;
                BtnOutOfService.Enabled   = true;
                DGVTicketLists.DataSource = GetAllTickets("");
            }
        }
コード例 #7
0
ファイル: FrmVirtualTerminal.cs プロジェクト: realyemin/omes
        private void BtnOutOfService_Click(object sender, EventArgs e)
        {
            TmrOtoTicketCall.Stop();
            //TmrWaitingCountRefresh.Stop();
            if (_closeAndOpenService.ServisDisi)
            {
                _closeAndOpenService.ServisAcmaTarihi = DateTime.Now;
                _closeAndOpenService.OpenService();

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

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

                NotifiyCurrentState("Boşta...", Color.Red);
                BtnOutOfService.BackColor = SystemColors.InactiveCaption;
                BtnOutOfService.FlatAppearance.BorderColor        = SystemColors.ActiveCaption;
                BtnOutOfService.FlatAppearance.MouseDownBackColor = Color.SkyBlue;
                BtnOutOfService.FlatAppearance.MouseOverBackColor = SystemColors.GradientInactiveCaption;

                TmrOtoTicketCall.Start();
                SetEnabledCommonControls(true);
                BtnMola.BackColor         = SystemColors.InactiveCaption;
                BtnMola.Enabled           = true;
                DGVTicketLists.DataSource = GetAllTickets("");
                return;
            }


            string outOfReason          = string.Empty;
            WOutOfServiceReason outOfIT = new WOutOfServiceReason();

            if (outOfIT.ShowDialog() == DialogResult.OK)
            {
                _closeAndOpenService.KapatmaSebebi       = outOfIT.TxtBxReason.Text.Trim();
                _closeAndOpenService.ServisKapatmaTarihi = DateTime.Now;
                _closeAndOpenService.CloseService();


                TCPIPCommunicating.MakeLineOnDisplay(_kuyruk.terminal.ElTerminalID);
                if (Thread.CurrentThread.CurrentUICulture.Name == "tr-TR")
                {
                    NotifiyCurrentState("Servis Dışı...", Color.OrangeRed);
                }
                else
                {
                    NotifiyCurrentState("Out Of Order...", Color.OrangeRed);
                }
                BtnOutOfService.BackColor = Color.OrangeRed;
                BtnOutOfService.FlatAppearance.BorderColor        = SystemColors.InactiveBorder;
                BtnOutOfService.FlatAppearance.MouseDownBackColor = Color.Orange;
                BtnOutOfService.FlatAppearance.MouseOverBackColor = Color.DarkOrange;

                SetEnabledCommonControls(false);
                BtnMola.BackColor = SystemColors.InactiveBorder;
                BtnMola.Enabled   = false;

                if (!string.IsNullOrEmpty(LblTicketNo.Text))
                {
                    _kuyruk.HasNotTicket();
                    ClearTicketInf();
                    TmrTicketProcessCounter.Stop();
                }

                _kuyruk.terminal.SetTerminalState(Terminaller.TerminalDurum.ServisDisi);
            }
            else
            {
            }
        }
コード例 #8
0
ファイル: FrmVirtualTerminal.cs プロジェクト: realyemin/omes
        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);
                }
            }
        }