public FindOutputManagersResponse FindOutputManagers(FindOutputManagersRequest request)
        {
            IClaimsIdentity identity = (IClaimsIdentity)Thread.CurrentPrincipal.Identity;
            string          upn      = identity.Claims.FindAll(c => { return(c.ClaimType == ClaimTypes.Upn); }).First().Value;

            InitializationActions.FindOutputManagersAction action = PolicyInjection.Create <InitializationActions.FindOutputManagersAction>();

            InitializationEntities.FindOutputManagersParameters parameters = Translators.FindOutputManagersTranslator.TranslateFromServiceToBusiness(request.FindOutputManagersParameters);

            //parameters.UserPrincipalIdentity = upn; /* user@domain */
            //parameters.UserIdentity = upn.Split('@')[0];


            InitializationEntities.FindOutputManagersResult r = action.Execute();

            FindOutputManagersResponse response = new FindOutputManagersResponse();

            response.FindOutputManagerResult = GenericMapper.MapNew <DataContracts.FindOutputManagerResult>(r);

            response.FindOutputManagerResult.OutputManagers =
                GenericMapper.MapListNew <DataContracts.OutputManagerCollection, InitializationEntities.FindOutputManagerResult, DataContracts.OutputManager>(
                    r.OutputManagers, Translators.FindOutputManagersTranslator.TranslateFromBusinessToService);


            return(response);
        }
Ejemplo n.º 2
0
        public FindUserDetailsResponse FindUserDetails(FindUserDetailsRequest request)
        {
            IClaimsIdentity identity = (IClaimsIdentity)Thread.CurrentPrincipal.Identity;
            string          upn      = identity.Claims.FindAll(c => { return(c.ClaimType == ClaimTypes.Upn); }).First().Value;

            AuthenticationActions.FindUserDetailsAction action = PolicyInjection.Create <AuthenticationActions.FindUserDetailsAction>();

            AuthenticationEntities.FindUserDetailsParameters parameters = Translators.FindUserDetailsTranslator.TranslateFromServiceToBusiness(request.FindUserDetailsParameters);

            parameters.UserPrincipalIdentity = upn; /* user@domain */
            parameters.UserIdentity          = upn.Split('@')[0];

            AuthenticationEntities.FindUserDetailsResult r = action.Execute(parameters);

            FindUserDetailsResponse response = new FindUserDetailsResponse();

            response.FindUserDetailsResult = GenericMapper.MapNew <DataContracts.FindUserDetailsResult>(r);

            response.FindUserDetailsResult.UserWarehouses = GenericMapper.MapListNew <DataContracts.UserWarehouseCollection, AuthenticationEntities.FindUserWarehousesResult, DataContracts.UserWarehouse>(
                r.Warehouses, Translators.FindUserDetailsTranslator.TranslateFromBusinessToService);

            response.FindUserDetailsResult.UserCompanies = GenericMapper.MapListNew <DataContracts.UserCompanyCollection, AuthenticationEntities.FindUserCompaniesResult, DataContracts.UserCompany>(
                r.Companies, Translators.FindUserDetailsTranslator.TranslateFromBusinessToService);

            return(response);
        }
 public static Business.EnableDatabaseTracingParameters TranslateFromServiceToBusiness(Service.EnableDatabaseTracingParameters enableTracingParams)
 {
     return(GenericMapper.MapNew <Business.EnableDatabaseTracingParameters>(enableTracingParams));
 }
 public static Service.FindAlarmTextResult TranslateFromBusinessToService(Business.FindAlarmTextResult businessEntity)
 {
     return(GenericMapper.MapNew <Service.FindAlarmTextResult>(businessEntity));
 }
 public static Business.FindAlarmTextParams TranslateFromServiceToBusiness(Service.FindAlarmTextParams findAlarmTextParams)
 {
     return(GenericMapper.MapNew <Business.FindAlarmTextParams>(findAlarmTextParams));
 }
 public static Business.ModifyUserDetailsParameters TranslateFromServiceToBusiness(Service.ModifyUserDetailsParameters serviceEntity)
 {
     return(GenericMapper.MapNew <Business.ModifyUserDetailsParameters>(serviceEntity));
 }
 public static Service.UserNode TranslateFromBusinessToService(Business.FindUserNodesResult businessEntity)
 {
     return(GenericMapper.MapNew <Service.UserNode>(businessEntity));
 }
Ejemplo n.º 8
0
 public static Business.LogonParameters TranslateFromServiceToBusiness(Service.LogonParameters serviceEntity)
 {
     return(GenericMapper.MapNew <Business.LogonParameters>(serviceEntity));
 }
Ejemplo n.º 9
0
 public static Service.LiftTruck TranslateFromBusinessToService(Business.LiftTruck businessEntity)
 {
     return(GenericMapper.MapNew <Service.LiftTruck>(businessEntity));
 }
Ejemplo n.º 10
0
 public static Business.LiftTruck TranslateFromServiceToBusiness(Service.LiftTruck serviceEntity)
 {
     return(GenericMapper.MapNew <Business.LiftTruck>(serviceEntity));
 }
 public static Service.OutputManager TranslateFromBusinessToService(Business.FindOutputManagerResult businessEntity)
 {
     return(GenericMapper.MapNew <Service.OutputManager>(businessEntity));
 }
 public static Business.FindOutputManagersParameters TranslateFromServiceToBusiness(Service.FindOutputManagersParameters serviceEntity)
 {
     return(GenericMapper.MapNew <Business.FindOutputManagersParameters>(serviceEntity));
 }