예제 #1
0
        private void AddTypeBtn_Click(object sender, RoutedEventArgs e)
        {
            InsTypeWindow instypeWindow = new InsTypeWindow();

            instypeWindow.InsTyp = "";
            instypeWindow.ShowDialog();
            UpdateInsTypeDG();
        }
예제 #2
0
        private void UpdateInsTypes()
        {
            try
            {
                int row = InsTypeDG.SelectedIndex;

                if (row != -1)
                {
                    var ci   = new DataGridCellInfo(InsTypeDG.Items[row], InsTypeDG.Columns[0]);
                    var crow = ci.Column.GetCellContent(ci.Item) as TextBlock;
                    var vrow = crow.Text;

                    InsTypeWindow instypeWindow = new InsTypeWindow();
                    instypeWindow.InsTyp = vrow;
                    instypeWindow.ShowDialog();
                    UpdateInsTypeDG();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }