public async Task LoadSession()
        {
            if (CacheProvider.IsSet(CacheKey.LoggedConsultant))
            {
                consultant = CacheProvider.Get <Consultant> (CacheKey.LoggedConsultant);
                return;
            }

            ConsultantSession conSession =
                SessionFactory.ReadSession <ConsultantSession>(SessionKeys.LoggedConsultant);

            // may consultant session na, so kunin nalang natin ung info nya.
            if (conSession != null && conSession.IsSet)
            {
                consultant = await conService.GetConsultantByUsername(conSession.Username);
            }

            // i-load muna ung consultant session from account session
            ConsultantSessionLoader conLoader = new ConsultantSessionLoader(conService);
            bool isLoaded = await conLoader.LoadConsultantSession();

            if (isLoaded)
            {
                consultant = conLoader.LoadedConsultant;
                CacheProvider.Set(CacheKey.LoggedConsultant, consultant);
            }
        }
Example #2
0
        protected override void OnCreateInitialize()
        {
            IsAnimated = true;

            presenter = new AdminConsultantsPresenter(this);

            // create session sa pagvi-view ng consultant profile
            viewConSession = SessionFactory.CreateSession <ConsultantSession>(SessionKeys.AdminConsultantsKey);
        }
Example #3
0
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your fragment here
            presenter = new AdminConsultantProfileAboutPresenter(this);

            // read natin ung session sa pagviview ng client profile
            viewConSession = SessionFactory.ReadSession <ConsultantSession> (SessionKeys.AdminConsultantsKey);      //(AdminConsultantsView.SessionKey);
        }
Example #4
0
        protected override void OnCreateInitialize()
        {
            IsAnimated = true;

            presenter = new AdminConsultantProfileClientsPresenter(this);

            // session sa pagvi-view ng profiles
            // create ng session para sa i-vi-view na client for the selected consultant
            viewConSession = SessionFactory.ReadSession <ConsultantSession>(SessionKeys.AdminConsultantsKey);
            viewCliSession = SessionFactory.CreateSession <ClientSession>(SessionKeys.AdminConsultantProfileClientsKey);
        }
        public async Task LoadSession()
        {
            ConsultantSession conSession =
                SessionFactory.ReadSession <ConsultantSession>(SessionKeys.LoggedConsultant);

            // may consultant session na, so kunin nalang natin ung info nya.
            if (conSession != null && conSession.IsSet)
            {
                consultant = await conService.GetConsultantByUsername(conSession.Username);
            }

            // i-load muna ung consultant session from account session
            ConsultantSessionLoader conLoader = new ConsultantSessionLoader(conService);
            bool isLoaded = await conLoader.LoadConsultantSession();

            if (isLoaded)
            {
                consultant = conLoader.LoadedConsultant;
            }

            // pag may laman, may na-load kaya !=
//            return consultant != null;
        }