Exemplo n.º 1
0
        private void btnRegDt_Click(object sender, MouseButtonEventArgs e)
        {
            using (E2002_01P frmRegDt = new E2002_01P())
            {
                frmRegDt.ShowDialog();

                if (frmRegDt.IsSaved)
                {
                    StockList.Insert(0, frmRegDt.CurrentStock);

                    gridMain.View.FocusedRowHandle = 0;
                    gridMain.SelectedItem          = (gridMain.ItemsSource as ObservableCollection <EmsStock>)[0];

                    EmsStock target = gridMain.SelectedItem as EmsStock;

                    if (null != target)
                    {
                        CurrentStock = target;
                        SearchStockDetail(target.STOCK_INSP_DT);
                    }
                }
            }
        }