protected void dispatcherTimer_Tick(object sender, EventArgs e) { if (bLoaded == true) { int i = BLVoucher.GetCurrentRowIndex(GridTable, "TableID"); LoadSimple(); GridTable.FocusRowHandle(i); } }
private void tsbAdd_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) { D05F2011 frm = new D05F2011(); frm.WindowStartupLocation = WindowStartupLocation.CenterScreen; frm.ShowDialog(); LoadSimple(); GridTable.FocusRowHandle(GridTable.ReturnVisibleRowCount - 1); }
private void mnsAdd_Click(object sender, RoutedEventArgs e) { D05F2140 frmTable = LoadD05F2140(); int i = GridTable.View.FocusedRowData.RowHandle.Value; frmTable.WindowStartupLocation = WindowStartupLocation.CenterScreen; frmTable.ShowDialog(); LoadSimple(); GridTable.FocusRowHandle(i); }
private void tsbDelete_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) { try { string TableID = GridTable.GetFocusedRowCellValue("TableID").ToString(); BLTable.DeleteTable(TableID); LoadSimple(); GridTable.FocusRowHandle(GridTable.ReturnVisibleRowCount - 1); } catch (NullReferenceException) { System.Windows.MessageBox.Show("Lỗi không thể xóa được bảng trống"); } }
private void mnsRead_Click(object sender, RoutedEventArgs e) { D05F2140 frmTable = LoadD05F2140(); int i = GridTable.View.FocusedRowData.RowHandle.Value; frmTable.btnSave.Visibility = Visibility.Hidden; frmTable.btnPay.Visibility = Visibility.Hidden; frmTable.btnAdd10Quatity.Visibility = Visibility.Hidden; frmTable.btnAddQuatity.Visibility = Visibility.Hidden; frmTable.btnDeleteQuatity.Visibility = Visibility.Hidden; frmTable.txtItem.IsEnabled = false; frmTable.WindowStartupLocation = WindowStartupLocation.CenterScreen; frmTable.ShowDialog(); LoadSimple(); GridTable.FocusRowHandle(i); }
private void tsbEdit_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) { D05F2011 frm = new D05F2011(); int i = 0; try { frm.TableID = GridTable.GetFocusedRowCellValue("TableID").ToString(); i = GridTable.View.FocusedRowData.RowHandle.Value; } catch (Exception) { System.Windows.MessageBox.Show("Chọn 1 dòng để sửa không phải dòng này!"); } frm.FormState = Lemon3.EnumFormState.FormEdit; frm.WindowStartupLocation = WindowStartupLocation.CenterScreen; frm.ShowDialog(); LoadSimple(); GridTable.FocusRowHandle(i); }