Exemple #1
0
 public VendorInfo()
 {
     Behaviour    = Behaviour.Default;
     Name         = "";
     DisplayName  = "";
     UrlElement   = "";
     Description  = "";
     InternalID   = (new Guid()).ToString();
     HasExpenses  = false;
     SecurityData = new SecurityData();
     ClientSide   = new ClientSide();
     m_oGuid      = new Guid();
 }         // constructor
Exemple #2
0
        }         // Parse

        public object Clone()
        {
            var x = new ClientSide {
                StoreInfoStepModelShops = (string)this.StoreInfoStepModelShops.Clone(),
                LinkForm = (LinkForm)this.LinkForm.Clone(),
            };

            foreach (KeyValuePair <string, string> pair in m_oErrorMessages)
            {
                x.m_oErrorMessages[pair.Key] = pair.Value;
            }

            return(x);
        }         // Clone
Exemple #3
0
        }         // Guid

        public void Parse()
        {
            Name = (Name ?? "").Trim();

            if (Name == string.Empty)
            {
                throw new ConfigException("Vendor name not specified.");
            }

            DisplayName = (DisplayName ?? "").Trim();
            if (DisplayName == string.Empty)
            {
                DisplayName = Name;
            }

            UrlElement = (UrlElement ?? "").Trim();
            if (UrlElement == string.Empty)
            {
                UrlElement = Name;
            }

            Description = (Description ?? "").Trim();
            if (Description == string.Empty)
            {
                Description = Name;
            }

            try {
                m_oGuid = new Guid(InternalID);
            } catch (Exception e) {
                throw new ConfigException("Failed to parse vendor internal id: " + e.Message);
            }             // catch

            SecurityData.Validate();

            ClientSide.Parse();
        }         // Parse