public DraftLawBL() { oUnitOfWork = new UnitOfWork(ConfigurationManager.ConnectionStrings["SSREntities"].ConnectionString); oRepositorio = oUnitOfWork.DraftLawRepository; oCommissionRepositorio = oUnitOfWork.CommissionRepository; oInterestAreaRepositorio = oUnitOfWork.InterestAreaRepository; oDebateSpeakerRepositorio = oUnitOfWork.DebateSpeakerRepository; }
/// <summary> /// 支付订单佣金 /// </summary> public async Task PayedOrderCommissionAsync(Order order) { order.PayCommission(); var commissions = await CommissionRepository.Find(t => t.OrderId == order.Id).Include(t => t.Order).ToListAsync(); foreach (var commission in commissions) { await ParCommissionAsync(commission); } }
public BookingViewingBLL() { MenuRepository = new MenuRepository(); RestaurantBookingRepository = new RestaurantBookingRepository(); AgencyRepository = new AgencyRepository(); CommissionRepository = new CommissionRepository(); ServiceOutsideRepository = new ServiceOutsideRepository(); GuideRepository = new GuideRepository(); AgencyContactRepository = new AgencyContactRepository(); ServiceOutsideDetailRepository = new ServiceOutsideDetailRepository(); }
/// <summary> /// 分页查询 /// </summary> /// <param name="parameter">查询参数</param> public async Task <PagerList <CommissionDto> > PagerQueryCommissionAsync(CommissionQuery parameter) { if (parameter == null) { return(new PagerList <CommissionDto>()); } var query = await CreateQuery(parameter); var queryable = CommissionRepository.FindAsNoTracking().Where(query); queryable = Filter(queryable, parameter); return((queryable.ToPagerList(query.GetPager())).Convert(ToDto)); }
public void Dispose() { if (MenuRepository != null) { MenuRepository.Dispose(); MenuRepository = null; } if (RestaurantBookingRepository != null) { RestaurantBookingRepository.Dispose(); RestaurantBookingRepository = null; } if (AgencyRepository != null) { AgencyRepository.Dispose(); AgencyRepository = null; } if (CommissionRepository != null) { CommissionRepository.Dispose(); CommissionRepository = null; } if (ServiceOutsideRepository != null) { ServiceOutsideRepository.Dispose(); ServiceOutsideRepository = null; } if (GuideRepository != null) { GuideRepository.Dispose(); GuideRepository = null; } if (AgencyContactRepository != null) { AgencyContactRepository.Dispose(); AgencyContactRepository = null; } if (ServiceOutsideDetailRepository != null) { ServiceOutsideDetailRepository.Dispose(); ServiceOutsideDetailRepository = null; } }
public void Dispose() { this._userRepository = null; this._permissionRepository = null; this._roleRepository = null; this._rolePermissionRepository = null; this._investigatorRepository = null; this._institutionRepository = null; this._interestAreaRepository = null; this._programRepository = null; this._investigationGroupRepository = null; this._commissionRepository = null; this._draftLawRepository = null; this._conceptRepository = null; this._badLanguageRepository = null; this._tagRepository = null; this._conceptStatusLogRepository = null; this._debateSpeakerRepository = null; this._educationalInstitutionRepository = null; this._knowledgeAreaRepository = null; this._academicLevelRepository = null; this._educationLevelRepository = null; this._snieRepository = null; this._meritRangeRepository = null; this._investigatorCommissionRepository = null; this._investigatorInterestAreaRepository = null; this._configurationRepository = null; this._notificationRepository = null; this._conceptDebateSpeakerRepository = null; this._consultationRepository = null; this._consultationInterestAreaRepository = null; this._draftLawStatusRepository = null; this._periodRepository = null; this._originRepository = null; this._userInstitutionRepository = null; this._consultationTypeRepository = null; this._reasonRejectRepository = null; _context.Dispose(); }
/// <summary> /// 添加佣金 /// </summary> private async Task AddCommissionAsync(Order order, CommissionType type, Agent agent) { if (agent == null) { return; } decimal commission = 0; switch (type) { case CommissionType.Level1: //commission = ConfigHelper.GetConfigString("CommissionLevel1").ToDecimal(); commission = 15; break; case CommissionType.Level2: //commission = ConfigHelper.GetConfigString("CommissionLevel2").ToDecimal(); commission = 10; break; case CommissionType.Level3: //commission = ConfigHelper.GetConfigString("CommissionLevel3").ToDecimal(); commission = 5; break; default: throw new ArgumentOutOfRangeException(nameof(type), type, null); } var model = new Commission(); model.Init(); model.Money = order.Money * commission / 100; model.Type = type; model.State = CommissionState.UnPayed; model.AgentId = agent.Id; model.OrderId = order.Id; await CommissionRepository.AddAsync(model); }
public CommissionService(IConfiguration configuration, BancoVVBAContext bancoVVBAContext) { _comRepository = new CommissionRepository(configuration, bancoVVBAContext); }
public CommissionBL() { oUnitOfWork = new UnitOfWork(ConfigurationManager.ConnectionStrings["SSREntities"].ConnectionString); oRepositorio = oUnitOfWork.CommissionRepository; }
public void CommissionDelete(Commission commission) { CommissionRepository.Delete(commission); }
public IList <Commission> CommissionGetAllByBookingId(int restaurantBookingId) { return(CommissionRepository.CommissionGetAllByBookingId(restaurantBookingId)); }
public void CommissionSaveOrUpdate(Commission commission) { CommissionRepository.SaveOrUpdate(commission); }
public Commission CommissionGetById(int commissionId) { return(CommissionRepository.GetById(commissionId)); }