/**********Generatating XML**********/
string strEmploymentInfoListObject = "";
System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(ticket.ListOfTicket.GetType());
MemoryStream memoryStream = new MemoryStream();
XmlTextWriter xmlWriter;
xmlWriter = new XmlTextWriter(memoryStream, Encoding.UTF8);
xmlWriter.Namespaces = true;
x.Serialize(xmlWriter, ticket.ListOfTicket);
xmlWriter.Close();
memoryStream.Close();
string xml;
xml = Encoding.UTF8.GetString(memoryStream.GetBuffer());
xml = xml.Substring(xml.IndexOf(Convert.ToChar(60)));
xml = xml.Substring(0, (xml.LastIndexOf(Convert.ToChar(62)) + 1));
strEmploymentInfoListObject = xml;
/****** Checking The XML Data is Generate or not ********/
MessageBox.Show(strEmploymentInfoListObject);
ticketManager.SaveAllGenerateTicketInfo(xml);
string strEmploymentInfoListObject = "";
System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(ticket.ListOfTicket.GetType());
MemoryStream memoryStream = new MemoryStream();
XmlTextWriter xmlWriter;
xmlWriter = new XmlTextWriter(memoryStream, Encoding.UTF8);
xmlWriter.Namespaces = true;
x.Serialize(xmlWriter, ticket.ListOfTicket);
xmlWriter.Close();
memoryStream.Close();
string xml;
xml = Encoding.UTF8.GetString(memoryStream.GetBuffer());
xml = xml.Substring(xml.IndexOf(Convert.ToChar(60)));
xml = xml.Substring(0, (xml.LastIndexOf(Convert.ToChar(62)) + 1));
strEmploymentInfoListObject = xml;
/****** Checking The XML Data is Generate or not ********/
MessageBox.Show(strEmploymentInfoListObject);
ticketManager.SaveAllGenerateTicketInfo(xml);
Comments
Post a Comment