Exemple #1
0
 public static string[] FindUsersInRole(string rolename, string usernameToMatch)
 {
     return(Provider.FindUsersInRole(rolename, usernameToMatch));
 }
Exemple #2
0
 public static void RemoveUsersFromRoles(string [] usernames, string [] rolenames)
 {
     Provider.RemoveUsersFromRoles(usernames, rolenames);
 }
Exemple #3
0
 public static bool RoleExists(string rolename)
 {
     return(Provider.RoleExists(rolename));
 }
 public static bool DeleteUser(string username)
 {
     SecUtility.CheckParameter(ref username, true, true, true, 0, "username");
     return(Provider.DeleteUser(username, true));
 }
Exemple #5
0
 public static void RemoveUsersFromRole(string [] usernames, string rolename)
 {
     Provider.RemoveUsersFromRoles(usernames, new string[] { rolename });
 }
Exemple #6
0
 public static void AddUserToRole(string username, string rolename)
 {
     Provider.AddUsersToRoles(new string[] { username }, new string[] { rolename });
 }
Exemple #7
0
 public static void CreateRole(string rolename)
 {
     Provider.CreateRole(rolename);
 }
Exemple #8
0
 public static string [] GetRolesForUser()
 {
     return(Provider.GetRolesForUser(CurrentUser));
 }
Exemple #9
0
 public static string [] GetRolesForUser(string username)
 {
     return(Provider.GetRolesForUser(username));
 }
Exemple #10
0
 public static bool DeleteRole(string rolename, bool throwOnPopulatedRole)
 {
     return(Provider.DeleteRole(rolename, throwOnPopulatedRole));
 }
Exemple #11
0
 public static string [] GetAllRoles()
 {
     return(Provider.GetAllRoles());
 }
Exemple #12
0
 public static bool DeleteRole(string rolename)
 {
     return(Provider.DeleteRole(rolename, true));
 }
Exemple #13
0
 public static int GetNumberOfUsersOnline()
 {
     return(Provider.GetNumberOfUsersOnline());
 }
Exemple #14
0
 public static bool DeleteUser(string username, bool deleteAllRelatedData)
 {
     SecUtility.CheckParameter(ref username, true, true, true, 0, "username");
     return(Provider.DeleteUser(username, deleteAllRelatedData));
 }
Exemple #15
0
 public static void AddUsersToRole(string [] usernames, string rolename)
 {
     Provider.AddUsersToRoles(usernames, new string[] { rolename });
 }
Exemple #16
0
 public static string [] GetUsersInRole(string rolename)
 {
     return(Provider.GetUsersInRole(rolename));
 }
Exemple #17
0
 public static void AddUsersToRoles(string [] usernames, string [] rolenames)
 {
     Provider.AddUsersToRoles(usernames, rolenames);
 }
Exemple #18
0
 public static void RemoveUserFromRole(string username, string rolename)
 {
     Provider.RemoveUsersFromRoles(new string[] { username }, new string[] { rolename });
 }
Exemple #19
0
 public static void AddUserToRoles(string username, string [] rolenames)
 {
     Provider.AddUsersToRoles(new string[] { username }, rolenames);
 }
Exemple #20
0
 public static void RemoveUserFromRoles(string username, string [] rolenames)
 {
     Provider.RemoveUsersFromRoles(new string[] { username }, rolenames);
 }
            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;
            }
Exemple #22
0
        public static MembershipUser GetUser(string username, bool userIsOnline)
        {
            SecUtility.CheckParameter(ref username, true, false, true, 0, "username");

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