public static void MakeAdmin(string userIDs, RankE humanRankID, RoleE roleID) { System.Data.SqlClient.SqlTransaction t = null; try { t = SqlHelper.BeginTransaction(Config.ConnectionString); //BaseCollection.ExecuteSql2(t, "update [User] set HumanRankID = " +humanRankID.ToString("d") +" WHERE userID in (" +userIDs +")"); BaseCollection.ExecuteSql2(t, "update [UserRole] set RoleID = " + roleID.ToString("d") + " WHERE userID in (" + userIDs + ")"); SqlHelper.CommitTransaction(t); } catch (Exception ex) { SqlHelper.RollbackTransaction(t); Log.Write(Ap.Cxt, ex); } }
public static bool IsInRole(RoleE role) { return UWeb.Principal.IsInRole(((int)role).ToString()); }
public static bool IsInRole(RoleE role) { return(UWeb.Principal.IsInRole(((int)role).ToString())); }