Пример #1
0
        public UMResponse GetUsers(string SessionID)
        {
            //IGlobalUserRepository _IGlobalUserRepository;
            //_IGlobalUserRepository = new GlobalUserRepository(new WorkersInMotionDB());
            //IUserProfileRepository _IUserProfileRepository;
            //_IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
            UMResponse _umResponse = new UMResponse();

            //_umResponse.GlobalUser = new List<MGlobalUser>();
            //_umResponse.UserProfile = new List<MUserProfile>();
            //GetUsers _getUsers = new GetUsers();
            //if (!string.IsNullOrEmpty(SessionID))
            //{
            //    _getUsers = _IGlobalUserRepository.GetClientUsers(SessionID);
            //}
            //if (_getUsers.GlobalUser.Count > 0)
            //{
            //    foreach (GlobalUser item in _getUsers.GlobalUser)
            //    {
            //        //MGlobalUser _mglobalUser = new MGlobalUser();
            //        //_mglobalUser.UserGUID = item.UserGUID;
            //        //_mglobalUser.UserType = item.UserType;
            //        //_mglobalUser.UserName = item.UserName;
            //        //_mglobalUser.Password = item.Password;
            //        //_mglobalUser.OrganizationGUID = item.OrganizationGUID;
            //        //_mglobalUser.Role_Id = item.Role_Id;
            //        //_mglobalUser.IsActive = item.IsActive;
            //        //_mglobalUser.CreatedDate = item.CreatedDate;
            //        //_mglobalUser.ApplicationURL = item.ApplicationURL;
            //        //_mglobalUser.ReportingPlaceType = item.ReportingPlaceType != null ? Convert.ToInt32(item.ReportingPlaceType) : 0;
            //        //_mglobalUser.ReportPlaceGUID = item.ReportPlaceGUID != null ? new Guid(item.ReportPlaceGUID.ToString()) : Guid.Empty;
            //        //_mglobalUser.IsExempt = item.IsExempt;
            //        //_mglobalUser.RegionGUID = new Guid(item.RegionGUID.ToString());
            //        //_mglobalUser.TerritoryGUID = new Guid(item.TerritoryGUID.ToString());
            //        //_mglobalUser.GroupGUID = new Guid(item.GroupGUID.ToString());
            //        //_mglobalUser.IsDelete = item.IsDelete != null ? Convert.ToBoolean(item.IsDelete) : false;
            //        // _umResponse.GlobalUser.Add(_mglobalUser);
            //    }

            //}
            //if (_getUsers.GlobalUser.Count > 0)
            //{
            //    foreach (UserProfile item in _getUsers.UserProfile)
            //    {
            //        //MUserProfile _muserprofile = new MUserProfile();
            //        //_muserprofile.UserGUID = item.UserGUID;
            //        //_muserprofile.ProfileGUID = item.ProfileGUID;
            //        //_muserprofile.OrganizationGUID = item.OrganizationGUID;
            //        //_muserprofile.FirstName = item.FirstName;
            //        //_muserprofile.LastName = item.LastName;
            //        //_muserprofile.CompanyName = item.CompanyName;
            //        //_muserprofile.MobilePhone = item.MobilePhone;
            //        //_muserprofile.BusinessPhone = item.BusinessPhone;
            //        //_muserprofile.HomePhone = item.HomePhone;
            //        //_muserprofile.Email = item.Email;
            //        //_muserprofile.AddressLine1 = item.AddressLine1;
            //        //_muserprofile.AddressLine2 = item.AddressLine2;
            //        //_muserprofile.City = item.City;
            //        //_muserprofile.State = item.State;
            //        //_muserprofile.Country = item.Country;
            //        //_muserprofile.ZipCode = item.ZipCode;
            //        //_muserprofile.IsDeleted = item.IsDeleted;
            //        //_muserprofile.CreatedDate = item.CreatedDate;
            //        //_muserprofile.PicFilename = item.PicFilename;
            //        //_umResponse.UserProfile.Add(_muserprofile);
            //    }

            //}

            return(_umResponse);
        }
Пример #2
0
        public UMResponse GetUsers(string SessionID)
        {
            //IGlobalUserRepository _IGlobalUserRepository;
            //_IGlobalUserRepository = new GlobalUserRepository(new WorkersInMotionDB());
            //IUserProfileRepository _IUserProfileRepository;
            //_IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
            UMResponse _umResponse = new UMResponse();
            //_umResponse.GlobalUser = new List<MGlobalUser>();
            //_umResponse.UserProfile = new List<MUserProfile>();
            //GetUsers _getUsers = new GetUsers();
            //if (!string.IsNullOrEmpty(SessionID))
            //{
            //    _getUsers = _IGlobalUserRepository.GetClientUsers(SessionID);
            //}
            //if (_getUsers.GlobalUser.Count > 0)
            //{
            //    foreach (GlobalUser item in _getUsers.GlobalUser)
            //    {
            //        //MGlobalUser _mglobalUser = new MGlobalUser();
            //        //_mglobalUser.UserGUID = item.UserGUID;
            //        //_mglobalUser.UserType = item.UserType;
            //        //_mglobalUser.UserName = item.UserName;
            //        //_mglobalUser.Password = item.Password;
            //        //_mglobalUser.OrganizationGUID = item.OrganizationGUID;
            //        //_mglobalUser.Role_Id = item.Role_Id;
            //        //_mglobalUser.IsActive = item.IsActive;
            //        //_mglobalUser.CreatedDate = item.CreatedDate;
            //        //_mglobalUser.ApplicationURL = item.ApplicationURL;
            //        //_mglobalUser.ReportingPlaceType = item.ReportingPlaceType != null ? Convert.ToInt32(item.ReportingPlaceType) : 0;
            //        //_mglobalUser.ReportPlaceGUID = item.ReportPlaceGUID != null ? new Guid(item.ReportPlaceGUID.ToString()) : Guid.Empty;
            //        //_mglobalUser.IsExempt = item.IsExempt;
            //        //_mglobalUser.RegionGUID = new Guid(item.RegionGUID.ToString());
            //        //_mglobalUser.TerritoryGUID = new Guid(item.TerritoryGUID.ToString());
            //        //_mglobalUser.GroupGUID = new Guid(item.GroupGUID.ToString());
            //        //_mglobalUser.IsDelete = item.IsDelete != null ? Convert.ToBoolean(item.IsDelete) : false;
            //        // _umResponse.GlobalUser.Add(_mglobalUser);
            //    }

            //}
            //if (_getUsers.GlobalUser.Count > 0)
            //{
            //    foreach (UserProfile item in _getUsers.UserProfile)
            //    {
            //        //MUserProfile _muserprofile = new MUserProfile();
            //        //_muserprofile.UserGUID = item.UserGUID;
            //        //_muserprofile.ProfileGUID = item.ProfileGUID;
            //        //_muserprofile.OrganizationGUID = item.OrganizationGUID;
            //        //_muserprofile.FirstName = item.FirstName;
            //        //_muserprofile.LastName = item.LastName;
            //        //_muserprofile.CompanyName = item.CompanyName;
            //        //_muserprofile.MobilePhone = item.MobilePhone;
            //        //_muserprofile.BusinessPhone = item.BusinessPhone;
            //        //_muserprofile.HomePhone = item.HomePhone;
            //        //_muserprofile.Email = item.Email;
            //        //_muserprofile.AddressLine1 = item.AddressLine1;
            //        //_muserprofile.AddressLine2 = item.AddressLine2;
            //        //_muserprofile.City = item.City;
            //        //_muserprofile.State = item.State;
            //        //_muserprofile.Country = item.Country;
            //        //_muserprofile.ZipCode = item.ZipCode;
            //        //_muserprofile.IsDeleted = item.IsDeleted;
            //        //_muserprofile.CreatedDate = item.CreatedDate;
            //        //_muserprofile.PicFilename = item.PicFilename;
            //        //_umResponse.UserProfile.Add(_muserprofile);
            //    }

            //}

            return _umResponse;
        }