示例#1
0
 public static string[] FindUsersInRole(string rolename, string usernameToMatch)
 {
     return(Provider.FindUsersInRole(rolename, usernameToMatch));
 }
示例#2
0
 public static void RemoveUsersFromRoles(string [] usernames, string [] rolenames)
 {
     Provider.RemoveUsersFromRoles(usernames, rolenames);
 }
示例#3
0
 public static bool RoleExists(string rolename)
 {
     return(Provider.RoleExists(rolename));
 }
示例#4
0
 public static bool DeleteUser(string username)
 {
     SecUtility.CheckParameter(ref username, true, true, true, 0, "username");
     return(Provider.DeleteUser(username, true));
 }
示例#5
0
 public static void RemoveUsersFromRole(string [] usernames, string rolename)
 {
     Provider.RemoveUsersFromRoles(usernames, new string[] { rolename });
 }
示例#6
0
 public static void AddUserToRole(string username, string rolename)
 {
     Provider.AddUsersToRoles(new string[] { username }, new string[] { rolename });
 }
示例#7
0
 public static void CreateRole(string rolename)
 {
     Provider.CreateRole(rolename);
 }
示例#8
0
 public static string [] GetRolesForUser()
 {
     return(Provider.GetRolesForUser(CurrentUser));
 }
示例#9
0
 public static string [] GetRolesForUser(string username)
 {
     return(Provider.GetRolesForUser(username));
 }
示例#10
0
 public static bool DeleteRole(string rolename, bool throwOnPopulatedRole)
 {
     return(Provider.DeleteRole(rolename, throwOnPopulatedRole));
 }
示例#11
0
 public static string [] GetAllRoles()
 {
     return(Provider.GetAllRoles());
 }
示例#12
0
 public static bool DeleteRole(string rolename)
 {
     return(Provider.DeleteRole(rolename, true));
 }
示例#13
0
 public static int GetNumberOfUsersOnline()
 {
     return(Provider.GetNumberOfUsersOnline());
 }
示例#14
0
 public static bool DeleteUser(string username, bool deleteAllRelatedData)
 {
     SecUtility.CheckParameter(ref username, true, true, true, 0, "username");
     return(Provider.DeleteUser(username, deleteAllRelatedData));
 }
示例#15
0
 public static void AddUsersToRole(string [] usernames, string rolename)
 {
     Provider.AddUsersToRoles(usernames, new string[] { rolename });
 }
示例#16
0
 public static string [] GetUsersInRole(string rolename)
 {
     return(Provider.GetUsersInRole(rolename));
 }
示例#17
0
 public static void AddUsersToRoles(string [] usernames, string [] rolenames)
 {
     Provider.AddUsersToRoles(usernames, rolenames);
 }
示例#18
0
 public static void RemoveUserFromRole(string username, string rolename)
 {
     Provider.RemoveUsersFromRoles(new string[] { username }, new string[] { rolename });
 }
示例#19
0
 public static void AddUserToRoles(string username, string [] rolenames)
 {
     Provider.AddUsersToRoles(new string[] { username }, rolenames);
 }
示例#20
0
 public static void RemoveUserFromRoles(string username, string [] rolenames)
 {
     Provider.RemoveUsersFromRoles(new string[] { username }, rolenames);
 }
示例#21
0
            public ResultsInfo RetrieveResultsInfo()
            {
                string[] pracCols = { "PracticeName", "Latitude", "Longitude", "LocationAddress1", "LocationCity", "LocationState", "LocationZip", "Distance" };
                string[] provCols = { "ProviderName", "NPI", "RangeMin", "RangeMax", "FairPrice", "HGRecognized", "HGOverallRating", "HGPatientCount", "PracticeName" };

                ResultsInfo ri = new ResultsInfo();
                ri.ResultCount = this._results.Rows.Count;
                ri.EndOfResults = true; //We aren't buffering these results so for now just load the whole set and don't try again.

                List<Result> lResult = new List<Result>();
                using (DataView dv = new DataView(this._results))
                {
                    string[] UniquePractCol = { "PracticeName" };
                    using (DataTable uniquePractices = dv.ToTable("ByPractice", true, UniquePractCol))
                    {
                        foreach (DataRow dr in uniquePractices.Rows)
                        {
                            Result r = new Result(lResult.Count + 1);
                            using (DataView byPractice = new DataView(dv.ToTable("PracticeInfo", true, pracCols)))
                            {
                                byPractice.RowFilter = "PracticeName = '" + dr[0].ToString().Replace("'", "''") + "'";
                                Practice pr = new Practice();
                                pr.Name = byPractice[0].Row[pracCols[0].ToString()].ToString();
                                pr.Lat = byPractice[0].Row[pracCols[1].ToString()].ToString();
                                pr.Lng = byPractice[0].Row[pracCols[2].ToString()].ToString();
                                pr.Address1 = byPractice[0].Row[pracCols[3].ToString()].ToString();
                                pr.City = byPractice[0].Row[pracCols[4].ToString()].ToString();
                                pr.State = byPractice[0].Row[pracCols[5].ToString()].ToString();
                                pr.Zip = byPractice[0].Row[pracCols[6].ToString()].ToString();
                                pr.Distance = byPractice[0].Row[pracCols[7].ToString()].ToString();

                                FormsAuthenticationTicket tk = new FormsAuthenticationTicket(string.Format("{0}|{1}|{2}|{3}"
                                    , pr.Name
                                    , ""
                                    , ""
                                    , pr.Distance)
                                    , false, 5);
                                pr.Nav = FormsAuthentication.Encrypt(tk);

                                r.Practice = pr;
                            }
                            List<Provider> provsAtPrac = new List<Provider>();
                            using (DataView byProvider = new DataView(dv.ToTable("ProviderInfo", false, provCols)))
                            {
                                byProvider.RowFilter = "PracticeName = '" + dr[0].ToString().Replace("'", "''") + "'";
                                for (int i = 0; i < byProvider.Count; i++)
                                {
                                    Provider pr = new Provider(lResult.Count + 1);
                                    pr.Name = byProvider[i].Row[provCols[0].ToString()].ToString();
                                    pr.NPI = byProvider[i].Row[provCols[1].ToString()].ToString();
                                    pr.RangeMin = byProvider[i].Row[provCols[2].ToString()].ToString();
                                    pr.RangeMax = byProvider[i].Row[provCols[3].ToString()].ToString();
                                    pr.IsFairPrice = Boolean.Parse(byProvider[i].Row[provCols[4].ToString()].ToString());
                                    pr.IsHGRecognized = Boolean.Parse(byProvider[i].Row[provCols[5].ToString()].ToString());
                                    pr.HGRating = byProvider[i].Row[provCols[6].ToString()].ToString();
                                    pr.HGRatingCount = byProvider[i].Row[provCols[7].ToString()].ToString();

                                    FormsAuthenticationTicket tk = new FormsAuthenticationTicket(string.Format("{0}|{1}|{2}|{3}"
                                    , r.Practice.Name
                                    , pr.Name
                                    , pr.NPI
                                    , r.Practice.Distance)
                                    , false, 5);
                                    pr.Nav = FormsAuthentication.Encrypt(tk);

                                    provsAtPrac.Add(pr);
                                }
                            }
                            r.Providers = provsAtPrac.ToArray<Provider>();
                            lResult.Add(r);
                        }
                    }
                }
                ri.Results = lResult.ToArray<Result>();

                return ri;
            }
示例#22
0
        public static MembershipUser GetUser(string username, bool userIsOnline)
        {
            SecUtility.CheckParameter(ref username, true, false, true, 0, "username");

            return(Provider.GetUser(username, userIsOnline));
        }