private void btnShowDetails_Click(object sender, RoutedEventArgs e)
 {
     this.Cursor = Cursors.Wait;
     Window mainWindow = FindRootParent((FrameworkElement)this.Parent);
     ((Storyboard)mainWindow.Resources["StoryboardFadeOut"]).Begin(mainWindow);
     Button btn = (Button)sender;
     DataRowView selectedRow = (DataRowView)btn.Tag;
     OrdersGridView.SelectedItem = selectedRow;
     Int64 orderNo = (Int64)selectedRow["OrderNo"];
     string tableNo = selectedRow["TableNo"].ToString();
     Byte state = (Byte)selectedRow["State"];
     OrderDetailInCashierWindow objOrderDetailInCashierWindow = new OrderDetailInCashierWindow(orderNo, tableNo,state);
     objOrderDetailInCashierWindow.Owner = mainWindow;
     bool? dg = objOrderDetailInCashierWindow.ShowDialog();
     this.Cursor = Cursors.Wait;
     if (dg == true)
     {
         FilterTextBox.Text = "";
         LoadOrders();
         try
         {
             TablesStatusUserControl ts = (TablesStatusUserControl)mainWindow.FindName("TablesStatus");
             ts.GetAllTables();
         }
         catch (Exception)
         {
             //Unable to refresh the tables list.
         }
     }
     ((Storyboard)mainWindow.Resources["StoryboardFadeIn"]).Begin(mainWindow);
     this.Cursor = Cursors.Arrow;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.Window = ((Restaurant.OrderDetailInCashierWindow)(target));
     
     #line 8 "..\..\OrderDetailInCashierWindow.xaml"
     this.Window.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseLeftButtonDown);
     
     #line default
     #line hidden
     
     #line 8 "..\..\OrderDetailInCashierWindow.xaml"
     this.Window.Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
     
     #line default
     #line hidden
     
     #line 8 "..\..\OrderDetailInCashierWindow.xaml"
     this.Window.Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.rectOuter = ((System.Windows.Shapes.Rectangle)(target));
     return;
     case 4:
     this.rectInner = ((System.Windows.Shapes.Rectangle)(target));
     return;
     case 5:
     this.txbTableNoHeader = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 6:
     this.txbOrderNoHeader = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 7:
     this.txbWindowTitle = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 8:
     this.borderOrderNo = ((System.Windows.Controls.Border)(target));
     
     #line 317 "..\..\OrderDetailInCashierWindow.xaml"
     this.borderOrderNo.MouseEnter += new System.Windows.Input.MouseEventHandler(this.borderOrderNo_MouseEnter);
     
     #line default
     #line hidden
     return;
     case 9:
     this.txbOrderNo = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 10:
     this.borderTableNo = ((System.Windows.Controls.Border)(target));
     return;
     case 11:
     this.txbTableNo = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 12:
     this.MainGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 13:
     this.leftBorder = ((System.Windows.Controls.Border)(target));
     return;
     case 14:
     this.expanderCheckOut = ((System.Windows.Controls.Expander)(target));
     return;
     case 15:
     this.ExpanderContent = ((System.Windows.Controls.Border)(target));
     return;
     case 16:
     this.txbTotalPrice = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 17:
     this.txbCustomerName = ((System.Windows.Controls.TextBox)(target));
     return;
     case 18:
     this.btnCheckOut = ((System.Windows.Controls.Button)(target));
     
     #line 337 "..\..\OrderDetailInCashierWindow.xaml"
     this.btnCheckOut.Click += new System.Windows.RoutedEventHandler(this.btnCheckOut_Click);
     
     #line default
     #line hidden
     return;
     case 19:
     this.expanderCancelOrder = ((System.Windows.Controls.Expander)(target));
     return;
     case 20:
     this.ExpanderContent_Copy = ((System.Windows.Controls.Border)(target));
     return;
     case 21:
     this.txbCancelReason = ((System.Windows.Controls.TextBox)(target));
     return;
     case 22:
     this.btnCancelOrder = ((System.Windows.Controls.Button)(target));
     
     #line 346 "..\..\OrderDetailInCashierWindow.xaml"
     this.btnCancelOrder.Click += new System.Windows.RoutedEventHandler(this.btnCancelOrder_Click);
     
     #line default
     #line hidden
     return;
     case 23:
     this.borderOrder = ((System.Windows.Controls.Border)(target));
     return;
     case 24:
     this.OrderGridView = ((Restaurant.SortableListView)(target));
     return;
     case 25:
     this.btnClose = ((System.Windows.Controls.Button)(target));
     return;
     case 26:
     this.btnPrint = ((System.Windows.Controls.Button)(target));
     
     #line 394 "..\..\OrderDetailInCashierWindow.xaml"
     this.btnPrint.Click += new System.Windows.RoutedEventHandler(this.btnPrint_Click);
     
     #line default
     #line hidden
     return;
     case 27:
     this.PopUpSelectOrder = ((System.Windows.Controls.Primitives.Popup)(target));
     
     #line 395 "..\..\OrderDetailInCashierWindow.xaml"
     this.PopUpSelectOrder.MouseLeave += new System.Windows.Input.MouseEventHandler(this.PopUpSelectOrder_MouseLeave);
     
     #line default
     #line hidden
     return;
     case 28:
     this.cmbOrderNo = ((System.Windows.Controls.ComboBox)(target));
     
     #line 398 "..\..\OrderDetailInCashierWindow.xaml"
     this.cmbOrderNo.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cmbOrderNo_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 29:
     this.gridLocker = ((System.Windows.Controls.Grid)(target));
     return;
     case 30:
     this.txbLockerHeader = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 31:
     this.txbLocker = ((System.Windows.Controls.TextBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }