Exemplo n.º 1
0
        public override bool IsValid()
        {
            bool valid = true;

            if (this.Code.Length != 6)
            {
                valid = false;
            }
            if (AttributeCombination.Length > 0)
            {
                if (!AttributeCombination.EndsWith("|"))
                {
                    valid = false;
                }
            }
            if (Radar.Length != 1 || !_radars.Contains(Radar))
            {
                valid = false;
            }
            if (Convert.ToInt32(DisplayPriority) < 0 || Convert.ToInt32(DisplayPriority) > 9)
            {
                valid = false;
            }
            if (!_displayCategories.Contains(this.ImoDisplayCategory))
            {
                valid = false;
            }
            if (ViewingGroup.Length > 0 && (!ViewingGroup.IsNumeric(NumberStyles.Integer) || Convert.ToInt32(ViewingGroup) < 0))
            {
                valid = false;
            }

            return(valid);
        }
Exemplo n.º 2
0
        public static string GetViewingGroupHeader(string vgIdStr)
        {
            ViewingGroup vg = (ViewingGroup)(int.Parse(vgIdStr));

            return(vg.ToString());
        }