Example #1
0
        /// <summary>
        /// Updates the status item.
        /// </summary>
        /// <param name="args">The <see cref="TicketServer.Common.TicketEventArgs"/> instance containing the event data.</param>
        private void UpdateStatusItem(TicketEventArgs args)
        {
            TicketEventArgs e = (listBoxStatus.ItemsSource as ObservableCollection <TicketEventArgs>).First(a => a.Ticket.Id == args.Ticket.Id);

            e.Result = args.Result;
            return;
        }
Example #2
0
        /// <summary>
        /// Handles the TicketRequested event of the service control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void service_TicketRequested(object sender, EventArgs e)
        {
            TicketEventArgs args = e as TicketEventArgs;
            ObservableCollection <TicketEventArgs> list = listBoxStatus.ItemsSource as ObservableCollection <TicketEventArgs>;

            if (list.FirstOrDefault(a => a.Ticket.Id == args.Ticket.Id) == null)
            {
                Dispatcher.Invoke((Action) delegate() { list.Insert(0, e as TicketEventArgs); });
            }
            else
            {
                UpdateStatusItem(args);
            }
        }
Example #3
0
        /// <summary>
        /// Handles the TicketRedeemed event of the service control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void service_TicketRedeemed(object sender, EventArgs e)
        {
            TicketEventArgs args = e as TicketEventArgs;
            ObservableCollection <TicketEventArgs> list = listBoxStatus.ItemsSource as ObservableCollection <TicketEventArgs>;

            if (args.Ticket != null)
            {
                if (list.FirstOrDefault(a => a.Ticket.Id == args.Ticket.Id) == null)
                {
                    list.Insert(0, e as TicketEventArgs);
                }
                else
                {
                    UpdateStatusItem(args);
                }
            }
        }
 private void IMedicalCardView_DoctorSelect(object sender, TicketEventArgs e)
 {
     iMedicalCardView.SetPatients(medicalCardModel.GetTickets(e.DoctorsId, e.ChosenDate));
 }
Example #5
0
 private void TicketSaving(object sender, TicketEventArgs e)
 {
     Search.UpdateIndex(new[] { e.Ticket });
 }
Example #6
0
 private void ITicketOrderView_TicketOrder(object sender, TicketEventArgs e)
 {
     iTicketOrderFormModel.AddTicketToStorage(e.PatientsId, e.DoctorsId, Editor.ParseToDateTime(e.ChosenDate, e.ChosenTime));
 }