예제 #1
0
        public void Import(string path)
        {
            XmlSerializer xmlserializer = new XmlSerializer(typeof(mList <Order>));

            using (FileStream importStream = new FileStream(path, FileMode.Open))
            {
                mList <Order> temp = (mList <Order>)xmlserializer.Deserialize(importStream);
                temp.ForEach(o =>
                {
                    if (!orderList.Contains(o))
                    {
                        orderList.Add(o);
                    }
                });
            }
        }
예제 #2
0
 public OrderService()
 {
     orderList = new mList <Order>();
 }