public string CreateTicketindb(string category, string description, string prioritySelected) { Random no = new Random(); int ticketNumber = no.Next(); DateTime currentDate = DateTime.Now; CultureInfo invC = CultureInfo.InvariantCulture; currentDate.ToString("f", invC); JObject data = new JObject( new JProperty("Category", category), new JProperty("Description", description), new JProperty("Priority", prioritySelected), new JProperty("TicketNo", ticketNumber), new JProperty("Date", currentDate)); var objectData = data.ToString(); GetDataHelper.SaveTicketsInfo(data); JavaScriptSerializer js = new JavaScriptSerializer(); var parsedData = js.Serialize(objectData); return(parsedData); }