Ejemplo n.º 1
0
        public string Print()
        {
            string s = ArriveTime.ToString() + ";";

            if (Product != null)
            {
                foreach (IProduct p in Product)
                {
                    int i = Product.IndexOf(p);
                    if (i < Product.Count - 1)
                    {
                        s += p.ProID + ",";
                    }
                    else
                    {
                        s += p.ProID + ";";
                    }
                }
            }
            if (Tickets != null)
            {
                foreach (Ticket t in Tickets)
                {
                    int i = Tickets.IndexOf(t);

                    foreach (IMetaResource imr in t.MetaResList)
                    {
                        s += imr.Name + ",";
                    }
                }
            }
            return(s);
        }
Ejemplo n.º 2
0
 public void WriteXml(XmlWriter writer)
 {
     if (Product != null)
     {
         writer.WriteAttributeString("Time", ArriveTime.ToString());
         string s = "";
         foreach (var p in Product)
         {
             s += p.ProID + ",";
         }
         s = s.Remove(s.Length - 1, 1);             //删除最后的逗号
         writer.WriteAttributeString("Product", s); //多个product
     }
 }
Ejemplo n.º 3
0
 public void WriteXml(XmlWriter writer)
 {
     writer.WriteAttributeString("Time", ArriveTime.ToString());
     writer.WriteAttributeString("MS", IndexOfMS.ToString());
 }
Ejemplo n.º 4
0
 public override string ToString()
 {
     return(String.Format("{0} {1} {2} {3} {4} {5} {6} {7} {8}", Id, Client.Id, Driver.Id, ArriveTime.ToString("yyyy-MM-dd_HH:mm"), Dispatch, Destination, RoadTime, Cost, IsDone));
 }