コード例 #1
0
 public Customer(Customer customer, Account account = null, Guid?originStore = null)
 {
     if (!account.IsNull())
     {
         if (customer is Person)
         {
             customer.Name = string.Format("{0} {1}", ((Entities.Person)customer).FirstName, ((Entities.Person)customer).LastName);
         }
         else
         {
             customer.Name = ((Entities.Company)customer).CompanyName;
         }
     }
 }
コード例 #2
0
        public Person(Person person, Account account = null, Guid?originStore = null)
            : base(person, account, originStore)
        {
            FirstName = person.FirstName;
            LastName  = person.LastName;
            Cpf       = person.Cpf;
            Rg        = person.Rg;
            BirthDate = person.BirthDate;
            Gender    = person.Gender;

            if (!account.IsNull())
            {
                person.Cpf = account.Document;
            }
        }
コード例 #3
0
        public void HandlerToGet()
        {
            if (this != null)
            {
                if (!Account.IsNull())
                {
                    this.Email    = Account.Email;
                    this.Password = Account.Password;
                }

                this.Addresses = this.AddressData.Deserialize <List <AddressCustomer> >();

                if (this is Person)
                {
                    this.Name = string.Format("{0} {1}", ((Person)this).FirstName, ((Person)this).LastName);
                }
                else
                {
                    this.Name = ((Company)this).CompanyName;
                }
            }
        }