Ejemplo n.º 1
0
        private void saveButton_Click(object sender, RoutedEventArgs e)
        {
            UISpec.ID = uint.Parse(ComSpecID.Text);

            try
            {
                switch (specUC_State)
                {
                case State.createNew:
                    BE.Specialization addSpec = new BE.Specialization();
                    Globals.CopyObject(UISpec, addSpec);
                    BL_Object.addSpecialization(addSpec);
                    Spec_DS_Change_Event?.Invoke();
                    break;

                case State.modify:
                    BL_Object.updateSpecilization(UISpec);
                    Spec_DS_Change_Event?.Invoke();
                    break;
                }

                Spec_DS_Change_Event?.Invoke(); // refreshes combobox as well
                restoreButtonVisib();
            }
            catch (Exception ex) { Globals.exceptionHandler(ex); }
        }
Ejemplo n.º 2
0
 private void deleteButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         BL_Object.deleteSpecilization(UISpec);
         Spec_DS_Change_Event?.Invoke();
     }
     catch (Exception ex) { Globals.exceptionHandler(ex); }
 }