예제 #1
0
 public void GetJournalsByCropId(Action<List<JournalModel>> callback, int cropId)
 {
     ViewGetJournalsByCropId = callback;
     JournalRepository journalRepository = new JournalRepository();
     GetJournalsByCropIdCallback handler = new GetJournalsByCropIdCallback(GetJournalByCropIdCompleted);
     journalRepository.GetJournalsByCropId(new Action<List<JournalModel>>(handler), cropId);
 }
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string cropIdValue = NavigationContext.QueryString["parameter"];
            cropId = Int16.Parse(cropIdValue);

            JournalRepository journalRep = new JournalRepository();
            GetJournalsByCropIdCallback handler = new GetJournalsByCropIdCallback(GetJournalsByCropIdCompleted);
            journalRep.GetJournalsByCropId(new Action<List<JournalModel>>(handler), cropId);
        }