Beispiel #1
0
        internal Person(XmlReader rdr)
        {
            rdr.ReadStartElement("person");
            this.Id        = int.Parse(rdr.ReadElementString("id"));
            this.FirstName = rdr.ReadElementString("first_name");
            this.LastName  = rdr.ReadElementString("last_name");
            //Skipping Image Fields
            rdr.ReadToFollowing("title");
            this.Title   = rdr.ReadElementString("title");
            this.Company = rdr.ReadElementString("company");

            int companyId;

            if (int.TryParse(rdr.ReadElementString("company_id"), out companyId))
            {
                this.CompanyId = companyId;
            }

            this.Tags         = Tag.BuildList(rdr);
            this.Locations    = Location.BuildList(rdr);
            this.MegaComments = MegaComment.BuildList(rdr);
            this.Notes        = rdr.ReadElementString("notes");
            this.CreatedAt    = rdr.ReadElementString("created_at").FromBatchBookFormat();
            this.UpdatedAt    = rdr.ReadElementString("updated_at").FromBatchBookFormat();
            rdr.ReadEndElement();
        }
 internal Communication(XmlReader rdr)
 {
     rdr.ReadStartElement("communication");
     this.Id        = rdr.ReadElementContentAsInt("id", "");
     this.Subject   = rdr.ReadElementString("subject");
     this.Body      = rdr.ReadElementString("body");
     this.Date      = rdr.ReadElementContentAsDateTime("date", "ctype");
     this.Ctype     = rdr.ReadElementString("");
     this.Tags      = Tag.BuildList(rdr);
     this.Comments  = MegaComment.BuildList(rdr);
     this.CreateAt  = rdr.ReadElementContentAsDateTime("created_at", "");
     this.UpdatedAt = rdr.ReadElementContentAsDateTime("updated_at", "");
     rdr.ReadEndElement();
 }
Beispiel #3
0
 internal Company(XmlReader rdr)
 {
     rdr.ReadStartElement("company");
     this.Id    = rdr.ReadElementContentAsInt("id", "");
     this.Name  = rdr.ReadElementString("name");
     this.Notes = rdr.ReadElementString("notes");
     //Skipping Images
     rdr.ReadToFollowing("tags");
     this.Tags      = Tag.BuildList(rdr);
     this.Locations = Location.BuildList(rdr);
     this.Comments  = MegaComment.BuildList(rdr);
     this.CreatedAt = rdr.ReadElementString("created_at").FromBatchBookFormat();
     this.UpdatedAt = rdr.ReadElementString("updated_at").FromBatchBookFormat();
     rdr.ReadEndElement();
 }
Beispiel #4
0
 internal Todo(XmlReader rdr)
 {
     rdr.ReadStartElement("todo");
     this.Id           = rdr.ReadElementContentAsInt("id", "");
     this.Title        = rdr.ReadElementString("title");
     this.Description  = rdr.ReadElementString("description");
     this.DueDate      = Convert.ToDateTime(rdr.ReadElementString("due_date"));
     this.Flagged      = rdr.ReadElementContentAsBoolean("flagged", "");
     this.Complete     = rdr.ReadElementContentAsBoolean("complete", "");
     this.AssignedBy   = rdr.ReadElementString("assigned_by");
     this.AssignedTo   = rdr.ReadElementString("assigned_to");
     this.Participants = Participant.BuildList(rdr);
     this.Tags         = Tag.BuildList(rdr);
     this.Comments     = MegaComment.BuildList(rdr);
     this.CreatedAt    = DateTime.Parse(rdr.ReadElementString("created_at"));
     this.UpdatedAt    = DateTime.Parse(rdr.ReadElementString("updated_at"));
     rdr.ReadEndElement();
 }
Beispiel #5
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();
 }