async void SavedHandler(UIAlertAction obj)
 {
     NavigationItem.RightBarButtonItem.Enabled = false;
     try
     {
         await EntityPresenter.ValidateAndSave(Crud);
     }
     catch (CommunicationException)
     {
         AppDelegate.SharedAppDelegate.ShowErrorMessage(this, "Hiba történt a mentés során!");
     }
     catch (ValidationException ex)
     {
         AppDelegate.SharedAppDelegate.ShowErrorMessage(this, ex.Message, ex.Title);
     }
     finally
     {
         NavigationItem.RightBarButtonItem.Enabled = true;
     }
 }
        public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)
        {
            if (segue.Identifier == "NavigationSegue")
            {
                var vc = segue.DestinationViewController as NavigationsViewController;

                var index = TableView.IndexPathForSelectedRow.Row;

                vc.SelectedText    = EntityPresenter.GetNavigationTextSelected(index);
                vc.NonSelectedText = EntityPresenter.GetNavigationTextNonSelected(index);


                vc.Presenter = EntityPresenter;

                vc.Presenter.NavigationModels         = new List <List <NavigationModel> >(EntityPresenter.Model[1][TableView.IndexPathForSelectedRow.Row].ValueAsNavModels);
                vc.Presenter.FilteredNavigationModels = new List <List <NavigationModel> >();

                vc.Presenter.FilteredNavigationModels.Add(new List <NavigationModel>(vc.Presenter.NavigationModels[0]));
                vc.Presenter.FilteredNavigationModels.Add(new List <NavigationModel>(vc.Presenter.NavigationModels[1]));
            }
        }
        public async override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.

            SelectedRow = -1;

            EntityPresenter.AttachScreen(this);

            AddTableViewHeader(EntityPresenter.GetTableHeader(Crud));
            AddSaveButton();

            try
            {
                await EntityPresenter.SetDataFromServer(Crud);

                TableView.ReloadData();
            }
            catch (Exception ex)
            {
                AppDelegate.SharedAppDelegate.ShowErrorMessage(this, ex.Message);
            }
        }
        public override void ViewDidDisappear(bool animated)
        {
            base.ViewDidDisappear(animated);

            EntityPresenter.ClearModel();
        }