예제 #1
0
파일: TileObject.cs 프로젝트: bdecori/win8
        public async Task<bool> UpdateAllTiles()
        {
            TaskingObject to = new TaskingObject();
            UnityDataAccess uda = new UnityDataAccess();

            if (string.IsNullOrEmpty(objUnityData.Token))
                objUnityData.Token = await uda.GetToken(objUnityData.UnitySvcUser,objUnityData.UnitySvcPwd,objUnityData.UnityAppName);

            return await to.ProcessTaskTileUpdates(objUnityData.UnityAppUser);

        
        }
예제 #2
0
파일: Tasks.xaml.cs 프로젝트: bdecori/win8
           private async void PopulateTaskList()
          {
           
              TaskingObject to = new TaskingObject();
                            
              TaskList = await to.GetTaskListItemsForBinding(objUnityData.UnityAppUser);

              List<GetTaskItem> lviUrgent = new List<GetTaskItem>();
              List<GetTaskItem> lviNonUrgent = new List<GetTaskItem>();

         
              foreach (GetTaskItem gti in TaskList)
              {
                  if (gti.TaskPriority.ToLower() == "urgent")
                  {
                      lviUrgent.Add(gti);
                      UrgentTaskCount++;
                     
                  }
                  else
                  {
                      lviNonUrgent.Add(gti);
                      NonUrgentTaskCount++;
                  }
              }

               tbAll.Text = "All("+((UrgentTaskCount + NonUrgentTaskCount).ToString()) + ")";
               tbUrgent.Text = "Urgent("+UrgentTaskCount.ToString() + ")";
               tbNonUrgent.Text = "Non-Urgent(" + NonUrgentTaskCount.ToString() + ")";

              GenerateStackPanels(lviUrgent,"Urgent");
              GenerateStackPanels(lviNonUrgent,"Non-Urgent");

        
             
            

          }
예제 #3
0
        private async void LoadTaskDetail(PageNavigationParams pnp)
        {
          
       
            //we will use this for the prev, next transitions.
            TaskList = pnp.ObjectData as List<GetTaskItem>;

            SetPrevNext(pnp.TransID);

            NikeCommonObjects.TaskingObject to = new NikeCommonObjects.TaskingObject();

            GetTaskItem tli = await to.GetTaskListDetailItemForBinding(objUnityData.UnityAppUser, pnp.TransID);
            
            if (string.IsNullOrEmpty(tli.lastname.Trim()))
            {
                pageTitle.Text = pnp.TaskName;
            }
            else
            {
                pageTitle.Text = pnp.TaskName + " for " + tli.lastname + ", " + tli.firstname;

            }
            switch (tli.Infotype.ToLower())
            {
                case "rtf":
                  
                    reb.Visibility = Windows.UI.Xaml.Visibility.Visible;
                    reb.Document.SetText(Windows.UI.Text.TextSetOptions.FormatRtf,tli.TaskInfo);
                
                    break;
                case "html":
                    wvDetail.Visibility = Windows.UI.Xaml.Visibility.Visible;
                    wvDetail.NavigateToString(tli.TaskInfo);
                    break;
                case "txt":
                default:
                    tbDetail.Visibility = Windows.UI.Xaml.Visibility.Visible;
                    tbDetail.Text = tli.TaskInfo;
         
                    break;
            }
            
             //save the buttons / taskid for use in another function.
            this.Workobject = tli.workobject;
            AddBottomBarButtons(tli.Buttons);

           

            }