コード例 #1
0
        public bool UpdateAccountLock(Token token, StateServerService stateServer, string agentAccountID, string[][] arrayAccountLock)
        {
            XmlDocument doc = new XmlDocument();
            XmlNode updateAccountLock = doc.CreateNode(XmlNodeType.Element, "UpdateAccountLock", null);

            XmlAttribute attribute1 = doc.CreateAttribute("AgentAccountID");
            attribute1.Value = agentAccountID;
            updateAccountLock.Attributes.Append(attribute1);

            foreach (string[] arrayAccountLockTmp in arrayAccountLock)
            {
                XmlNode account = doc.CreateNode(XmlNodeType.Element, "Account", null);
                XmlAttribute attribute = doc.CreateAttribute("ID");
                attribute.Value = arrayAccountLockTmp[0];
                account.Attributes.Append(attribute);

                attribute = doc.CreateAttribute("IsLocked");
                attribute.Value = arrayAccountLockTmp[1];
                account.Attributes.Append(attribute);

                updateAccountLock.AppendChild(account);
            }
            bool isSucced = stateServer.UpdateAccountLock(token, updateAccountLock);
            return (isSucced);
        }