public XmlGetDomainListReq() : base(operations.GetDomainList) { XmlNode GetEl = XmlRequest.CreateElement(_xmlDomainElements.Get.ToString()); Parameters.AppendChild(GetEl); }
public XmlGetDomainInfoReq(string domainName) : base(operations.GetDomainInfo) { XmlNode xmlDomain = XmlRequest.CreateElement(_xmlDomainElements.Domain.ToString()); xmlDomain.InnerText = domainName; Parameters.AppendChild(xmlDomain); XmlNode xmlGet = XmlRequest.CreateElement(_xmlDomainElements.Get.ToString()); Parameters.AppendChild(xmlGet); foreach (var element in _getList) { xmlGet.AppendChild(XmlRequest.CreateElement(element.ToString())); } }
public XmlGetUserInfoReq(string domain, string mailbox) : base(operations.GetUserInfo) { XmlNode DomainEl = XmlRequest.CreateElement("Domain"); XmlNode MailBoxEl = XmlRequest.CreateElement("Mailbox"); XmlNode GetEl = XmlRequest.CreateElement("Get"); DomainEl.InnerText = domain; MailBoxEl.InnerText = mailbox; Parameters.AppendChild(DomainEl); Parameters.AppendChild(MailBoxEl); Parameters.AppendChild(GetEl); foreach (var child in _getList) { XmlNode ChildEl = XmlRequest.CreateElement(child); GetEl.AppendChild(ChildEl); } }
public XmlUpdUserReq(MailBox mailBox) : base(operations.UpdateUser) { //XmlNode DomainEl = XmlRequest.CreateElement("Domain"); var DomainEl = XmlRequest.CreateElement(_xmlUserElements.Domain.ToString()); var MailboxEl = XmlRequest.CreateElement(_xmlUserElements.Mailbox.ToString()); var DetailsEl = XmlRequest.CreateElement(_xmlUserElements.Details.ToString()); var PasswordEl = XmlRequest.CreateElement(_xmlUserElements.Password.ToString()); var FrozenEl = XmlRequest.CreateElement(_xmlUserElements.Frozen.ToString()); var DisabledEl = XmlRequest.CreateElement(_xmlUserElements.Disabled.ToString()); Parameters.AppendChild(DomainEl); Parameters.AppendChild(MailboxEl); Parameters.AppendChild(DetailsEl); DetailsEl.AppendChild(PasswordEl); DetailsEl.AppendChild(FrozenEl); DetailsEl.AppendChild(DisabledEl); DomainEl.InnerText = mailBox.Domain; MailboxEl.InnerText = mailBox.Mailbox; PasswordEl.InnerText = mailBox.Password; FrozenEl.InnerText = mailBox.Frozen; DisabledEl.InnerText = mailBox.Disabled; }
public XmlCreateUserReq(MailBox mailBox) : base(operations.CreateUser) { List <XmlNode> xmlNodesParameters = new List <XmlNode>(); List <XmlNode> xmlNodesDetails = new List <XmlNode>(); XmlNode tmpNode; tmpNode = XmlRequest.CreateElement(_xmlUserElements.FullName.ToString()); tmpNode.InnerText = mailBox.FullName; xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.Frozen.ToString()); tmpNode.InnerText = mailBox.Frozen; xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.Disabled.ToString()); tmpNode.InnerText = mailBox.Disabled; xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.MustChangepassword.ToString()); tmpNode.InnerText = mailBox.MustChangepassword; xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.DontExpirePassword.ToString()); tmpNode.InnerText = mailBox.DontExpirePassword; xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.Password.ToString()); tmpNode.InnerText = mailBox.Password; xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.Descriptions.ToString()); tmpNode.InnerText = mailBox.Descriptions; xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.AdminNotes.ToString()); tmpNode.InnerText = mailBox.AdminNotes; xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.Title.ToString()); xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.FirstName.ToString()); tmpNode.InnerText = mailBox.FirstName; xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.MiddleName.ToString()); xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.LastName.ToString()); tmpNode.InnerText = mailBox.LastName; xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.Suffix.ToString()); xmlNodesDetails.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.Domain.ToString()); tmpNode.InnerText = mailBox.Domain; xmlNodesParameters.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.Mailbox.ToString()); tmpNode.InnerText = mailBox.Mailbox; xmlNodesParameters.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.Details.ToString()); foreach (var node in xmlNodesDetails) { tmpNode.AppendChild(node); } xmlNodesParameters.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.Aliases.ToString()); xmlNodesParameters.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.GroupMembership.ToString()); xmlNodesParameters.Add(tmpNode); tmpNode = XmlRequest.CreateElement(_xmlUserElements.ListMembership.ToString()); xmlNodesParameters.Add(tmpNode); foreach (var node in xmlNodesParameters) { Parameters.AppendChild(node); } }