public void InsertConversation(Guid ticketId, string message, string attachment, Guid userId, bool staff, string userEmailId) { TicketAndTicketConversationRow ticketAndTicketConversationRow = new TicketAndTicketConversationRow(); ticketAndTicketConversationRow.PartitionKey = userEmailId; ticketAndTicketConversationRow.FID = Guid.NewGuid(); ticketAndTicketConversationRow.Kind = Kind.TicketConversation.ToString(); ticketAndTicketConversationRow.TicketId = ticketId; ticketAndTicketConversationRow.Message = message; ticketAndTicketConversationRow.Attachment = attachment; ticketAndTicketConversationRow.UserId = userId; ticketAndTicketConversationRow.Staff = staff.ToString(); ticketAndTicketConversationRow.UserEmail = userEmailId; ticketAndTicketConversationRow.LastUpdate = DateTime.Now; ticketAndTicketConversationRow.InsertDate = DateTime.Now; TableDataStore tableDataStore = new TableDataStore(); tableDataStore.Insert(ticketAndTicketConversationRow); //connection.ExecuteSQL(cmdText); }
public void InsertTicket(Guid ticketId, string status, string priority, string subject, string type, string userEmailId, string domain, string contactNumber, string department, string lastReplier, string userName) { TicketAndTicketConversationRow ticketAndTicketConversationRow = new TicketAndTicketConversationRow(); ticketAndTicketConversationRow.PartitionKey = userEmailId; ticketAndTicketConversationRow.RowKey = ticketId.ToString(); ticketAndTicketConversationRow.Kind = Kind.Ticket.ToString(); ticketAndTicketConversationRow.TicketNumber = DateTime.Now.GetHashCode(); // ticketAndTicketConversationRow.TicketId = ticketId; ticketAndTicketConversationRow.Status = status; ticketAndTicketConversationRow.Priority = priority; ticketAndTicketConversationRow.Subject = subject; ticketAndTicketConversationRow.Type = type; ticketAndTicketConversationRow.UserEmail = userEmailId; ticketAndTicketConversationRow.Domain = domain; ticketAndTicketConversationRow.ContactNumber = contactNumber; ticketAndTicketConversationRow.Department = department; ticketAndTicketConversationRow.LastReplier = lastReplier; ticketAndTicketConversationRow.UserName = userName; ticketAndTicketConversationRow.LastUpdate = DateTime.Now; ticketAndTicketConversationRow.InsertDate = DateTime.Now; TableDataStore tableDataStore = new TableDataStore(); tableDataStore.Insert(ticketAndTicketConversationRow); }