public async Task CloseSupportTicket(string supportTicketID) { HelpDeskDatabase db = new HelpDeskDatabase(); SupportTicket supportTicket = db.SupportTickets.Find(Int32.Parse(supportTicketID)); supportTicket.Status = "Closed"; db.SaveChanges(); GraphHelper graphHelper = new GraphHelper(); await graphHelper.MarkEmailMessageClosed(supportTicket.MessageID); }
public async Task AssignSupportTicket(string messageID, string title, string description, string assignedTo) { SupportTicket supportTicket = new SupportTicket(); supportTicket.AssignedTo = assignedTo; supportTicket.MessageID = messageID; supportTicket.Title = Uri.UnescapeDataString(title); supportTicket.Description = Uri.UnescapeDataString(description); supportTicket.Status = "Open"; HelpDeskDatabase db = new HelpDeskDatabase(); db.SupportTickets.Add(supportTicket); db.SaveChanges(); GraphHelper graphHelper = new GraphHelper(); await graphHelper.MarkEmailMessageAssigned(messageID); }