Exemple #1
0
        /*
         *
         * Collection fill callbacks and event handlers.
         *
         */
        public void FillApplicationCollection(ApplicationOrganizationItem[] applicationArray)
        {
            ApplicationCollection.Clear();
            foreach (ApplicationOrganizationItem item in applicationArray)
            {
                ApplicationCollection.Add(new ApplicationOrganizationVMItem(item));
            }

            SelectedApplication = ApplicationCollection.Count() > 0 ? ApplicationCollection[0] : null;
        }
Exemple #2
0
        public async void DeleteCommand()
        {
            //Request delete confirmation
            IDialogService dialogService = SimpleIoc.Default.GetInstance <IDialogService>();

            string[] buttonText = new string[] { "Ok", "Cancel" };

            int dialogResult = await dialogService.ShowMessageDialog("Delete \"" + SelectedApplication.Description + "\"?", "DELETE", buttonText);

            if (dialogResult == 0)
            {
                //Delete the application
                if (ApplicationCollection.Count() > 0)
                {
                    _dataService.DeleteApplication(SelectedApplication.GetApplicationItem());
                }
            }
        }