Beispiel #1
0
 private void btnWorkypeSave_Click(object sender, EventArgs e)
 {
     if (tbWorktypesName.Text == "" || tbWorktypesName.Text == null)
     {
         MessageBox.Show("Work type's name couldn't be empty!");
         return;
     }
     editedWorkType.Name = tbWorktypesName.Text;
     editedWorkType.Save();
     UpdateLists();
 }
Beispiel #2
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();
            }
        }