Example #1
0
 private void DoCategoryTypeSearch()
 {
     if (this.m_CategorySearchType == "Not Acknowledged")
     {
         MethodResult methodResult = DistributionLogCollection.GetByNotAcknowledged();
         if (methodResult.Success == true)
         {
             this.m_DistributionLog = (DistributionLogCollection)methodResult.Result;
             this.NotifyPropertyChanged(string.Empty);
         }
         else
         {
             methodResult.ShowMethodResult();
         }
     }
     else if (this.m_CategorySearchType == "Recent Cases")
     {
         MethodResult methodResult = DistributionLogCollection.GetByRecentCases();
         if (methodResult.Success == true)
         {
             this.m_DistributionLog = (DistributionLogCollection)methodResult.Result;
             this.NotifyPropertyChanged(string.Empty);
         }
         else
         {
             methodResult.ShowMethodResult();
         }
     }
     else if (this.m_CategorySearchType == "Detected COVID Cases")
     {
         MethodResult methodResult = DistributionLogCollection.GetByDetectedCOVIDCases();
         if (methodResult.Success == true)
         {
             this.m_DistributionLog = (DistributionLogCollection)methodResult.Result;
             this.NotifyPropertyChanged(string.Empty);
         }
         else
         {
             methodResult.ShowMethodResult();
         }
     }
 }
Example #2
0
        private void MenuItemAcknowledge_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewReportDistributionLog.SelectedItems.Count > 0)
            {
                JArray idList = new JArray();
                foreach (DistributionLog distributionLog in this.ListViewReportDistributionLog.SelectedItems)
                {
                    idList.Add(distributionLog.TestOrderReportDistributionId);
                }

                JObject   jsonRequest = APIRequestHelper.GetAcknowledgeDistributionsMessage(idList);
                APIResult apiResult   = APIRequestHelper.SubmitAPIRequestMessage(jsonRequest);

                MethodResult methodResult = DistributionLogCollection.GetByNotAcknowledged();
                if (methodResult.Success == true)
                {
                    this.m_DistributionLog = (DistributionLogCollection)methodResult.Result;
                    this.NotifyPropertyChanged(string.Empty);
                }
            }
        }