public LoginViewModel(IQuanLyService quanlyService, IPageService pageService) { _quanlyService = quanlyService; _pageService = pageService; LoginCommand = new Command(async() => await Login()); QuanLy = new QuanLy(); }
/// <summary>Initializes service, command.</summary> /// <param name="congnhanService">The congnhan service.</param> /// <param name="pageService">The page service.</param> /// <Modified> /// Name Date Comments /// quangnt2 16/03/2020 created /// </Modified> public DSQuanLyViewModel(IQuanLyService quanlyService, IPageService pageService) { _quanlyService = quanlyService; _pageService = pageService; _isDataLoaded = false; LoadDataCommand = new Command(async() => await LoadData()); AddQuanLyCommand = new Command(async() => await AddData()); FindQuanLyCommand = new Command <string>(async c => await FindQuanLy(c)); QuanLy = new QuanLy(); }
public ThongTinTKViewModel(IQuanLyService quanlyService, IPageService pageService) { _quanlyService = quanlyService; _pageService = pageService; var account = AccountStore.Create().FindAccountsForService(Events.AppName).FirstOrDefault(); QuanLy = new QuanLy(); if (account != null) { var data = _quanlyService.GetQuanLy(account.Username); QuanLy.UserName = data.Result.UserName; QuanLy.Password = data.Result.Password; } LogoutCommand = new Command(async() => await Logout()); }
public QuanLyController(IQuanLyService quanLyService) { _quanLyService = quanLyService; }