Exemplo n.º 1
0
        public RegisterViewModel(int memberId)
        {
            IMemberService service = ApplicationContext.Current.Services.MemberService;
            var            member  = service.GetById(memberId);

            if (member.ContentTypeAlias == "agent")
            {
                RegisterAgent              = new RegisterAgent();
                RegisterAgent.Agency       = member.GetValue("agency").ToNullSafeString();
                RegisterAgent.AgencyPin    = member.GetValue("agencyPin").ToNullSafeString();
                RegisterAgent.CellNumber   = member.GetValue("cellNumber").ToNullSafeString();
                RegisterAgent.EmailAddress = member.Email;
                RegisterAgent.FirstName    = member.GetValue("firstName").ToNullSafeString();
                RegisterAgent.LastName     = member.GetValue("lastName").ToNullSafeString();
                RegisterAgent.Picture      = member.GetValue("picture").ToNullSafeString();
            }
            if (member.ContentTypeAlias == "buyer")
            {
                RegisterBuyer = new RegisterBuyer();
            }
            if (member.ContentTypeAlias == "agency")
            {
                RegisterAgency = new RegisterAgency();
            }
        }
Exemplo n.º 2
0
 public RegisterViewModel()
 {
     StepIndex      = 0;
     RegisterBuyer  = new RegisterBuyer();
     RegisterAgent  = new RegisterAgent();
     RegisterAgency = new RegisterAgency();
 }