예제 #1
0
        /// <summary>
        /// 获取用户登陆信息
        /// </summary>
        protected void GetLoginInfo()
        {
            if (userID == "0")
            {
                //admin
                string xml = Server.MapPath("~/SysAdmin/Configuraion/adminLoginInfo.config");
                strLastLoginDate = Utils.XmlRead(xml, "/root/LastLoginDate", "");
                strLastLoginIP   = Utils.XmlRead(xml, "/root/LastLoginIp", "");
                strLoginCount    = Utils.XmlRead(xml, "/root/LoginCount", "");
            }
            else
            {
                AccountSite bllAccountSite = new AccountSite();
                DataTable   dt             = bllAccountSite.GetList("USERID", Utils.getTwoParams(userID, SiteID.ToString()));
                if (dt.Rows.Count > 0)
                {
                    strLastLoginDate = dt.Rows[0]["LastLoginDate"].ToString();
                    strLastLoginIP   = dt.Rows[0]["LastLoginIP"].ToString();
                    strLoginCount    = dt.Rows[0]["LoginCount"].ToString();
                }
            }
            List <string> dbInfo = new Top().GetDataBaseInfo();

            DataBaseVersion = dbInfo[0];
            DataBaseSize    = dbInfo[1];
            LogSize         = dbInfo[2];
        }
예제 #2
0
        public static string CheckName(string UserName, string SiteID)
        {
            string strResult = string.Empty;

            KingTop.BLL.SysManage.AccountSite objAccountSite = new AccountSite();
            DataTable dt = objAccountSite.GetList("ISHAVESITE", Utils.getTwoParams(UserName, SiteID));

            if (dt.Rows.Count > 0)
            {
                strResult = "1";
            }
            else
            {
                strResult = isExist(UserName) ? "2" : "3";
            }
            return(strResult);
        }
예제 #3
0
        /// <summary>
        /// 获取工作台的位置信息
        /// </summary>
        /// <returns></returns>
        protected string GetPosition()
        {
            string position = "";

            //先判断是不是超级用户
            if (userID == "0")
            {
                string xml = Server.MapPath("~/SysAdmin/Configuraion/adminLoginInfo.config");
                position = Utils.XmlRead(xml, "/root/Position", "");
            }
            else
            {
                AccountSite bllAccountSite = new AccountSite();
                DataTable   dt             = bllAccountSite.GetList("USERID", Utils.getTwoParams(userID, SiteID.ToString()));
                //数据库若没位置信息,则默认为"c1:1@2@3|c2:4@5@6"
                position = (dt.Rows.Count > 0 && dt.Rows[0]["POSITION"].ToString().Trim() != "") ? dt.Rows[0]["POSITION"].ToString() : "c1:1@3@5@7@|c2:2@4@6@8@|";
            }

            return(position);
        }