Example #1
0
        private void OnClickNew(object sender, RoutedEventArgs e)
        {
            WorkType workType = new WorkType();

            Windows.Adds.WindowAddWorkType window = new Adds.WindowAddWorkType(workType);
            if (window.ShowDialog() == true)
            {
                list.Add(workType);
                workType.Save();
            }
        }
Example #2
0
        private void OnEditing(object sender, RoutedEventArgs e)
        {
            if (data.SelectedItem == null)
            {
                return;
            }
            WorkType workType = list[data.SelectedIndex];

            Windows.Adds.WindowAddWorkType window = new Adds.WindowAddWorkType(workType);
            if (window.ShowDialog() == true)
            {
                workType.Update();
            }
        }