public BranchListPage(Models.App app)
        {
            InitializeComponent();

            // Disable selection on BranchListView items
            BranchListView.ItemSelected += (sender, args) => ((ListView)sender).SelectedItem = null;

            BindingContext = new BranchListViewModel(app);

            // Subscribe to connection error message from the viewModel
            MessagingCenter.Subscribe <BranchListViewModel>(this, Messages.ApiConnectionError, OnApiConnectionError);
        }
Exemplo n.º 2
0
        public AppAddOrUpdateResponseDto AddOrUpdate(AppAddOrUpdateRequestDto request)
        {
            var entity = _repository.GetAll()
                         .FirstOrDefault(x => x.Id == request.Id && x.IsDeleted == false);

            if (entity == null)
            {
                _repository.Add(entity = new Models.App());
            }
            entity.Name = request.Name;
            _uow.SaveChanges();
            return(new AppAddOrUpdateResponseDto(entity));
        }
Exemplo n.º 3
0
 public static void Main() {
     Models.App app = new Models.App();
     app.InitializeComponent();
     app.Run();
 }
Exemplo n.º 4
0
 public AppViewModel(Models.App app)
 {
     _app = app;
 }
Exemplo n.º 5
0
 public AppAddOrUpdateResponseDto(Models.App entity)
     : base(entity)
 {
 }
Exemplo n.º 6
0
 public AppDto(Models.App entity)
 {
     Id   = entity.Id;
     Name = entity.Name;
 }