示例#1
0
 public AddNewSectorViewModel(AddNewSectorView addNewSector)
 {
     this.addNewSector = addNewSector;
     Name        = string.Empty;
     Description = string.Empty;
     sector      = new tblSector();
 }
示例#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());
            }
        }