コード例 #1
0
 /// <summary>
 /// Stores the case variable as a friendly string and the html command to change it (Ex. "Area1", &sArea=)
 /// </summary>
 /// <param name="inputXml"></param>
 /// <param name="tag"></param>
 /// <returns></returns>
 private CaseProperty setCaseTagValueString(XElement inputXml, string tag)
 {
     if (inputXml.Elements().Where(x => x.Name.LocalName == tag).FirstOrDefault()?.Value != null)
     {
         var cp = new CaseProperty();
         cp.HtmlHeader = '&' + tag + '=';
         cp.Value      = inputXml.Elements().Where(x => x.Name.LocalName == tag).FirstOrDefault()?.Value;
         return(cp);
     }
     else
     {
         return(new CaseProperty());
     }
 }
コード例 #2
0
 public Case(XElement inputXml)
 {
     Area                         = setCaseTagValueString(inputXml, CaseHtmlValue.Area);
     AreaId                       = setCaseTagValueString(inputXml, CaseHtmlValue.AreaId);
     Category                     = setCaseTagValueString(inputXml, CaseHtmlValue.Category);
     CategoryId                   = setCaseTagValueString(inputXml, CaseHtmlValue.CategoryId);
     Children                     = setCaseTagValueString(inputXml, CaseHtmlValue.Children);
     Computer                     = setCaseTagValueString(inputXml, CaseHtmlValue.Computer);
     CustomerEmail                = setCaseTagValueString(inputXml, CaseHtmlValue.CustomerEmail);
     DateClosed                   = setCaseTagValueString(inputXml, CaseHtmlValue.DateClosed);
     DateDue                      = setCaseTagValueString(inputXml, CaseHtmlValue.DateDue);
     DateLastOccurrence           = setCaseTagValueString(inputXml, CaseHtmlValue.DateLastOccurrence);
     DateLastViewed               = setCaseTagValueString(inputXml, CaseHtmlValue.DateLastViewed);
     DateOpened                   = setCaseTagValueString(inputXml, CaseHtmlValue.DateOpened);
     DateResolved                 = setCaseTagValueString(inputXml, CaseHtmlValue.DateResolved);
     DiscussionTopicId            = setCaseTagValueString(inputXml, CaseHtmlValue.DiscussionTopicId);
     DuplicateCaseIds             = setCaseTagValueString(inputXml, CaseHtmlValue.DuplicateCaseIds);
     DuplicateOriginal            = setCaseTagValueString(inputXml, CaseHtmlValue.DuplicateOriginal);
     EmailAssignedTo              = setCaseTagValueString(inputXml, CaseHtmlValue.EmailAssignedTo);
     EstimateHoursCurrent         = setCaseTagValueString(inputXml, CaseHtmlValue.EstimateHoursCurrent);
     EstimateHoursElapsed         = setCaseTagValueString(inputXml, CaseHtmlValue.EstimateHoursElapsed);
     EstimateHoursOriginal        = setCaseTagValueString(inputXml, CaseHtmlValue.EstimateHoursOriginal);
     EventLatestText              = setCaseTagValueString(inputXml, CaseHtmlValue.EventLatestText);
     FixForDateTime               = setCaseTagValueString(inputXml, CaseHtmlValue.FixForDateTime);
     FixForId                     = setCaseTagValueString(inputXml, CaseHtmlValue.FixForId);
     FixForName                   = setCaseTagValueString(inputXml, CaseHtmlValue.FixForName);
     FixForOrder                  = setCaseTagValueString(inputXml, CaseHtmlValue.FixForOrder);
     GroupId                      = setCaseTagValueString(inputXml, CaseHtmlValue.GroupId);
     IsOpen                       = setCaseTagValueString(inputXml, CaseHtmlValue.IsOpen);
     IsForwarded                  = setCaseTagValueString(inputXml, CaseHtmlValue.IsForwarded);
     IsRepliedTo                  = setCaseTagValueString(inputXml, CaseHtmlValue.IsRepliedTo);
     IsScoutReportingStopped      = setCaseTagValueString(inputXml, CaseHtmlValue.IsScoutReportingStopped);
     IsSubscribed                 = setCaseTagValueString(inputXml, CaseHtmlValue.IsSubscribed);
     LatestTextSummary            = setCaseTagValueString(inputXml, CaseHtmlValue.LatestTextSummary);
     LatestBugEvent               = setCaseTagValueString(inputXml, CaseHtmlValue.LatestBugEvent);
     LatestBugEventWhenLastViewed = setCaseTagValueString(inputXml, CaseHtmlValue.LatestBugEventWhenLastViewed);
     LastUpdated                  = setCaseTagValueString(inputXml, CaseHtmlValue.LastUpdated);
     Mailbox                      = setCaseTagValueString(inputXml, CaseHtmlValue.Mailbox);
     Number                       = setCaseTagValueString(inputXml, CaseHtmlValue.Number);
     OriginalTitle                = setCaseTagValueString(inputXml, CaseHtmlValue.OriginalTitle);
     Occurances                   = setCaseTagValueString(inputXml, CaseHtmlValue.Occurances);
     Parent                       = setCaseTagValueString(inputXml, CaseHtmlValue.Parent);
     PersonAssignedId             = setCaseTagValueString(inputXml, CaseHtmlValue.PersonAssignedId);
     PersonAssignedName           = setCaseTagValueString(inputXml, CaseHtmlValue.PersonAssignedName);
     PersonClosedId               = setCaseTagValueString(inputXml, CaseHtmlValue.PersonClosedId);
     PersonLastEditedId           = setCaseTagValueString(inputXml, CaseHtmlValue.PersonLastEditedId);
     PersonOpenedId               = setCaseTagValueString(inputXml, CaseHtmlValue.PersonOpenedId);
     PersonResolvedId             = setCaseTagValueString(inputXml, CaseHtmlValue.PersonResolvedId);
     PriorityInteger              = setCaseTagValueString(inputXml, CaseHtmlValue.PriorityInteger);
     PriorityName                 = setCaseTagValueString(inputXml, CaseHtmlValue.PriorityName);
     ProjectId                    = setCaseTagValueString(inputXml, CaseHtmlValue.ProjectId);
     ProjectName                  = setCaseTagValueString(inputXml, CaseHtmlValue.ProjectName);
     RelatedBugIds                = setCaseTagValueString(inputXml, CaseHtmlValue.RelatedBugIds);
     ReleaseNotes                 = setCaseTagValueString(inputXml, CaseHtmlValue.ReleaseNotes);
     ScoutDescription             = setCaseTagValueString(inputXml, CaseHtmlValue.ScoutDescription);
     ScoutMessage                 = setCaseTagValueString(inputXml, CaseHtmlValue.ScoutMessage);
     Status                       = setCaseTagValueString(inputXml, CaseHtmlValue.Status);
     StatusId                     = setCaseTagValueString(inputXml, CaseHtmlValue.StatusId);
     StoryPoints                  = setCaseTagValueString(inputXml, CaseHtmlValue.StoryPoints);
     Tags                         = setCaseTagValueString(inputXml, CaseHtmlValue.Tags);
     Ticket                       = setCaseTagValueString(inputXml, CaseHtmlValue.Ticket);
     Title                        = setCaseTagValueString(inputXml, CaseHtmlValue.Title);
     Version                      = setCaseTagValueString(inputXml, CaseHtmlValue.Version);
 }