Ejemplo n.º 1
0
        public string Validate()
        {
            var sb = new StringBuilder();

            Name = Name.ToSafeTrimmedString();
            if (String.IsNullOrEmpty(Name))
            {
                sb.AppendLine(String.Format(ErrorTexts.FieldIsEmpty, Texts.CompanyName));
            }

            Inn = Inn.ToSafeTrimmedString();
            if (String.IsNullOrEmpty(Inn))
            {
                sb.AppendLine(String.Format(ErrorTexts.FieldIsEmpty, Texts.Inn));
            }

            var rs = Address.Validate();

            if (!String.IsNullOrEmpty(rs))
            {
                sb.AppendLine(rs);
            }
            return(sb.ToString());
        }