Beispiel #1
0
 public FullName(ContactTitle title, string first, string middle, string last)
 {
     this.title  = title;
     this.first  = first;
     this.middle = middle;
     this.last   = last;
 }
Beispiel #2
0
 public void Assign(FullName name)
 {
     this.title  = name.Title;
     this.first  = name.FirstName;
     this.middle = name.MiddleName;
     this.last   = name.LastName;
 }
Beispiel #3
0
        public ContactModel(Contact contact)
        {
            _contact = contact;

            if (_contact != null)
            {
                _contactTitle = _contact.ContactTitle;
            }
        }
 public static ContactTitleModel ToModel(this ContactTitle aContactTitleEntity)
 {
     return(new ContactTitleModel()
     {
         ContactTitleId = aContactTitleEntity.ContactTitleId,
         TitleName = aContactTitleEntity.TitleName,
         Inactive = aContactTitleEntity.Inactive
     });
 }
Beispiel #5
0
        public static ContactTitleModel ToModel(this ContactTitle entity)
        {
            if (entity == null)
            {
                throw new NullReferenceException("ContactTitle is null");
            }

            return(new ContactTitleModel()
            {
                Id = entity.Id,
                Title = entity.Title
            });
        }
Beispiel #6
0
        public static string GetTitleNameByContactTitle(ContactTitle title)
        {
            switch (title)
            {
            case ContactTitle.Dr: return(Properties.Resources.ContactTitleDr);

            case ContactTitle.Miss: return(Properties.Resources.ContactTitleMiss);

            case ContactTitle.Mr: return(Properties.Resources.ContactTitleMr);

            case ContactTitle.Mrs: return(Properties.Resources.ContactTitleMrs);

            case ContactTitle.Ms: return(Properties.Resources.ContactTitleMs);

            case ContactTitle.Prof: return(Properties.Resources.ContactTitleProf);
            }
            return(string.Empty);
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Id != null ? Id.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CompanyName != null ? CompanyName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ContactName != null ? ContactName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ContactTitle != null ? ContactTitle.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Address != null ? Address.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Region != null ? Region.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PostalCode != null ? PostalCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Country != null ? Country.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Phone != null ? Phone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Fax != null ? Fax.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Picture != null ? Picture.GetHashCode() : 0);
         return(hashCode);
     }
 }
Beispiel #8
0
 public static string GetTitleNameByContactTitle(ContactTitle title) {
     switch(title) {
         case ContactTitle.Dr: return Properties.Resources.ContactTitleDr;
         case ContactTitle.Miss: return Properties.Resources.ContactTitleMiss;
         case ContactTitle.Mr: return Properties.Resources.ContactTitleMr;
         case ContactTitle.Mrs: return Properties.Resources.ContactTitleMrs;
         case ContactTitle.Ms: return Properties.Resources.ContactTitleMs;
         case ContactTitle.Prof: return Properties.Resources.ContactTitleProf;
     }
     return string.Empty;
 }
Beispiel #9
0
 public void Assign(FullName name)
 {
     this.title = name.Title;
     this.first = name.FirstName;
     this.middle = name.MiddleName;
     this.last = name.LastName;
 }
Beispiel #10
0
 public FullName(ContactTitle title, string first, string middle, string last)
 {
     this.title = title;
     this.first = first;
     this.middle = middle;
     this.last = last;
 }
        private void SetupConstraints()
        {
            ContentView.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            ContentView.AddConstraints(
                _headerContainer.AtTopOf(ContentView),
                _headerContainer.AtLeftOf(ContentView),
                _headerContainer.AtRightOf(ContentView),

                _header.AtTopOf(_headerContainer),
                _header.AtLeftOf(_headerContainer),
                _header.AtRightOf(_headerContainer),
                _header.Height().EqualTo(280),

                _logoShadowView.WithSameCenterY(_logo),
                _logoShadowView.WithSameCenterX(_logo),
                _logoShadowView.Height().EqualTo(110),
                _logoShadowView.Width().EqualTo(110),

                _logo.WithSameBottom(_header).Plus(34),
                _logo.WithSameCenterX(_header),
                _logo.Height().EqualTo(112),
                _logo.Width().EqualTo(112),

                Name.Below(_logo, 23),
                Name.WithSameCenterX(_headerContainer),

                Industry.WithSameCenterX(_headerContainer),
                Industry.Below(Name, 6),

                _headerBottomRuler.Below(_header, 140),
                _headerBottomRuler.AtBottomOf(_headerContainer),
                _headerBottomRuler.AtLeftOf(_headerContainer),
                _headerBottomRuler.AtRightOf(_headerContainer),
                _headerBottomRuler.Height().EqualTo(1),

                _aboutContainer.Below(_headerContainer, 5),
                _aboutContainer.AtLeftOf(ContentView),
                _aboutContainer.AtRightOf(ContentView),
                _aboutContainer.AtBottomOf(ContentView, 5),

                _aboutTopRuler.AtTopOf(_aboutContainer),
                _aboutTopRuler.AtLeftOf(_aboutContainer),
                _aboutTopRuler.AtRightOf(_aboutContainer),
                _aboutTopRuler.Height().EqualTo(1),

                AboutTitle.Below(_aboutTopRuler, 10),
                AboutTitle.AtLeftOf(_aboutContainer, 14),
                AboutTitle.AtRightOf(_aboutContainer, 14),

                AboutText.Below(AboutTitle, 10),
                AboutText.WithSameLeft(AboutTitle),
                AboutText.WithSameRight(AboutTitle),

                ContactTitle.Below(AboutText, 10),
                ContactTitle.WithSameLeft(AboutText),
                ContactTitle.WithSameRight(AboutText),

                _telephoneImage.Below(ContactTitle, 10),
                _telephoneImage.Height().EqualTo(15),
                _telephoneImage.Width().EqualTo(15),
                _telephoneImage.WithSameLeft(ContactTitle),

                Telephone.ToRightOf(_telephoneImage, 10),
                Telephone.WithSameCenterY(_telephoneImage),
                Telephone.WithSameRight(AboutText),

                _locationImage.Below(_telephoneImage, 10),
                _locationImage.Height().EqualTo(15),
                _locationImage.Width().EqualTo(15),
                _locationImage.WithSameLeft(ContactTitle),

                SpaceLocation.ToRightOf(_locationImage, 10),
                SpaceLocation.WithSameCenterY(_locationImage),
                SpaceLocation.WithSameRight(AboutText),

                _websiteImage.Below(_locationImage, 10),
                _websiteImage.Height().EqualTo(15),
                _websiteImage.Width().EqualTo(15),
                _websiteImage.WithSameLeft(ContactTitle),

                Website.ToRightOf(_websiteImage, 10),
                Website.WithSameCenterY(_websiteImage),
                Website.WithSameRight(AboutText),

                //_facebook.Height().EqualTo(25),
                //_facebook.Width().EqualTo(25),
                //_facebook.AtLeftOf(_socialContainer),

                //_twitter.ToRightOf(_facebook, 5),
                //_twitter.WithSameWidth(_facebook),
                //_twitter.WithSameHeight(_facebook),
                //_twitter.WithSameCenterY(_facebook),

                //_linkedIn.ToRightOf(_twitter, 5),
                //_linkedIn.WithSameWidth(_facebook),
                //_linkedIn.WithSameHeight(_facebook),
                //_linkedIn.WithSameCenterY(_facebook),

                //_instagram.ToRightOf(_linkedIn, 5),
                //_instagram.WithSameWidth(_facebook),
                //_instagram.WithSameHeight(_facebook),
                //_instagram.WithSameCenterY(_facebook),
                //_instagram.AtRightOf(_socialContainer),

                //_socialContainer.WithSameCenterX(ContentView),

                _aboutBottomRuler.Below(Website, 15),
                _aboutBottomRuler.AtBottomOf(_aboutContainer),
                _aboutBottomRuler.AtLeftOf(_aboutContainer),
                _aboutBottomRuler.AtRightOf(_aboutContainer),
                _aboutBottomRuler.Height().EqualTo(1)
                );
        }