Beispiel #1
0
        internal static PersonVm FromModel(WebUserProfile p)
        {
            PersonVm model = new PersonVm();

            model.First  = p.First;
            model.Middle = p.Middle;
            model.Last   = p.Last;

            return(model);
        }
Beispiel #2
0
 internal static PersonVm FromModel(WebUserProfile p)
 {
     PersonVm model = new PersonVm();
    
     model.First = p.First;
     model.Middle = p.Middle;
     model.Last = p.Last;
     
     return model;
 }
Beispiel #3
0
        internal static PersonVm FromModel(Person person)
        {
            if (person.ContactInformation == null)
                person.ContactInformation = new ContactInformation();
            var userProfileVm = new PersonVm
            {
                Id = person.Id,
                Birthday = person.Birthday,
                First = person.FirstName,
                Middle = person.MiddleName,
                Last = person.LastName,
                ContactInformation = ContactInformationVm.FromModel(person.ContactInformation)

            };

            return userProfileVm;
        }
Beispiel #4
0
        internal static PersonVm FromModel(Person person)
        {
            if (person.ContactInformation == null)
            {
                person.ContactInformation = new ContactInformation();
            }
            var userProfileVm = new PersonVm
            {
                Id                 = person.Id,
                Birthday           = person.Birthday,
                First              = person.FirstName,
                Middle             = person.MiddleName,
                Last               = person.LastName,
                ContactInformation = ContactInformationVm.FromModel(person.ContactInformation)
            };

            return(userProfileVm);
        }
        public virtual ActionResult Index()
        {
            PersonVm userProfileVm = null;
            try
            {
                var person = this.personService.Get(this.webSecurityService.CurrentUserId);

                if (person != null)
                    userProfileVm = PersonVm.FromModel(person);
                else
                    userProfileVm = new PersonVm();
                return View(userProfileVm);
            }
            catch (Exception e)
            {
                this.emailHelper.SendErrorEmail(e as Exception);
            }
            return View(WENEEDUHAVE.Error.Views.Index);
        }