示例#1
0
        public Staging_Alert MapXmlToStagingAlert(string xmlString)
        {
            XmlSerializer serializer   = new XmlSerializer(typeof(Staging_Alert), new XmlRootAttribute("AGVAlert"));
            StringReader  stringReader = new StringReader(xmlString);
            Staging_Alert alert        = (Staging_Alert)serializer.Deserialize(stringReader);

            return(alert);
        }
示例#2
0
 public void AddAlert(Staging_Alert alert)
 {
     using (var ctx = new AGVStagingContext())
     {
         ctx.Staging_Alert.Add(alert);
         ctx.SaveChanges();
     }
 }