Ejemplo n.º 1
0
 public static string AutoNameCreate(string sName)
 {
     if (UserBll.AccountIfAt(sName))
     {
         int    iRAutoNum = RNameAutoBLL.NumSelByName(sName);
         int    iNum      = iRAutoNum + 1;
         string sAccount  = string.Format("{0}_{1}", sName, iNum);//
         RNameAutoBLL.RNameAutoAdd(sName, iNum);
         if (UserBll.AccountIfAt(sAccount))
         {
             return(ProvideCommon.GenerateStringID());
         }
         else
         {
             return(sAccount);
         }
     }
     else
     {
         return(sName);
     }
 }
Ejemplo n.º 2
0
        public static string GetAccount(string sNickName)
        {
            string sAccount = string.Empty;

            if (sNickName.Length < 1)
            {
                sAccount = ProvideCommon.GenerateStringID();
            }
            else
            {
                int iUserID = UserBll.UserIDSel(sNickName);
                if (iUserID > 999)
                {
                    sAccount = RNameAutoBLL.AutoNameCreate(sNickName);
                }
                else
                {
                    sAccount = sNickName;
                }
            }
            return(sAccount);
        }