Ejemplo n.º 1
0
 public Exhibit(string nameOfWorkArt, int year, int mought, int day, int height, int width, int thickness, string location, int price, string fundName, string fundAddres)
 {
     this.work     = new WorkOfArt(nameOfWorkArt, year, mought, day, height, width, thickness);
     this.location = new Location();
     this.location.ToString(location);
     this.fund  = new Fund(fundName, fundAddres);
     this.price = price;
 }
Ejemplo n.º 2
0
        public static List <WorkOfArt> ReadWorkOfArtList(XmlReader reader)
        {
            List <WorkOfArt> workOfArts = new List <WorkOfArt>();

            reader.MoveToContent();
            while (reader.Read())
            {
                if (reader.IsStartElement() && !reader.Name.Equals("WorkOfArt"))
                {
                    WorkOfArt lumber = new WorkOfArt();
                    lumber.ReadXml(reader);
                    workOfArts.Add(lumber);
                }
                else
                {
                    break;
                }
            }
            return(workOfArts);
        }
Ejemplo n.º 3
0
        public void ReadXml(XmlReader reader)
        {
            while (reader.Read())
            {
                if (reader.IsStartElement())
                {
                    switch (reader.Name)
                    {
                    case "Work":
                        work = new WorkOfArt();
                        work.ReadXml(reader);
                        break;

                    case "Fund":
                        fund = new Fund();
                        fund.ReadXml(reader);
                        break;

                    case "Location":
                        location = (Location)Enum.Parse(typeof(Location), reader.Value);
                        fund.ReadXml(reader);
                        break;

                    case "Price":
                        reader.Read();
                        price = Int32.Parse(reader.Value);
                        break;
                    }
                }

                if (reader.Name.Equals("Exhibit"))
                {
                    break;
                }
            }
        }
Ejemplo n.º 4
0
 public Exhibit()
 {
     this.work     = new WorkOfArt();
     this.location = new Location();
     this.fund     = new Fund();
 }