Пример #1
0
 internal Deal(XmlReader rdr)
 {
     this.Id                     = rdr.ReadElementContentAsInt("id", "");
     this.Title                  = rdr.ReadElementString("title");
     this.Description            = rdr.ReadElementString("description");
     this.DealWith               = rdr.ReadElementString("deal_with");
     this.DealWithId             = int.Parse(rdr.ReadElementString("deal_with_id"));
     this.Status                 = rdr.ReadElementString("status");
     this.AssignedTo             = rdr.ReadElementString("assigned_to");
     this.Amount                 = float.Parse(rdr.ReadElementString("amount"));
     this.AttachedCommunications = AttachedCommunication.BuildList(rdr);
     this.AttachedContacts       = AttachedContact.BuildList(rdr);
     this.AttachedToDos          = AttachedTodo.BuildList(rdr);
     this.Tags                   = Tag.BuildList(rdr);
     this.Comments               = MegaComment.BuildList(rdr);
     this.CreatedAt              = rdr.ReadElementString("created_at").FromBatchBookFormat();
     this.UpdatedAt              = rdr.ReadElementString("updated_at").FromBatchBookFormat();
 }