コード例 #1
0
        private void Update_Button_Click(object sender, RoutedEventArgs e)
        {
            //Update logic
            if (((SpaceEntity)SpaceDataGrid.SelectedItem) != null)
            {
                if (SpaceDataGrid.SelectedItems.Count == 1)
                {
                    for (int i = 0; i < SpaceDataGrid.SelectedItems.Count; i++)
                    {
                        AddUpdateSpaceWindow window = new AddUpdateSpaceWindow((SpaceEntity)SpaceDataGrid.SelectedItems[i]);
                        window.ShowDialog();
                    }
                }
                else
                {
                    MessageBox.Show("Please select one space and try again.", "Info:");
                }
            }
            else
            {
                MessageBox.Show("Please select one space and try again.", "Info:");
            }

            RefreshDataGrid();
        }
コード例 #2
0
        private void Add_Button_Click(object sender, RoutedEventArgs e)
        {
            //Add logic
            AddUpdateSpaceWindow window = new AddUpdateSpaceWindow();

            window.ShowDialog();
            RefreshDataGrid();
        }