Exemple #1
0
        private void NextTask_Click_1(object sender, RoutedEventArgs e)
        {
            PageNavigationParams pnp = new PageNavigationParams();
            pnp.TransID = TaskList[TaskListIndex + 1].transid;
            pnp.TaskName = TaskList[TaskListIndex + 1].TaskType;
            pnp.ObjectData = TaskList;

            LoadTaskDetail(pnp);
        }
Exemple #2
0
          private void main_Tapped(object sender, TappedRoutedEventArgs e)
          {
          
              if (e.OriginalSource.GetType() == typeof(TextBlock))
              {
                  TextBlock tb = e.OriginalSource as TextBlock;
                  Grid g = tb.Parent as Grid;
                  TaskItemControl tic = g.Parent as TaskItemControl;

                
                  PageNavigationParams pnp = new PageNavigationParams();
                  pnp.TransID = tic.Item.transid;
                   pnp.TaskName = tic.Item.TaskType;
                   pnp.ObjectData = TaskList;

                  Frame.Navigate(typeof(TasksDetail), pnp);
              }
          }
Exemple #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);

           

            }