Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 09:56:39 (14 years ago)
Author:
mjesner
Message:

#1196

Location:
branches/UserManagement/HeuristicLab.Services.Authentication
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/UserManagement/HeuristicLab.Services.Authentication/AuthenticationService.cs

    r4647 r4726  
    2626                               where item.UserId == id
    2727                               select item;
    28                     User user = Convert.ToDataTransfer((aspnet_User)User.Single());
     28                    aspnet_User eUser = User.Single();
     29
     30                    User user = Convert.ToDataTransfer((aspnet_User)eUser);
    2931
    3032                    if (user == null) { return null; }
    3133
    32                     Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();
    33 
    34                     var Membership = from item in MembershipTable
    35                                      where item.UserId == id
    36                                      select item;
    37 
    38                     Membership membership = Convert.ToDataTransfer((aspnet_Membership)Membership.Single());
     34                    //Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();
     35
     36                    //var Membership = from item in MembershipTable
     37                    //                 where item.UserId == id
     38                    //                 select item;
     39
     40                    Membership membership = Convert.ToDataTransfer((aspnet_Membership)eUser.aspnet_Membership);
    3941
    4042                    if (membership == null) { return null; }
     
    112114                        if (user== null) { return null; }
    113115
    114                         Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();
    115 
    116                         var Membership = from item in MembershipTable
    117                                          where item.UserId == user.UserId
    118                                          select item;
    119 
    120                         Membership membership = Convert.ToDataTransfer((aspnet_Membership)Membership.Single());
     116                        //Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();
     117
     118                        //var Membership = from item in MembershipTable
     119                        //                 where item.UserId == user.UserId
     120                        //                 select item;
     121
     122                        Membership membership = Convert.ToDataTransfer((aspnet_Membership)eUser.aspnet_Membership);
    121123
    122124                        if (membership == null) { return null; }
     
    456458                        Role role = GetRole(id);
    457459
    458                         bool deleteOnlyIfRoleIsEmpty = true;
     460                        bool deleteOnlyIfRoleIsEmpty = false;
    459461                        if (role == null)
    460462                        {
     
    716718        }
    717719
     720        public IEnumerable<DataTransfer.Application> GetApplications()
     721        {
     722            List<DataTransfer.Application> ApplicationList = new List<DataTransfer.Application>();
     723            using (UserManagementDataContext db = new UserManagementDataContext())
     724            {
     725                try
     726                {
     727                    Table<aspnet_Application> ApplicationTable = db.GetTable<aspnet_Application>();
     728                    var Applications = from item in ApplicationTable
     729                                select item;
     730                    foreach (var eApplication in Applications)
     731                    {
     732
     733                        Application application = Convert.ToDataTransfer(eApplication);
     734
     735                        if (application == null) { return null; }
     736
     737
     738                        ApplicationList.Add(application);
     739                    }
     740                }
     741                catch (Exception ex)
     742                {
     743                    Debug.WriteLine(ex.InnerException);
     744                    return new List<Application>();
     745                }
     746            }
     747
     748            return ApplicationList;
     749        }
     750
     751
     752
    718753        #endregion
    719754
  • branches/UserManagement/HeuristicLab.Services.Authentication/Interfaces/IAuthenticationService.cs

    r4647 r4726  
    8282        [OperationContract]
    8383        bool DeleteApplication(Application application);
     84
     85         [OperationContract]
     86        IEnumerable<DataTransfer.Application> GetApplications();
     87
    8488        #endregion
    8589
Note: See TracChangeset for help on using the changeset viewer.