//For call event from Seller public void CallToQueue() { if (ToQueue == null) { System.Console.WriteLine("RIP event"); } ToQueue?.Invoke(this); }
//挂号 private void Register(object sender, RoutedEventArgs e) { if (PatientView.SelectedIndex == -1) { MessageBox.Show("请选中一个病人"); } else { try { NetworkWorker nw = new NetworkWorker(); ToQueue to = new ToQueue(); to.pId = patients[PatientView.SelectedIndex].patientID; to.queueId = firTreatId; string result = nw.Send_action(to); InitQueueInfo(); } catch { MessageBox.Show("服务器错误"); } } }
private void back_to_triage(object sender, RoutedEventArgs e) { if (Second_queue.SelectedIndex == -1) { MessageBox.Show("请选中一个病人"); } else { try { NetworkWorker nw = new NetworkWorker(); ToQueue to = new ToQueue(); to.pId = second[Second_queue.SelectedIndex].pId; to.queueId = dispatchTreatId; string result = nw.Send_action(to); refresh(); } catch { MessageBox.Show("服务器错误"); } } }
//报道 private void CheckIn(object sender, RoutedEventArgs e) { if (First_queue.SelectedIndex == -1) { MessageBox.Show("请选择病人"); } else { try { NetworkWorker nw = new NetworkWorker(); ToQueue to = new ToQueue(); to.pId = first[First_queue.SelectedIndex].pId; to.queueId = dispatchTreatId; string result = nw.Send_action(to); InitQueueInfo(); } catch { MessageBox.Show("服务器错误"); } } }
private void back_to_second(object sender, RoutedEventArgs e) { if (Watching_queue.SelectedIndex == -1) { MessageBox.Show("请选中一个病人"); } else { try { NetworkWorker nw = new NetworkWorker(); ToQueue to = new ToQueue(); to.pId = watching[Watching_queue.SelectedIndex].pId; to.queueId = secTreatId; string result = nw.Send_action(to); refresh(); SelectedOfficeList_Selected(null, null); } catch { MessageBox.Show("服务器错误"); } } }
private void leave(object sender, RoutedEventArgs e) { if (Finish_queue.SelectedIndex == -1) { MessageBox.Show("请选中一个病人"); } else { try { NetworkWorker nw = new NetworkWorker(); ToQueue to = new ToQueue(); to.pId = finish[Finish_queue.SelectedIndex].pId; to.queueId = ""; string result = nw.Send_action(to); SelectedOfficeList_Selected(null, null); } catch { MessageBox.Show("服务器错误"); } } }