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); } }
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); }