public AccountInfoController(IAccountLogic l, ITeamLogic t, IActivityLogic a, IAttainmentLogic attainment, IBadgeLogic badge)
 {
     logic = l;
     tLogic = t;
     ActivityLogic = a;
     BadgeLogic = badge;
     AttainmentLogic = attainment;
 }
Beispiel #2
0
        public bool UpdateEmploye([FromBody] EmployeModel model)
        {
            Mapper.CreateMap <EmployeModel, Employe>();                      // 配置
            Employe       e     = Mapper.Map <EmployeModel, Employe>(model); // 使用AutoMapper自动映射
            IAccountLogic IUser = container.Resolve <IAccountLogic>();

            //执行
            return(IUser.UpdateEmploye(e));
        }
Beispiel #3
0
        public bool InsertRole([FromBody] RoleModel model)
        {
            Mapper.CreateMap <RoleModel, Role>();                      // 配置
            Role          role  = Mapper.Map <RoleModel, Role>(model); // 使用AutoMapper自动映射
            IAccountLogic IUser = container.Resolve <IAccountLogic>();

            //执行
            return(IUser.InsertRole(role));
        }
Beispiel #4
0
        public bool UpdateOrganize([FromBody] OrganizeModel model)
        {
            IAccountLogic IComponent = container.Resolve <IAccountLogic>();

            Mapper.CreateMap <OrganizeModel, Organize>();                    // 配置
            Organize organize = Mapper.Map <OrganizeModel, Organize>(model); // 使用AutoMapper自动映射

            return(IComponent.UpdateOrganize(organize));
        }
Beispiel #5
0
        public List <RoleModel> GetRoleList(int pageIndex, int pageSize)
        {
            IAccountLogic IComponent = container.Resolve <IAccountLogic>();
            List <Role>   list       = IComponent.GetRoleList(pageIndex, pageSize);

            Mapper.CreateMap <Role, RoleModel>();                                            // 配置
            List <RoleModel> resultList = Mapper.Map <List <Role>, List <RoleModel> >(list); // 使用AutoMapper自动映射

            return(resultList);
        }
Beispiel #6
0
        public OrganizeModel GetOrganize(Guid id)
        {
            IAccountLogic IComponent = container.Resolve <IAccountLogic>();
            Organize      organize   = IComponent.GetOrganize(id);

            Mapper.CreateMap <Organize, OrganizeModel>();                         // 配置
            OrganizeModel model = Mapper.Map <Organize, OrganizeModel>(organize); // 使用AutoMapper自动映射

            return(model);
        }
Beispiel #7
0
        public List <OrganizeModel> GetOrganizeList()
        {
            IAccountLogic   IComponent = container.Resolve <IAccountLogic>();
            List <Organize> list       = IComponent.GetOrganizeList();

            Mapper.CreateMap <Organize, OrganizeModel>();                                                // 配置
            List <OrganizeModel> resultList = Mapper.Map <List <Organize>, List <OrganizeModel> >(list); // 使用AutoMapper自动映射

            return(resultList);
        }
        public AccountsController()
        {
            LogicFactory lf = new LogicFactory();

            this.accLogic         = lf.GetAccountLogic();
            this.mapper           = Models.MapperFactory.CreateMapper();
            this.vm               = new AccountsViewModel();
            vm.CurrentlyEdited    = new Account();
            vm.AccountsInDatabase = mapper.Map <IEnumerable <CarRental.Logic.DTO.Account>, IEnumerable <CarRental.Web.Models.Account> >(this.accLogic.GetAccountData());
        }
Beispiel #9
0
        public EmployeModel GetEmploye(Guid id)
        {
            IAccountLogic IComponent = container.Resolve <IAccountLogic>();
            Employe       employe    = IComponent.GetEmploye(id);

            Mapper.CreateMap <Employe, EmployeModel>(); // 配置
            EmployeModel model = Mapper.Map <Employe, EmployeModel>(employe);

            return(model);
        }
Beispiel #10
0
        public List <EmployeModel> GetEmployeList(int pageIndex, int pageSize)
        {
            IAccountLogic  IComponent = container.Resolve <IAccountLogic>();
            List <Employe> list       = IComponent.GetEmployeList(pageIndex, pageSize);

            Mapper.CreateMap <Employe, EmployeModel>(); // 配置
            List <EmployeModel> resultList = Mapper.Map <List <Employe>, List <EmployeModel> >(list);

            return(resultList);
        }
Beispiel #11
0
        public RoleModel GetRole(Guid id)
        {
            IAccountLogic IComponent = container.Resolve <IAccountLogic>();
            Role          role       = IComponent.GetRole(id);

            Mapper.CreateMap <Role, RoleModel>();                 // 配置
            RoleModel model = Mapper.Map <Role, RoleModel>(role); // 使用AutoMapper自动映射

            return(model);
        }
 public ProjectController(
     IProjectLogic projectLogic,
     ITokenHelper tokenHelper,
     IAccountLogic accountLogic,
     IProjectTeamLogic projectTeamLogic)
 {
     _projectLogic     = projectLogic;
     _tokenHelper      = tokenHelper;
     _accountLogic     = accountLogic;
     _projectTeamLogic = projectTeamLogic;
 }
Beispiel #13
0
        public HttpResponseMessage GetNewEmployeNo()
        {
            IAccountLogic IUser = container.Resolve <IAccountLogic>();
            //执行
            HttpResponseMessage responseMessage = new HttpResponseMessage {
                Content = new StringContent(IUser.GetNewEmployeNo(), Encoding.GetEncoding("UTF-8"), "text/plain")
            };

            return(responseMessage);
            //return IUser.GetNewEmployeNo();
        }
Beispiel #14
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Display"/> class.
        /// </summary>
        public Display()
        {
            LogicFactory lf = new LogicFactory();

            this.accLogic       = lf.GetAccountLogic();
            this.carLogic       = lf.GetCarLogic();
            this.licenseLogic   = lf.GetLicenseLogic();
            this.rentLogic      = lf.GetRentLogic();
            this.complaintLogic = lf.GetComplaintLogic();
            this.businessLogic  = lf.GetBusinessLogic();
        }
 // TODO: possibly use dynamic method invocation
 public BanController CreateTestController(
     UserLogic user = null,
     ISubscriptionAccessRightsLogic subscriptionAccessRights = null,
     IAccountLogic account = null
     )
 {
     user = Eval <UserLogic>(Params.User, user);
     subscriptionAccessRights = Eval <ISubscriptionAccessRightsLogic>(Params.SubscriptionAccessRights, subscriptionAccessRights);
     account = Eval <IAccountLogic>(Params.Account, account);
     return(new BanController(user, subscriptionAccessRights, account));
 }
Beispiel #16
0
 public ReportController(
     IDailyActivityLogic dailyActivityLogic,
     IMaterialLogic materialLogic,
     IEquipmentLogic equipmentLogic,
     IProjectLogic projectLogic,
     IAccountLogic accountLogic,
     INoteLogic noteLogic)
 {
     _dailyActivityLogic = dailyActivityLogic;
     _materialLogic      = materialLogic;
     _equipmentLogic     = equipmentLogic;
     _projectLogic       = projectLogic;
     _accountLogic       = accountLogic;
     _noteLogic          = noteLogic;
 }
Beispiel #17
0
        public bool ChangePassword(ChangePwdModel model)
        {
            IAccountLogic IUser = container.Resolve <IAccountLogic>();
            Employe       e     = IUser.GetEmploye(model.employerID);

            if (e.employePwd == model.oldPwd && model.newPwd == model.rePwd)
            {
                e.employePwd = model.newPwd;
                return(IUser.UpdateEmploye(e));
            }
            else
            {
                return(false);
            }
        }
Beispiel #18
0
 public Authentication(
     IAuthenticationService authenticationService,
     IOAuthService oAuthService,
     IAccountLogic accountLogic,
     IOAuthInintializer oAuthInintializer,
     IRoleProvider roleProvider,
     IUserRegistrationService userRegistrationService)
 {
     _authenticationService   = authenticationService;
     _oAuthService            = oAuthService;
     _accountLogic            = accountLogic;
     _oAuthInintializer       = oAuthInintializer;
     _roleProvider            = roleProvider;
     _userRegistrationService = userRegistrationService;
 }
Beispiel #19
0
        public EmployeModel Login(string account, string pwd)
        {
            ////创建容器
            //UnityContainer container = new UnityContainer();
            //UnityConfigurationSection config = (UnityConfigurationSection)ConfigurationManager.GetSection(UnityConfigurationSection.SectionName);
            ////加载到容器
            //config.Configure(container, "MyContainer");
            //返回调用者
            IAccountLogic IUser = container.Resolve <IAccountLogic>();
            //执行
            Employe employe = IUser.Login(account, pwd);

            Mapper.CreateMap <Employe, EmployeModel>();                       // 配置
            EmployeModel model = Mapper.Map <Employe, EmployeModel>(employe); // 使用AutoMapper自动映射

            return(model);
        }
        public new void Setup()
        {
            base.Setup();

            _topUpLogic = GetInst <ITopUpLogic>();

            _userManager         = GetInst <IUserManager>();
            _usageLogic          = GetInst <IUsageLogic>();
            _userValidationLogic = GetInst <UserValidationLogic>();

            _accessRightLogic = GetInst <IAccessRightLogic>();

            _subscriptionService       = GetInst <ISubscriptionService>();
            _subscriptionLogic         = GetInst <ISubscriptionLogic>();
            _subscriptionVasLogic      = GetInst <SubscriptionVasLogic>();
            _subscriptionStatusLogic   = GetInst <ISubscriptionStatusLogic>();
            _changeSubscriptionLogic   = GetInst <IChangeSubscriptionLogic>();
            _subscriptionOfferingLogic = GetInst <ISubscriptionOfferingLogic>();

            _appSettings    = GetInst <IApplicationSettings>();
            _catalogService = GetInst <ICatalogService>();

            _cbmService    = GetInst <ICbmService>();
            _orderSimLogic = GetInst <IOrderSimLogic>();
            _accountLogic  = GetInst <IAccountLogic>();

            dict = new Dictionary <Params, object>()
            {
                { Params.TopUp, _topUpLogic },
                { Params.UserManager, _userManager },
                { Params.Usage, _usageLogic },
                { Params.UserValidation, _userValidationLogic },
                { Params.AccessRights, _accessRightLogic },
                { Params.SubscriptionService, _subscriptionService },
                { Params.Subscription, _subscriptionLogic },
                { Params.SubscriptionVas, _subscriptionVasLogic },
                { Params.SubscriptionStatus, _subscriptionStatusLogic },
                { Params.ChangeSubscription, _changeSubscriptionLogic },
                { Params.SubscriptionOffering, _subscriptionOfferingLogic },
                { Params.AppSettings, _appSettings },
                { Params.CatalogService, _catalogService },
                { Params.CbmService, _cbmService },
                { Params.OrderSim, _orderSimLogic },
                { Params.Account, _accountLogic }
            };
        }
Beispiel #21
0
 public PlayerController(IMatchRepository matchRepository,
     IUserRepository userRepository, 
     IMatchupHistoryCreator matchupHistoryCreator, 
     ISeasonLogic seasonLogic,
     IUserLogic userLogic,
     IAccountLogic accountLogic,
     IUserLoginInfoRepository userLoginInfoRepository
     )
 {
     _matchRepository = matchRepository;
     _userRepository = userRepository;
     _matchupHistoryCreator = matchupHistoryCreator;
     _seasonLogic = seasonLogic;
     _userLogic = userLogic;
     _accountLogic = accountLogic;
     _userLoginInfoRepository = userLoginInfoRepository;
 }
Beispiel #22
0
        static MyProvaider()
        {
            string typeDAL = ConfigurationManager.AppSettings["typeDAL"];
            string typeBLL = ConfigurationManager.AppSettings["typeBLL"];

            switch (typeDAL)
            {
            case "Memory":
            {
                userDAL    = new MemoryUserDAL();
                awardsDAL  = new MemoryAwardDAL();
                accountDAL = new MemoryAccountDAL();
            }
            break;

            case "Files":
            {
                userDAL    = new FilesUserDAL();
                awardsDAL  = new FilesAwardsDAL();
                accountDAL = new FileAccountDAL();
            }
            break;

            case "DB":
            {
                userDAL    = new DBUserDAL();
                awardsDAL  = new DBAwardsDAL();
                accountDAL = new DBAccountDAL();
            }
            break;
            }

            switch (typeBLL)
            {
            case "Basic":
            {
                userLogic    = new UserManager(userDAL);
                awardsLogic  = new AwardManager(awardsDAL);
                accountLogic = new AccountManager(accountDAL);
            }
            break;
            }
        }
Beispiel #23
0
 /// <summary>
 /// Allows fine grained control over how the controller is instantiated for a particular test
 /// Each of the optional arguments lets you override the default mock that will be used if arg not passed
 /// </summary>
 /// <param name="subscriptionVas"></param>
 /// <param name="userValidation"></param>
 /// <param name="subscriptionService"></param>
 /// <param name="subscription"></param>
 /// <param name="orderSim"></param>
 /// <param name="subscriptionStatus"></param>
 /// <param name="subscriptionOffering"></param>
 /// <param name="changeSubscription"></param>
 /// <param name="userManager"></param>
 /// <param name="catalogService"></param>
 /// <param name="account"></param>
 /// <returns></returns>
 public SubscriptionController CreateTestController(
     SubscriptionVasLogic subscriptionVas     = null,
     UserValidationLogic userValidation       = null,
     ISubscriptionService subscriptionService = null,
     ISubscriptionLogic subscription          = null,
     IOrderSimLogic orderSim = null,
     ISubscriptionStatusLogic subscriptionStatus     = null,
     ISubscriptionOfferingLogic subscriptionOffering = null,
     IChangeSubscriptionLogic changeSubscription     = null,
     IUserManager userManager       = null,
     ICatalogService catalogService = null,
     IAccountLogic account          = null
     )
 {
     subscriptionVas      = Eval <SubscriptionVasLogic>(Params.SubscriptionVas, subscriptionVas);
     userValidation       = Eval <UserValidationLogic>(Params.UserValidation, userValidation);
     subscriptionService  = Eval <ISubscriptionService>(Params.SubscriptionService, subscriptionService);
     subscription         = Eval <ISubscriptionLogic>(Params.Subscription, subscription);
     orderSim             = Eval <IOrderSimLogic>(Params.OrderSim, orderSim);
     subscriptionStatus   = Eval <ISubscriptionStatusLogic>(Params.SubscriptionStatus, subscriptionStatus);
     subscriptionOffering = Eval <ISubscriptionOfferingLogic>(Params.SubscriptionOffering, subscriptionOffering);
     changeSubscription   = Eval <IChangeSubscriptionLogic>(Params.ChangeSubscription, changeSubscription);
     userManager          = Eval <IUserManager>(Params.UserManager, userManager);
     catalogService       = Eval <ICatalogService>(Params.CatalogService, catalogService);
     account = Eval <IAccountLogic>(Params.Account, account);
     return(new SubscriptionController(
                subscriptionVas,
                userValidation,
                subscriptionService,
                subscription,
                orderSim,
                subscriptionStatus,
                subscriptionOffering,
                changeSubscription,
                userManager,
                catalogService,
                account
                ));
 }
        public new void Setup()
        {
            _userLogic                     = GetInst <UserLogic>();
            _banAccessRightsLogic          = GetInst <BanAccessRightsLogic>();
            _userProfileLogic              = GetInst <IUserProfileLogic>();
            _accountLogic                  = GetInst <IAccountLogic>();
            _subscriptionAccessRightsLogic = GetInst <ISubscriptionAccessRightsLogic>();
            _creditAgreementLogic          = GetInst <ICreditAgreementLogic>();
            _invoiceService                = GetInst <IInvoiceService>();

            dict = new Dictionary <Params, object>()
            {
                { Params.User, _userLogic },
                { Params.BanAccessRights, _banAccessRightsLogic },
                { Params.UserProfile, _userProfileLogic },
                { Params.Account, _accountLogic },
                { Params.SubscriptionAccessRights, _subscriptionAccessRightsLogic },
                { Params.CreditAgreement, _creditAgreementLogic },
                { Params.InvoiceService, _invoiceService }
            };

            base.Setup();
        }
Beispiel #25
0
        public TestIntegrations()
        {
            //Create TestServer
            var builder = new WebHostBuilder()
                          .UseStartup <Startup>();

            server = new TestServer(builder);

            //Get individual scopes from testserver to create controllerinstances with scoped services
            movieslogic  = server.Host.Services.GetService <IMoviesLogic>();
            accountlogic = server.Host.Services.GetService <IAccountLogic>();

            sessionlogic = new Mock <IUserSession>();

            account = new Account
            {
                Name     = "Simon",
                Password = "******"
            };
            //Inject services from testserver into the controllers
            moviescontroller  = new MoviesController(movieslogic, sessionlogic.Object);
            accountcontroller = new AccountController(accountlogic, sessionlogic.Object);
        }
Beispiel #26
0
 public void Init()
 {
     this.accounts = new List <Account>()
     {
         new Account()
         {
             AccountId = 0, Name = "Kiss József", Email = "*****@*****.**", Address = "Szentendre", BirthDate = DateTime.Parse("1971.01.16"), Minute = 60, Monthly = 1500
         },
         new Account()
         {
             AccountId = 1, Name = "Simon Ádám", Email = "*****@*****.**", Address = "Budaörs", BirthDate = DateTime.Parse("1987.05.25"), Minute = 60, Monthly = 1500
         },
         new Account()
         {
             AccountId = 2, Name = "Simon Tamás", Email = "*****@*****.**", Address = "Vác", BirthDate = DateTime.Parse("1966.01.12"), Minute = 60, Monthly = 1500
         },
         new Account()
         {
             AccountId = 3, Name = "Lakatos Sándor", Email = "*****@*****.**", Address = "Gödöllő", BirthDate = DateTime.Parse("1959.12.15"), Minute = 100, Monthly = 0
         },
         new Account()
         {
             AccountId = 4, Name = "Molnár András", Email = "*****@*****.**", Address = "Mogyoród", BirthDate = DateTime.Parse("1980.07.14"), Minute = 100, Monthly = 0
         },
         new Account()
         {
             AccountId = 5, Name = "Simon Anna", Email = "*****@*****.**", Address = "Vác", BirthDate = DateTime.Parse("1976.07.22"), Minute = 100, Monthly = 0
         },
         new Account()
         {
             AccountId = 6, Name = "Lakatos József", Email = "*****@*****.**", Address = "Vác", BirthDate = DateTime.Parse("1953.11.24"), Minute = 100, Monthly = 0
         },
         new Account()
         {
             AccountId = 7, Name = "Kiss Tamás", Email = "*****@*****.**", Address = "Vác", BirthDate = DateTime.Parse("1953.02.13"), Minute = 100, Monthly = 0
         },
         new Account()
         {
             AccountId = 8, Name = "Vincze Béla", Email = "*****@*****.**", Address = "Vecsés", BirthDate = DateTime.Parse("1952.07.14"), Minute = 60, Monthly = 1500
         },
         new Account()
         {
             AccountId = 9, Name = "Molnár Dániel", Email = "*****@*****.**", Address = "Mogyoród", BirthDate = DateTime.Parse("1999.09.11"), Minute = 60, Monthly = 1500
         },
         new Account()
         {
             AccountId = 10, Name = "Papp László", Email = "*****@*****.**", Address = "Mogyoród", BirthDate = DateTime.Parse("1962.05.12"), Minute = 60, Monthly = 1500
         },
         new Account()
         {
             AccountId = 11, Name = "Vincze Kata", Email = "*****@*****.**", Address = "Vecsés", BirthDate = DateTime.Parse("1999.06.14"), Minute = 35, Monthly = 4000
         },
         new Account()
         {
             AccountId = 12, Name = "Lakatos Anna", Email = "*****@*****.**", Address = "Budaörs", BirthDate = DateTime.Parse("1964.01.16"), Minute = 60, Monthly = 1500
         },
         new Account()
         {
             AccountId = 13, Name = "Kiss Sándor", Email = "*****@*****.**", Address = "Csömör", BirthDate = DateTime.Parse("1954.05.09"), Minute = 100, Monthly = 0
         },
         new Account()
         {
             AccountId = 14, Name = "Vincze Ádám", Email = "*****@*****.**", Address = "Budapest", BirthDate = DateTime.Parse("1978.05.08"), Minute = 60, Monthly = 1500
         },
     };
     this.cars = new List <Car>()
     {
         new Car()
         {
             CarId = "REM-990", Brand = "Volkswagen", Model = "e-Up", Battery = 41, ExtraPrice = 0
         },
         new Car()
         {
             CarId = "RBT-178", Brand = "Volkswagen", Model = "e-Up", Battery = 12, ExtraPrice = 0
         },
         new Car()
         {
             CarId = "RKO-673", Brand = "Volkswagen", Model = "e-Golf", Battery = 53, ExtraPrice = 20
         },
         new Car()
         {
             CarId = "RFP-990", Brand = "BMW", Model = "i3", Battery = 32, ExtraPrice = 40
         },
         new Car()
         {
             CarId = "RNX-941", Brand = "Volkswagen", Model = "e-Up", Battery = 96, ExtraPrice = 0
         },
         new Car()
         {
             CarId = "RZT-841", Brand = "Audi", Model = "e-Tron", Battery = 14, ExtraPrice = 60
         },
         new Car()
         {
             CarId = "RZF-406", Brand = "Volkswagen", Model = "e-Golf", Battery = 53, ExtraPrice = 20
         },
         new Car()
         {
             CarId = "RUS-598", Brand = "Volkswagen", Model = "e-Up", Battery = 65, ExtraPrice = 0
         },
         new Car()
         {
             CarId = "RTA-149", Brand = "Audi", Model = "e-Tron", Battery = 98, ExtraPrice = 60
         },
         new Car()
         {
             CarId = "RCS-709", Brand = "Audi", Model = "e-Tron", Battery = 15, ExtraPrice = 60
         },
         new Car()
         {
             CarId = "RFF-995", Brand = "BMW", Model = "i3", Battery = 61, ExtraPrice = 40
         },
         new Car()
         {
             CarId = "RHO-859", Brand = "Volkswagen", Model = "e-Up", Battery = 44, ExtraPrice = 0
         },
         new Car()
         {
             CarId = "RHX-557", Brand = "Nissan", Model = "Leaf", Battery = 13, ExtraPrice = 20
         },
         new Car()
         {
             CarId = "REF-473", Brand = "Nissan", Model = "Leaf", Battery = 76, ExtraPrice = 20
         },
         new Car()
         {
             CarId = "RMB-898", Brand = "Volkswagen", Model = "e-Up", Battery = 57, ExtraPrice = 0
         },
         new Car()
         {
             CarId = "RMV-468", Brand = "Volkswagen", Model = "e-Up", Battery = 84, ExtraPrice = 0
         },
         new Car()
         {
             CarId = "RHC-386", Brand = "Audi", Model = "e-Tron", Battery = 94, ExtraPrice = 60
         },
         new Car()
         {
             CarId = "RTF-587", Brand = "BMW", Model = "i3", Battery = 22, ExtraPrice = 40
         },
         new Car()
         {
             CarId = "RFW-482", Brand = "BMW", Model = "i3", Battery = 36, ExtraPrice = 40
         },
         new Car()
         {
             CarId = "RVN-153", Brand = "Volkswagen", Model = "e-Golf", Battery = 78, ExtraPrice = 20
         },
     };
     this.rents = new List <Rent>()
     {
         new Rent()
         {
             RentId = 0, AccountId = 7, CarId = "RTF-587", StartTime = DateTime.Parse("2019-10-02 03:29:00"), EndTime = DateTime.Parse("2019-10-02 05:57:00"), Distance = 37, Price = 3700
         },
         new Rent()
         {
             RentId = 1, AccountId = 11, CarId = "RZT-841", StartTime = DateTime.Parse("2019-10-02 03:56:00"), EndTime = DateTime.Parse("2019-10-02 06:11:00"), Distance = 55, Price = 5500
         },
         new Rent()
         {
             RentId = 2, AccountId = 11, CarId = "RTF-587", StartTime = DateTime.Parse("2019-10-02 01:21:00"), EndTime = DateTime.Parse("2019-10-02 02:29:00"), Distance = 18, Price = 1800
         },
         new Rent()
         {
             RentId = 3, AccountId = 13, CarId = "RKO-673", StartTime = DateTime.Parse("2019-10-02 22:34:00"), EndTime = DateTime.Parse("2019-10-02 23:26:00"), Distance = 18, Price = 1800
         },
         new Rent()
         {
             RentId = 4, AccountId = 11, CarId = "RCS-709", StartTime = DateTime.Parse("2019-10-02 08:31:00"), EndTime = DateTime.Parse("2019-10-02 09:55:00"), Distance = 18, Price = 1800
         },
         new Rent()
         {
             RentId = 5, AccountId = 8, CarId = "RVN-153", StartTime = DateTime.Parse("2019-10-02 04:34:00"), EndTime = DateTime.Parse("2019-10-02 05:05:00"), Distance = 18, Price = 1800
         },
         new Rent()
         {
             RentId = 6, AccountId = 10, CarId = "RHC-386", StartTime = DateTime.Parse("2019-10-02 00:53:00"), EndTime = DateTime.Parse("2019-10-02 01:35:00"), Distance = 18, Price = 1800
         },
         new Rent()
         {
             RentId = 7, AccountId = 1, CarId = "RHC-386", StartTime = DateTime.Parse("2019-10-02 18:39:00"), EndTime = DateTime.Parse("2019-10-02 20:12:00"), Distance = 37, Price = 3700
         },
         new Rent()
         {
             RentId = 8, AccountId = 3, CarId = "REM-990", StartTime = DateTime.Parse("2019-10-02 08:53:00"), EndTime = DateTime.Parse("2019-10-02 09:47:00"), Distance = 18, Price = 1800
         },
         new Rent()
         {
             RentId = 9, AccountId = 8, CarId = "RZF-406", StartTime = DateTime.Parse("2019-10-02 06:07:00"), EndTime = DateTime.Parse("2019-10-02 07:01:00"), Distance = 18, Price = 1800
         },
         new Rent()
         {
             RentId = 10, AccountId = 1, CarId = "RZF-406", StartTime = DateTime.Parse("2019-10-02 19:40:00"), EndTime = DateTime.Parse("2019-10-02 21:00:00"), Distance = 37, Price = 3700
         },
         new Rent()
         {
             RentId = 11, AccountId = 11, CarId = "RZF-406", StartTime = DateTime.Parse("2019-10-02 06:53:00"), EndTime = DateTime.Parse("2019-10-02 08:11:00"), Distance = 37, Price = 3700
         },
         new Rent()
         {
             RentId = 12, AccountId = 13, CarId = "RMB-898", StartTime = DateTime.Parse("2019-10-02 23:00:00"), EndTime = DateTime.Parse("2019-10-02 23:11:00"), Distance = 3, Price = 300
         },
         new Rent()
         {
             RentId = 13, AccountId = 3, CarId = "RBT-178", StartTime = DateTime.Parse("2019-10-02 15:15:00"), EndTime = DateTime.Parse("2019-10-02 15:49:00"), Distance = 20, Price = 2000
         },
         new Rent()
         {
             RentId = 14, AccountId = 9, CarId = "REF-473", StartTime = DateTime.Parse("2019-10-02 08:16:00"), EndTime = DateTime.Parse("2019-10-02 09:30:00"), Distance = 18, Price = 1800
         },
         new Rent()
         {
             RentId = 15, AccountId = 5, CarId = "RHO-859", StartTime = DateTime.Parse("2019-10-02 18:57:00"), EndTime = DateTime.Parse("2019-10-02 20:19:00"), Distance = 37, Price = 3700
         },
         new Rent()
         {
             RentId = 16, AccountId = 0, CarId = "RZT-841", StartTime = DateTime.Parse("2019-10-02 19:58:00"), EndTime = DateTime.Parse("2019-10-02 22:00:00"), Distance = 55, Price = 5500
         },
         new Rent()
         {
             RentId = 17, AccountId = 11, CarId = "RFW-482", StartTime = DateTime.Parse("2019-10-02 12:38:00"), EndTime = DateTime.Parse("2019-10-02 13:50:00"), Distance = 18, Price = 1800
         },
         new Rent()
         {
             RentId = 18, AccountId = 3, CarId = "RFP-990", StartTime = DateTime.Parse("2019-10-02 10:34:00"), EndTime = DateTime.Parse("2019-10-02 12:03:00"), Distance = 37, Price = 3700
         },
         new Rent()
         {
             RentId = 19, AccountId = 9, CarId = "RFW-482", StartTime = DateTime.Parse("2019-10-02 04:47:00"), EndTime = DateTime.Parse("2019-10-02 04:55:00"), Distance = 3, Price = 300
         },
         new Rent()
         {
             RentId = 20, AccountId = 5, CarId = "RFW-482", StartTime = DateTime.Parse("2019-10-01 04:47:00"), EndTime = DateTime.Parse("2019-10-01 04:55:00"), Distance = 3, Price = 1300
         },
     };
     this.licenses = new List <License>()
     {
         new License()
         {
             LicenseId = "HX211743", AccountId = 4, Category = "A", StartDate = DateTime.Parse("2016-12-11"), ExpiryDate = DateTime.Parse("2021-12-11")
         },
         new License()
         {
             LicenseId = "LK239013", AccountId = 7, Category = "A", StartDate = DateTime.Parse("2014-01-19"), ExpiryDate = DateTime.Parse("2019-01-19")
         },
         new License()
         {
             LicenseId = "TG725938", AccountId = 5, Category = "AM", StartDate = DateTime.Parse("2013-04-13"), ExpiryDate = DateTime.Parse("2018-04-13")
         },
         new License()
         {
             LicenseId = "IK079491", AccountId = 1, Category = "A", StartDate = DateTime.Parse("2017-02-04"), ExpiryDate = DateTime.Parse("2022-02-04")
         },
         new License()
         {
             LicenseId = "QV978087", AccountId = 14, Category = "A", StartDate = DateTime.Parse("2016-03-24"), ExpiryDate = DateTime.Parse("2021-03-24")
         },
         new License()
         {
             LicenseId = "KS701427", AccountId = 10, Category = "C", StartDate = DateTime.Parse("2015-01-14"), ExpiryDate = DateTime.Parse("2020-01-14")
         },
         new License()
         {
             LicenseId = "SI261106", AccountId = 13, Category = "B", StartDate = DateTime.Parse("2014-10-05"), ExpiryDate = DateTime.Parse("2019-10-05")
         },
         new License()
         {
             LicenseId = "KI156402", AccountId = 6, Category = "A", StartDate = DateTime.Parse("2014-09-08"), ExpiryDate = DateTime.Parse("2019-09-08")
         },
         new License()
         {
             LicenseId = "BX169634", AccountId = 0, Category = "AM", StartDate = DateTime.Parse("2018-03-27"), ExpiryDate = DateTime.Parse("2023-03-27")
         },
         new License()
         {
             LicenseId = "FW577033", AccountId = 8, Category = "D", StartDate = DateTime.Parse("2012-10-04"), ExpiryDate = DateTime.Parse("2017-10-04")
         },
         new License()
         {
             LicenseId = "BW629063", AccountId = 3, Category = "B", StartDate = DateTime.Parse("2012-09-20"), ExpiryDate = DateTime.Parse("2017-09-20")
         },
         new License()
         {
             LicenseId = "ZA116690", AccountId = 9, Category = "B", StartDate = DateTime.Parse("2017-05-23"), ExpiryDate = DateTime.Parse("2022-05-23")
         },
         new License()
         {
             LicenseId = "LY178690", AccountId = 11, Category = "A", StartDate = DateTime.Parse("2016-09-21"), ExpiryDate = DateTime.Parse("2021-09-21")
         },
         new License()
         {
             LicenseId = "MD988378", AccountId = 2, Category = "AM", StartDate = DateTime.Parse("2014-02-06"), ExpiryDate = DateTime.Parse("2019-02-06")
         },
         new License()
         {
             LicenseId = "DS212148", AccountId = 12, Category = "AM", StartDate = DateTime.Parse("2018-07-02"), ExpiryDate = DateTime.Parse("2023-07-02")
         },
     };
     this.complaints = new List <Complaint>()
     {
         new Complaint()
         {
             ComplaintId = 0, RentId = 5, Description = "Nem megfelelő tisztaságú az autó.", Time = DateTime.Parse("2019-10-02 05:05:00"), Chk = 1
         },
         new Complaint()
         {
             ComplaintId = 1, RentId = 1, Description = "Baleset történt személyi sérüléssel.", Time = DateTime.Parse("2019-10-02 06:11:00"), Chk = 0
         },
         new Complaint()
         {
             ComplaintId = 2, RentId = 4, Description = "Nem megfelelő tisztaságú az autó.", Time = DateTime.Parse("2019-10-02 09:55:00"), Chk = 1
         },
         new Complaint()
         {
             ComplaintId = 3, RentId = 6, Description = "Nem megfelelő tisztaságú az autó.", Time = DateTime.Parse("2019-10-02 01:35:00"), Chk = 0
         },
         new Complaint()
         {
             ComplaintId = 4, RentId = 0, Description = "Meghúzták az autót amíg parkolt.", Time = DateTime.Parse("2019-10-02 05:57:00"), Chk = 0
         },
         new Complaint()
         {
             ComplaintId = 5, RentId = 3, Description = "Baleset történt, személyi sérülés nélkül.", Time = DateTime.Parse("2019-10-02 23:26:00"), Chk = 0
         },
         new Complaint()
         {
             ComplaintId = 6, RentId = 2, Description = "Sérült volt az autó a bérlés indítása előtt.", Time = DateTime.Parse("2019-10-02 02:29:00"), Chk = 1
         },
         new Complaint()
         {
             ComplaintId = 7, RentId = 7, Description = "Baleset történt, személyi sérülés nélkül.", Time = DateTime.Parse("2019-10-02 20:12:00"), Chk = 0
         },
     };
     this.accountRepo   = new Mock <IRepository <Account, int> >();
     this.carRepo       = new Mock <IRepository <Car, string> >();
     this.licenseRepo   = new Mock <IRepository <License, string> >();
     this.rentRepo      = new Mock <IRepository <Rent, int> >();
     this.complaintRepo = new Mock <IRepository <Complaint, int> >();
     this.accountRepo.Setup(x => x.GetAll()).Returns(this.accounts.AsQueryable());
     this.carRepo.Setup(x => x.GetAll()).Returns(this.cars.AsQueryable());
     this.rentRepo.Setup(x => x.GetAll()).Returns(this.rents.AsQueryable());
     this.licenseRepo.Setup(x => x.GetAll()).Returns(this.licenses.AsQueryable());
     this.complaintRepo.Setup(x => x.GetAll()).Returns(this.complaints.AsQueryable());
     this.businessLogic  = new BusinessLogic(this.accountRepo.Object, this.carRepo.Object, this.licenseRepo.Object, this.rentRepo.Object, this.complaintRepo.Object);
     this.accLogic       = new AccountLogic(this.accountRepo.Object);
     this.rentLogic      = new RentLogic(this.rentRepo.Object);
     this.licenseLogic   = new LicenseLogic(this.licenseRepo.Object);
     this.complaintLogic = new ComplaintLogic(this.complaintRepo.Object);
     this.carLogic       = new CarLogic(this.carRepo.Object);
 }
Beispiel #27
0
 public LogServicecs(IAccountLogic accountLogic)
 {
     this._accountLogic = accountLogic;
 }
Beispiel #28
0
 public ImageController(IImageLogic imageBLL, IProductLogic productBLL = null, IAccountLogic accountBLL = null)
 {
     this.imageBLL = imageBLL;
     this.productBLL = productBLL;
     this.accountBLL = accountBLL;
 }
Beispiel #29
0
 public ImageController()
 {
     imageBLL = new ImageBLL();
     productBLL = new ProductBLL();
     accountBLL = new AccountBLL();
 }
 public WeatherForecastController(IAccountLogic accountService)
 {
     this.accountService = accountService;
 }
Beispiel #31
0
 public AccountController(IAccountLogic stub)
 {
     _accountBLL = stub;
 }
Beispiel #32
0
 public AccountController()
 {
     _accountBLL = new AccountBLL();
 }
 public AuthenticationController(ApplicationUserManager userManager, ApplicationSignInManager signInManager, IAccountLogic account)
 {
     UserManager = userManager;
     SignInManager = signInManager;
     this.account = account;
 }
 public GoalController(IGoalLogic al, IAccountLogic a)
 {
     Logic = al;
     AccountLogic = a;
 }
Beispiel #35
0
 public ProductController(IProductLogic productStub, ICategoryLogic categoryStub, IAccountLogic accountBLL = null)
 {
     _productBLL = productStub;
     _categoryBLL = categoryStub;
     _accountBLL = accountBLL;
 }
Beispiel #36
0
 public ProductController()
 {
     _productBLL = new ProductBLL();
     _categoryBLL = new CategoryBLL();
     _accountBLL = new AccountBLL();
 }
Beispiel #37
0
 public AccountsController(IAccountLogic accountsLogic)
 {
     _accountsLogic = accountsLogic;
 }
 public TeamInfoController(ITeamLogic t, IAccountLogic a, IMembershipLogic m)
 {
     logic = t;
     aLogic = a;
     MembershipLogic = m;
 }
 public AccountController(IAccountLogic logic, IMembershipLogic mlogic)
 {
     Logic = logic;
     mLogic = mlogic;
 }
Beispiel #40
0
 public CategoryController()
 {
     categoryBLL = new CategoryBLL();
     accountBLL = new AccountBLL();
 }
 public TeamInfoController(ITeamLogic t, IAccountLogic a, IMembershipLogic m)
 {
     logic           = t;
     aLogic          = a;
     MembershipLogic = m;
 }
Beispiel #42
0
 public CategoryController(ICategoryLogic categoryBLL, IAccountLogic accountBLL = null)
 {
     this.categoryBLL = categoryBLL;
     this.accountBLL = accountBLL;
 }
Beispiel #43
0
 public AccountController(IAccountLogic accountLogic, DefaultRoleProvider roleProvider)
 {
     this.accountLogic = accountLogic;
     this.roleProvider = roleProvider;
 }
 public PredictionController(IAccountLogic accounts, PredictionLogic logic)
 {
     this.accounts = accounts;
     this.logic = logic;
 }