Пример #1
0
        public LoginViewModel(IQuanLyService quanlyService, IPageService pageService)
        {
            _quanlyService = quanlyService;
            _pageService   = pageService;

            LoginCommand = new Command(async() => await Login());
            QuanLy       = new QuanLy();
        }
Пример #2
0
        /// <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();
        }
Пример #3
0
        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());
        }
Пример #4
0
 public QuanLyController(IQuanLyService quanLyService)
 {
     _quanLyService = quanLyService;
 }