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); } }
protected override void OnCreateInitialize() { IsAnimated = true; presenter = new AdminConsultantsPresenter(this); // create session sa pagvi-view ng consultant profile viewConSession = SessionFactory.CreateSession <ConsultantSession>(SessionKeys.AdminConsultantsKey); }
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); }
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; }