category added
This commit is contained in:
@@ -109,7 +109,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
public const string ServiceId = "ServiceId";
|
||||
public const string ServiceName = "ServiceName";
|
||||
public const string StatusId = "StatusId";
|
||||
public const string CategoryId = "CategoryId";
|
||||
public const string Category = "Category";
|
||||
public const string Summary = "Summary";
|
||||
public const string Special = "Special";
|
||||
}
|
||||
@@ -1167,7 +1167,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SelectedTicket.Infos.TryGetValue(TicketInfoKeys.CategoryId, out var categoryId) || string.IsNullOrWhiteSpace(categoryId))
|
||||
if (!SelectedTicket.Infos.TryGetValue(TicketInfoKeys.Category, out var categoryId) || string.IsNullOrWhiteSpace(categoryId))
|
||||
{
|
||||
SelectedCategory = null;
|
||||
return;
|
||||
@@ -1182,6 +1182,17 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
}
|
||||
}
|
||||
|
||||
private Guid? GetSelectedCategoryGuid()
|
||||
{
|
||||
if (SelectedCategory == null || string.IsNullOrWhiteSpace(SelectedCategory.Id))
|
||||
return null;
|
||||
|
||||
if (Guid.TryParse(SelectedCategory.Id, out var categoryGuid))
|
||||
return categoryGuid;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private async Task UpdateQuickCallsComboBoxAsync()
|
||||
{
|
||||
try
|
||||
@@ -1211,9 +1222,10 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
var id = idsColumn.Values[i].ToString();
|
||||
var name = namesColumn.Values[i].ToString();
|
||||
|
||||
int classification = 0;
|
||||
if (int.TryParse(classificationColumn.Values[i]?.ToString(), out var parsedValue))
|
||||
classification = parsedValue;
|
||||
Guid? classification = null;
|
||||
var classificationValue = classificationColumn.Values[i]?.ToString();
|
||||
if (Guid.TryParse(classificationValue, out var parsedClassification))
|
||||
classification = parsedClassification;
|
||||
|
||||
|
||||
quickCallListe.Add(new QuickCallEntry
|
||||
@@ -1240,7 +1252,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
{
|
||||
public string ID { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public int Classification { get; set; }
|
||||
public Guid? Classification { get; set; }
|
||||
public override string ToString()
|
||||
{
|
||||
return DisplayName.ToString();
|
||||
@@ -1607,16 +1619,24 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
["CreationSource"] = 3,
|
||||
["Status"] = enumTicketStatus.Unknown,
|
||||
["time"] = DateTime.UtcNow,
|
||||
["Classification"] = string.Empty,
|
||||
["Priority"] = 2,
|
||||
};
|
||||
Guid quickcallId = Guid.Empty;
|
||||
Guid? quickCallClassificationId = null;
|
||||
if (QuickTicketSelection.SelectedItem is QuickCallEntry selectedQuickTicketItem)
|
||||
{
|
||||
ticketValues.Add("Category", selectedQuickTicketItem.DisplayName);
|
||||
//ticketValues.Add("Category", selectedQuickTicketItem.DisplayName);
|
||||
ticketValues.Add("QuickCallId", selectedQuickTicketItem.ID);
|
||||
Guid.TryParse(selectedQuickTicketItem.ID?.ToString(), out quickcallId);
|
||||
if (selectedQuickTicketItem.Classification.HasValue)
|
||||
{
|
||||
quickCallClassificationId = selectedQuickTicketItem.Classification;
|
||||
ticketValues["Classification"] = quickCallClassificationId.Value;
|
||||
}
|
||||
}
|
||||
var selectedCategoryId = GetSelectedCategoryGuid();
|
||||
if (selectedCategoryId.HasValue)
|
||||
ticketValues[TicketInfoKeys.Category] = selectedCategoryId.Value;
|
||||
enumCloseCaseTicketStatus? closeCaseTicketStatus = null;
|
||||
int errorType = -1;
|
||||
var comment = string.Empty;
|
||||
@@ -1877,9 +1897,11 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
User = adDnUser,
|
||||
AffectedAsset = asset,
|
||||
AffectedService = service,
|
||||
Category = selectedCategoryId,
|
||||
Summary = TicketSummaryTextBox.Text,
|
||||
DescriptionHtml = htmlCaseNotes.ToString(),
|
||||
Quickcall = quickcallId,
|
||||
Classification = quickCallClassificationId,
|
||||
CopyTemplates = string.IsNullOrWhiteSpace(copyStringHtml) ? copyString : copyStringHtml,
|
||||
SolutionHtml = solutionHtmlString,
|
||||
ErrorType = errorType,
|
||||
|
||||
Reference in New Issue
Block a user