Example #1
0
 public override async void LoadViewData ()
  {
     ShowBusyBox();
     try
     {
         await Task.Run(() =>
         {
             var rv =   mHelpMgmtService.GetHelpsByMangzhu();
             foreach(var item in rv)
             {
                 var help = new UIHelp()
                 {
                     Title = item.Title,
                     CreateTime = item.UpdatedTime,
                     Group = item.Group,
                     Id = item.Id, 
                     SortNum = item.SortNum,
                     HelpType = item.HelpType
                 };
                 this.Helps.Add(help);
             }
         });
         
     } catch(Exception e)
     { 
         e.Show();
     }
     CloseBusyBox();
  }
Example #2
0
        public async void OnNavigatedTo (NavigationContext navigationContext)
        {
            mIsCancelEdit = false; 
            Help   = navigationContext.Parameters[ParameterKeys.HELP ] as UIHelp;
            mIsAddnew = Help.Id == 0;
            if(mIsAddnew == false && Help.IsRtfDataLoaded == false)
            {
                ShowBusyBox();
                try
                {
                   Help.RtfData = await Task.Run<string>(() => { return mHelpService.GetHelpRtfData(Help.Id); });
                    
                    Help.IsRtfDataLoaded = true;
                } catch(Exception e)
                { 
                    e.Show();
                    mRegionManager.Regions[RegionNames.WORK_SPACE_REGION].RequestNavigate(typeof(HelpMgmtView).FullName);

                }
                CloseBusyBox();
            }
            Help.BeginEdit();
        }