Esempio n. 1
0
 public AddNewSectorViewModel(AddNewSectorView addNewSector)
 {
     this.addNewSector = addNewSector;
     Name        = string.Empty;
     Description = string.Empty;
     sector      = new tblSector();
 }
Esempio n. 2
0
        private void AddNewSectorExecute()
        {
            try
            {
                AddNewSectorView addNewSectorViewView = new AddNewSectorView();
                addNewSectorViewView.ShowDialog();

                if ((addNewSectorViewView.DataContext as AddNewSectorViewModel).IsAddedNewSector == true)
                {
                    Sectors = LoadSectors();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }