Пример #1
0
 public RolePermissionController(iPow.Infrastructure.Crosscutting.NetFramework.IWorkContext work,
     iPow.Infrastructure.Crosscutting.Authorize.IRoleService role,
     iPow.Infrastructure.Crosscutting.Authorize.IMvcActionService mvcAction,
     iPow.Infrastructure.Crosscutting.Authorize.IMvcControllerClassService mvcControllerClass,
     iPow.Infrastructure.Crosscutting.Authorize.IMvcControllerService mvcController,
     iPow.Infrastructure.Crosscutting.Authorize.IMvcRolePermissionService rolePermission)
 {
     if (role == null)
     {
         throw new ArgumentNullException("roleService is null");
     }
     if (mvcAction == null)
     {
         throw new ArgumentNullException("actionService is null");
     }
     if (mvcControllerClass == null)
     {
         throw new ArgumentNullException("actionService is null");
     }
     if (mvcController == null)
     {
         throw new ArgumentNullException("mvcControllerService is null");
     }
     if (rolePermission == null)
     {
         throw new ArgumentNullException("rolePermissionService is null");
     }
     roleService = role;
     mvcActionService = mvcAction;
     mvcControllerClassService = mvcControllerClass;
     mvcControllerService = mvcController;
     mvcRolePermissionService = rolePermission;
 }
Пример #2
0
 public TourDetailController(iPow.Infrastructure.Crosscutting.NetFramework.IWorkContext work,
     iPow.Domain.Repository.ITourClassRepository tourClass,
     iPow.Domain.Repository.ITourPlanDetailRepository tourPlanDetail,
     iPow.Domain.Repository.ITourPlanRepository tourPlan,
     iPow.Domain.Repository.ISightInfoRepository sightInfo,
     iPow.Domain.Repository.IHotelPropertyInfoRepository hotelPropertyInfo)
     : base(work)
 {
     if (tourClass == null)
     {
         throw new ArgumentNullException("tourClassRepository is null");
     }
     if (tourPlanDetail == null)
     {
         throw new ArgumentNullException("tourPlanDetailRepository is null");
     }
     if (tourPlan == null)
     {
         throw new ArgumentNullException("tourPlanRepository is null");
     }
     if (sightInfo == null)
     {
         throw new ArgumentNullException("sightInfoRepository is null");
     }
     if (hotelPropertyInfo == null)
     {
         throw new ArgumentNullException("hotelPropertyInfoRepository is null");
     }
     tourClassRepository = tourClass;
     tourPlanDetailRepository = tourPlanDetail;
     tourPlanRepository = tourPlan;
     sightInfoRepository = sightInfo;
     hotelPropertyInfoRepository = hotelPropertyInfo;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HotelTrafficService"/> class.
 /// </summary>
 /// <param name="hiService">The hi service.</param>
 /// <param name="ciService">The ci service.</param>
 public HotelTrafficService(IHotelInfoService hiService,
     ICityService ciService,
     iPow.Domain.Repository.ICityAreaCodeRepository cityAreaCode,
     IHotelAroundHotelService hahService,
     iPow.Domain.Repository.ISightInfoRepository sightInfo)
 {
     if (hiService == null)
     {
         throw new ArgumentNullException("ihotelinfoservice is null");
     }
     if (ciService == null)
     {
         throw new ArgumentNullException("cityservice is null");
     }
     if (cityAreaCode == null)
     {
         throw new ArgumentNullException("cityareacoderepository is null");
     }
     if (hahService == null)
     {
         throw new ArgumentNullException("hotelaroundhotelservice is null");
     }
     if (sightInfo == null)
     {
         throw new ArgumentNullException("sightinforepository is null");
     }
     hotelInfoService = hiService;
     cityService = ciService;
     cityAreaCodeRepository = cityAreaCode;
     hotelAroundHotelService = hahService;
     sightInfoRepository = sightInfo;
     Take = 10;
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PicInfoService"/> class.
 /// </summary>
 /// <param name="picInfo">The pic info.</param>
 /// <param name="picComm">The pic comm.</param>
 /// <param name="picClass">The pic class.</param>
 public PicInfoService(iPow.Domain.Repository.IPicInfoRepository picInfo,
     iPow.Domain.Repository.IPicCommRepository picComm,
     iPow.Domain.Repository.IPicClassRepository picClass,
     iPow.Application.jq.Service.ISightInfoService sis)
 {
     if (picInfo == null)
     {
         throw new ArgumentNullException("picinforepository is null");
     }
     if (picComm == null)
     {
         throw new ArgumentNullException("piccommrepository is null");
     }
     if (picClass == null)
     {
         throw new ArgumentNullException("picclassrepository is null");
     }
     if (sis == null)
     {
         throw new ArgumentNullException("sightinfoservice is null");
     }
     picInfoRepository = picInfo;
     picCommRepository = picComm;
     picClassRepository = picClass;
     sightInfoService = sis;
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ArticleService"/> class.
 /// </summary>
 /// <param name="articleInfo">The article info.</param>
 public ArticleService(iPow.Domain.Repository.IArticleInfoRepository articleInfo,
      iPow.Domain.Repository.ISightInfoRepository sightInfo,
     iPow.Domain.Repository.IArticleCommRepository articleComm,
     iPow.Domain.Repository.IArticleClassRepository articleClass,
     iPow.Application.jq.Service.ISightInfoService sis
     )
 {
     if (articleInfo == null)
     {
         throw new ArgumentNullException("articleInfoRepository is null");
     }
     if (sightInfo == null)
     {
         throw new ArgumentNullException("sightinforepository is null");
     }
     if (articleComm == null)
     {
         throw new ArgumentNullException("articleclassrepository is null");
     }
     if (articleClass == null)
     {
         throw new ArgumentNullException("articlecommrepository is null");
     }
     if (sis == null)
     {
         throw new ArgumentNullException("sightinfoservice is null");
     }
     articleInfoRepository = articleInfo;
     sightInfoRepository = sightInfo;
     articleCommRepository = articleComm;
     articleClassRepository = articleClass;
     sightInfoService = sis;
 }
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LinksAndTopCountService"/> class.
 /// </summary>
 public LinksAndTopCountService(iPow.Domain.Repository.ILinkInfoRepository linkInfo,
       iPow.Domain.Repository.ISightInfoRepository sightInfo,
       iPow.Domain.Repository.ITourPlanRepository tourPlan,
       iPow.Domain.Repository.IHotelPropertyInfoRepository hotelPropertyInfo
     )
 {
     if (linkInfo == null)
     {
         throw new ArgumentNullException("linkInfoRepository is null");
     }
     if (sightInfo == null)
     {
         throw new ArgumentNullException("sightInfoRepository is null");
     }
     if (tourPlan == null)
     {
         throw new ArgumentNullException("tourPlanRepository is null");
     }
     if (hotelPropertyInfo == null)
     {
         throw new ArgumentNullException("hotelPropertyInfoRepository is null");
     }
     linkInfoRepository = linkInfo;
     sightInfoRepository = sightInfo;
     tourPlanRepository = tourPlan;
     hotelPropertyInfoRepository = hotelPropertyInfo;
 }
Пример #7
0
 public ViewResult AddUserRole(iPow.Infrastructure.Crosscutting.Authorize.Dto.UserRoleDto userRole)
 {
     ViewBag.rolemodel = roleService.GetList();
     if (userRole != null && userRole.RoleID > 0)
     {
         var user = userService.GetUserByName(userRole.UserName);
         if (user != null && user.id > 0)
         {
             //判断User 是否存在当前所选Role  若没有则创建 有的话 阻止
             var isexist = userRoleService.UserHasUserRole(user.id, userRole.RoleID);
             if (isexist)  //该语法表示 已经存在
             {
                 ModelState.AddModelError("", "该用户已经存在同一角色!");
             }
             else
             {
                 var addUserRole = new iPow.Infrastructure.Data.DataSys.Sys_UserRoles();
                 addUserRole.RoleID = userRole.RoleID;
                 addUserRole.UserID = user.id;
                 userRoleService.Add(addUserRole,null);
                 ModelState.AddModelError("", "已成功为用户添加角色");
             }
         }
         else
         {
             ModelState.AddModelError("", "" + "在系统中没有找到这个用户");
         }
     }
     else
     {
         ModelState.AddModelError("", "请使用正确地操作方式");
     }
     return View(userRole);
 }
 public MvcControllerActionClassService(iPow.Domain.Repository.IMvcControllerActionClassRepository mvcControllerActionClass)
 {
     if (mvcControllerActionClass == null)
     {
         throw new ArgumentNullException(" mvcControllerActionClassRepository is null");
     }
     mvcControllerActionClassRepository = mvcControllerActionClass;
 }
Пример #9
0
 public PicInfoService( iPow.Domain.Repository.IPicInfoRepository picInfo)
 {
     if (picInfo == null)
         {
             throw new ArgumentNullException(" picInfoRepository   is null");
         }
         picInfoRepository = picInfo;
 }
Пример #10
0
 public phone_lyService( iPow.Domain.Repository.Iphone_lyRepository phone_ly)
 {
     if (phone_ly == null)
         {
             throw new ArgumentNullException(" phone_lyRepository   is null");
         }
         phone_lyRepository = phone_ly;
 }
Пример #11
0
 public LinksInfoService( iPow.Domain.Repository.ILinksInfoRepository linksInfo)
 {
     if (linksInfo == null)
         {
             throw new ArgumentNullException(" linksInfoRepository   is null");
         }
         linksInfoRepository = linksInfo;
 }
Пример #12
0
 public PicCommService( iPow.Domain.Repository.IPicCommRepository picComm)
 {
     if (picComm == null)
         {
             throw new ArgumentNullException(" picCommRepository   is null");
         }
         picCommRepository = picComm;
 }
Пример #13
0
 public CityInfoService( iPow.Domain.Repository.ICityInfoRepository cityInfo)
 {
     if (cityInfo == null)
         {
             throw new ArgumentNullException(" cityInfoRepository   is null");
         }
         cityInfoRepository = cityInfo;
 }
Пример #14
0
 public AdminUserExtensionService( iPow.Domain.Repository.IAdminUserExtensionRepository adminUserExtension)
 {
     if (adminUserExtension == null)
         {
             throw new ArgumentNullException(" adminUserExtensionRepository   is null");
         }
         adminUserExtensionRepository = adminUserExtension;
 }
Пример #15
0
 public ClientActivityService( iPow.Domain.Repository.IClientActivityRepository clientActivity)
 {
     if (clientActivity == null)
         {
             throw new ArgumentNullException(" clientActivityRepository   is null");
         }
         clientActivityRepository = clientActivity;
 }
Пример #16
0
 public T_DailyRatesService( iPow.Domain.Repository.IT_DailyRatesRepository t_DailyRates)
 {
     if (t_DailyRates == null)
         {
             throw new ArgumentNullException(" t_DailyRatesRepository   is null");
         }
         t_DailyRatesRepository = t_DailyRates;
 }
Пример #17
0
 public SightClassService( iPow.Domain.Repository.ISightClassRepository sightClass)
 {
     if (sightClass == null)
         {
             throw new ArgumentNullException(" sightClassRepository   is null");
         }
         sightClassRepository = sightClass;
 }
Пример #18
0
 public MvcControllerClassService(iPow.Domain.Repository.IMvcControllerClassRepository controllerClass)
 {
     if (controllerClass == null)
     {
         throw new ArgumentNullException("controllerClassService is null");
     }
     controllerClassRepository = controllerClass;
 }
Пример #19
0
 public SightInfoCirSightService( iPow.Domain.Repository.ISightInfoCirSightRepository sightInfoCirSight)
 {
     if (sightInfoCirSight == null)
         {
             throw new ArgumentNullException(" sightInfoCirSightRepository   is null");
         }
         sightInfoCirSightRepository = sightInfoCirSight;
 }
Пример #20
0
 public ArticleInfoService( iPow.Domain.Repository.IArticleInfoRepository articleInfo)
 {
     if (articleInfo == null)
         {
             throw new ArgumentNullException(" articleInfoRepository   is null");
         }
         articleInfoRepository = articleInfo;
 }
Пример #21
0
 public CityAreaCodeService( iPow.Domain.Repository.ICityAreaCodeRepository cityAreaCode)
 {
     if (cityAreaCode == null)
         {
             throw new ArgumentNullException(" cityAreaCodeRepository   is null");
         }
         cityAreaCodeRepository = cityAreaCode;
 }
Пример #22
0
 public HotelCommService( iPow.Domain.Repository.IHotelCommRepository hotelComm)
 {
     if (hotelComm == null)
         {
             throw new ArgumentNullException(" hotelCommRepository   is null");
         }
         hotelCommRepository = hotelComm;
 }
Пример #23
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="hotelPropertyInfo"></param>
 public HotelInfoService(iPow.Domain.Repository.IHotelPropertyInfoRepository hotelPropertyInfo)
 {
     if (hotelPropertyInfo == null)
     {
         throw new ArgumentNullException("hotelPropertyInfoRepository is null");
     }
     hotelPropertyInfoRepository = hotelPropertyInfo;
 }
Пример #24
0
 public AdminUserClassService( iPow.Domain.Repository.IAdminUserClassRepository adminUserClass)
 {
     if (adminUserClass == null)
         {
             throw new ArgumentNullException(" adminUserClassRepository   is null");
         }
         adminUserClassRepository = adminUserClass;
 }
Пример #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HotelSearchService"/> class.
 /// </summary>
 /// <param name="city">The city.</param>
 public HotelSearchService(iPow.Service.Union.Service.ICityService city)
 {
     if (city == null)
     {
         throw new ArgumentNullException("cityservice is null");
     }
     cityService = city;
 }
Пример #26
0
 public AcDataService( iPow.Domain.Repository.IAcDataRepository acData)
 {
     if (acData == null)
         {
             throw new ArgumentNullException(" acDataRepository   is null");
         }
         acDataRepository = acData;
 }
Пример #27
0
 public RolesService( iPow.Domain.Repository.IRolesRepository roles)
 {
     if (roles == null)
         {
             throw new ArgumentNullException(" rolesRepository   is null");
         }
         rolesRepository = roles;
 }
Пример #28
0
 public DiscountClassService(iPow.Domain.Repository.IDiscountClassRepository discountClass)
 {
     if (discountClass == null)
     {
         throw new ArgumentNullException(" discountClassRepository   is null");
     }
     discountClassRepository = discountClass;
 }
Пример #29
0
 public DiscountCommService( iPow.Domain.Repository.IDiscountCommRepository discountComm)
 {
     if (discountComm == null)
         {
             throw new ArgumentNullException(" discountCommRepository   is null");
         }
         discountCommRepository = discountComm;
 }
Пример #30
0
 public DisCountInfoService( iPow.Domain.Repository.IDisCountInfoRepository disCountInfo)
 {
     if (disCountInfo == null)
         {
             throw new ArgumentNullException(" disCountInfoRepository   is null");
         }
         disCountInfoRepository = disCountInfo;
 }