public CuUserPage(CommonDef.CuUserPageType cuUserPageType) { InitializeComponent(); this.cuUserPageType = cuUserPageType; SetView(); BindingContext = viewModel = new CuUserViewModel(cuUserPageType); }
public CuUserViewModel(CommonDef.CuUserPageType cuUserPageType) { NewUser = new User(); if (cuUserPageType == CommonDef.CuUserPageType.Change) { NewUser = UserController.LoginUser; } this.cuUserPageType = cuUserPageType; CuUserCommand = new Command(async() => await ExecuteCuUserCommand()); }