Esempio n. 1
0
        public M_User_Plat SelByNameAndPwd(string uname, string upwd, bool isMd5 = false)
        {
            B_User      buser = new B_User();
            B_User_Plat upBll = new B_User_Plat();

            return(upBll.SelReturnModel(buser.LoginUser(uname, upwd, isMd5).UserID));
        }
Esempio n. 2
0
        public static M_User_Plat GetLogin(bool flag)
        {
            B_User      buser = new B_User();
            B_User_Plat upBll = new B_User_Plat();

            return(upBll.SelReturnModel(buser.GetLogin(flag).UserID));
        }
Esempio n. 3
0
 /// <summary>
 /// 检测当前登录用户是否有对应的权限
 /// </summary>
 public static bool AuthCheck(string authname)
 {
     if (B_User_Plat.IsAdmin())
     {
         return(true);
     }
     else
     {
         B_Plat_UserRole urBll = new B_Plat_UserRole();
         return(urBll.AuthCheck(B_User_Plat.GetLogin().Plat_Role, authname));
     }
 }
Esempio n. 4
0
        /// <summary>
        /// 0:非Plat用户,1:未审核用户,2:已离职用户,99:正常用户
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        public static int IsPlatUser(int uid)
        {
            B_User_Plat upBll  = new B_User_Plat();
            M_User_Plat upMod  = upBll.SelReturnModel(uid);
            int         result = 99;

            if (upMod == null)
            {
                result = 0;
            }
            else if (upMod.Status != 1)
            {
                result = 1;
            }
            return(result);
        }