Пример #1
0
 public bool SameServerWith(OFFICE_INFO oi)
 {
     if (SERVER_IP == oi.SERVER_IP && SERVER_DNS == oi.SERVER_DNS && SERVER_NAME == oi.SERVER_NAME && SERVER_PORT == oi.SERVER_PORT)
     {
         return(true);
     }
     return(false);
 }
Пример #2
0
        public LoginResult(string xml)
        {
            if (xml == "")
            {
                return;
            }
            m_LoginXml = xml;
            XmlDocument xd = new XmlDocument();

            xd.LoadXml(m_LoginXml);
            m_loginCmdFlag = (xd.SelectSingleNode("//eg/cm").InnerText.Trim() == "RetLogin");
            if (!m_loginCmdFlag)
            {
                return;
            }
            m_loginResFlag = (xd.SelectSingleNode("//eg/LoginFlag").InnerText.Trim() == "LoginSucc");
            if (!m_loginResFlag)
            {
                return;
            }
            m_Passport       = xd.SelectSingleNode("//eg/PassPort").InnerText.Trim();
            m_TrimLen        = Convert.ToInt32(xd.SelectSingleNode("//eg/TrimLen").InnerText.Trim());
            m_ServerIp       = xd.SelectSingleNode("//eg/SrvIp").InnerText.Trim();
            m_ServerDns      = xd.SelectSingleNode("//eg/SrvDNS").InnerText.Trim();
            m_ServerPort     = Convert.ToInt32(xd.SelectSingleNode("//eg/SrvPort").InnerText.Trim());
            m_ServerName     = xd.SelectSingleNode("//eg/SrvName").InnerText.Trim();
            m_UserStat       = Convert.ToInt32(xd.SelectSingleNode("//eg/UserStat").InnerText.Trim());
            m_Insurance_User = xd.SelectSingleNode("//eg/InsuranceUserName").InnerText.Trim();
            m_Insurance_Pass = xd.SelectSingleNode("//eg/InsurancePassWord").InnerText.Trim();
            m_AgentStat      = Convert.ToInt32(xd.SelectSingleNode("//eg/AgentStat").InnerText.Trim());
            m_Expired        = (xd.SelectSingleNode("//eg/UserExpire").InnerText.Trim() == "true");
            m_Tickets        = xd.SelectSingleNode("//eg/Tickets").InnerText.Trim();
            XmlNode xn = xd.SelectSingleNode("//eg/IPS");

            for (int i = 0; i < xn.ChildNodes.Count; ++i)
            {
                XmlNode     node = xn.ChildNodes[i];
                OFFICE_INFO oi   = new OFFICE_INFO();
                oi.IP_ID       = Convert.ToInt32(node.SelectSingleNode("ipid").InnerText.Trim());
                oi.CONFIG_IP   = node.SelectSingleNode("ip").InnerText.Trim();
                oi.SERVER_IP   = node.SelectSingleNode("SrvIp").InnerText.Trim();
                oi.SERVER_DNS  = node.SelectSingleNode("SrvDNS").InnerText.Trim();
                oi.SERVER_PORT = Convert.ToInt32(node.SelectSingleNode("SrvPort").InnerText.Trim());
                oi.SERVER_NAME = node.SelectSingleNode("SrvName").InnerText.Trim();
                oi.OFFICE_ALLY = node.SelectSingleNode("PeiZhi").InnerText.Trim();
                oi.OFFICE_NO   = node.SelectSingleNode("vcOffNo").InnerText.Trim();
                m_ls_office.Add(oi);
            }
            xn = xd.SelectSingleNode("//eg/UseCms");
            for (int i = 0; i < xn.ChildNodes.Count; ++i)
            {
                XmlNode node = xn.ChildNodes[i];
                string  cmd  = node.InnerText.Trim();
                m_ls_command.Add(cmd);
            }
            m_ls_command.Add("av");
        }