private void AbortBtn_Click(object sender, RoutedEventArgs e) { if (PasswdTB.Password.Equals(ConfigurationManager.AppSettings["OrderAbortPasswd"])) { OrderService service = new OrderService(); bool result = service.ChangeOrderItemState(OrderLab.Content.ToString(), OrderItemState.MANUAL_ABORTED).Result; if (result) { MsgLabel.Content = "Abort Success!"; MessageBox.Show("Abort Success! Next Order is Loaded!"); this.Close(); mc.LoadCheck(); } else { MsgLabel.Content = "Fail! Please contact IT"; } } else { MsgLabel.Content = "Password Error!"; } }