Пример #1
0
        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);
        }
Пример #2
0
        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);
        }