Esempio n. 1
0
        public static void AddUserVLan(int userId, UserVlan vLan)
        {
            UserInfo user = GetUser(userId);

            //
            if (user == null)
            {
                throw new ApplicationException(String.Format("User with UserID={0} not found", userId));
            }

            XDocument doc   = XDocument.Parse(user.AdditionalParams ?? userAdditionalParamsTemplate);
            XElement  vlans = doc.Root.Element("VLans");

            vlans.Add(new XElement("VLan", new XAttribute("VLanID", vLan.VLanID), new XAttribute("Comment", vLan.Comment)));

            user.AdditionalParams = doc.ToString();
            UpdateUser(user);
        }
Esempio n. 2
0
 public void AddUserVLan(int userId, UserVlan vLan)
 {
     UserController.AddUserVLan(userId, vLan);
 }
Esempio n. 3
0
 public static void AddUserVLan(int userId, UserVlan vLan)
 {
     ES.Services.Users.AddUserVLan(userId, vLan);
 }
Esempio n. 4
0
 public void AddUserVLan(int userId, UserVlan vLan)
 {
     UserController.AddUserVLan(userId, vLan);
 }
Esempio n. 5
0
        public static void AddUserVLan(int userId, UserVlan vLan)
        {
            UserInfo user = GetUser(userId);
            //
			if (user == null)
                throw new ApplicationException(String.Format("User with UserID={0} not found", userId));

            XDocument doc = XDocument.Parse(user.AdditionalParams ?? userAdditionalParamsTemplate);
            XElement vlans = doc.Root.Element("VLans");
            vlans.Add(new XElement("VLan", new XAttribute("VLanID", vLan.VLanID), new XAttribute("Comment", vLan.Comment)));

            user.AdditionalParams = doc.ToString();
            UpdateUser(user);
        }
Esempio n. 6
0
		public void AddUserVLan(int userId, UserVlan vLan)
		{
			object[] results = this.Invoke("AddUserVLan", new object[] {
                        userId,
                        vLan});
		}