using System.Windows;
using System.Windows.Controls;
using RestClient.ViewModels;
namespace RestClient
{
public partial class MainPage : UserControl
{
MainViewModel _vm;
public MainPage()
{
InitializeComponent();
_vm = new MainViewModel();
DataContext = _vm;
_vm.LoadCustomers();
}
private void UpdateButton_Click(
object sender, RoutedEventArgs e)
{
_vm.UpdateSelectedCustomer();
}
private void DeleteButton_Click(
object sender, RoutedEventArgs e)
{
_vm.DeleteSelectedCustomer();
}
private void AddNewButton_Click(
object sender, RoutedEventArgs e)
{
_vm.AddNewLocalCustomer();
}
}
}