Ejemplo n.º 1
0
        public Petition(Model.Petition petition)
        {
            if (petition == null)
            {
                return;
            }

            this.ID          = petition.ID;
            this.Level       = new PetitionLevel(petition.PetitionLevel);
            this.AddressedTo = petition.AddressedTo;
            this.Subject     = petition.Subject;
            this.Category    = new Entity()
            {
                ID          = petition.Category.ID,
                Name        = petition.Category.Name,
                Description = petition.Category.Description,
                Group       = new EntityGroup(petition.Category.EntityGroup)
            };
            this.Text          = petition.Text;
            this.Requirements  = petition.Requirements;
            this.KeyWords      = petition.KeyWords.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();
            this.CreatedDate   = petition.CreatedDate;
            this.CreatedBy     = new People(petition.Person);
            this.EffectiveFrom = petition.EffectiveFrom;
            this.EffectiveTo   = petition.EffectiveTo;
            this.Limit         = petition.Limit;
            this.Email         = petition.Email;
        }
Ejemplo n.º 2
0
 public PetitionEmailVote(Model.PetitionEmailVote emailVote, Model.Petition petition) : this(emailVote)
 {
     this.Petition = new Petition(petition);
 }