Esempio n. 1
0
        /// <summary>
        /// Sets an IP Mask
        /// </summary>
        public JsonResult IPMask(CompanyIPMaskDTO ipmask)
        {
            ExceptionsML bizEx;
            var          client = SvcBldr.Company();
            IPList       l      = new IPList();

            if (!String.IsNullOrEmpty(ipmask.IPAddress))
            {
                ipmask.IPMask = BitConverter.GetBytes(l.ParseIP(ipmask.IPAddress));
            }
            if (!String.IsNullOrEmpty(ipmask.SubnetAddress))
            {
                ipmask.SubnetMask = BitConverter.GetBytes(l.ParseIP(ipmask.SubnetAddress));
            }

            ipmask = client.SetIPMask(ipmask, out bizEx);
            return(Result(ipmask, bizEx));
        }