Exemple #1
0
    private AdminUser ParseAdminUserDetails(XmlDocument adminUser)
    {
        XmlNode   userNode = adminUser.SelectSingleNode("//AdminUser");
        AdminUser user     = new AdminUser();

        if (adminUser != null)
        {
            string empid = ParseNodeValue(userNode, "EmployeeID");
            if (!String.IsNullOrWhiteSpace(empid))
            {
                user.EmployeeId = m_commonInc.CleanString(empid);
            }
            else
            {
                user.EmployeeId = null;
            }
            user.FirstName  = m_commonInc.CleanString(ParseNodeValue(userNode, "FirstName"));
            user.LastName   = m_commonInc.CleanString(ParseNodeValue(userNode, "LastName"));
            user.UserName   = m_commonInc.CleanString(ParseNodeValue(userNode, "UserName"));
            user.Email      = ParseNodeValue(userNode, "Email");
            user.AlertEmail = ParseNodeValue(userNode, "AlertEmail");
            string sLangId = ParseNodeValue(userNode, "LanguageID");

            if (!String.IsNullOrEmpty(sLangId))
            {
                user.LanguageID = GetLanguageId(sLangId);
            }
            else
            {
                user.LanguageID = 1;
            }
        }
        return(user);
    }