Exemple #1
0
 public DashBoardController()
 {
     service     = new CustomerService();
     bidsService = new BidsService();
     dbContext   = new MyDealDbContext();
     _email      = new EmailSending();
 }
Exemple #2
0
 public void Init()
 {
     _mockUnitWork = new Mock <IUnitOfWork>();
     _service      = new BidsService(_mockUnitWork.Object);
     _lots         = new List <Lot>()
     {
         new Lot()
         {
             LotId = 1, InitialPrice = 1
         },
         new Lot()
         {
             LotId = 2, InitialPrice = 1
         },
         new Lot()
         {
             LotId = 3, InitialPrice = 1
         }
     };
     _bids = new List <Bid>()
     {
         new Bid()
         {
             BidId = 1, LotId = 1, PlacedUserId = 1, Price = 10, Date = DateTime.Now, Lot = new Lot(), PlacedUser = new UserProfile()
         },
         new Bid()
         {
             BidId = 2, LotId = 2, PlacedUserId = 2, Price = 15, Date = DateTime.Now, Lot = new Lot(), PlacedUser = new UserProfile()
         },
         new Bid()
         {
             BidId = 3, LotId = 2, PlacedUserId = 2, Price = 20, Date = DateTime.Now, Lot = new Lot(), PlacedUser = new UserProfile()
         },
         new Bid()
         {
             BidId = 4, LotId = 2, PlacedUserId = 2, Price = 25, Date = DateTime.Now, Lot = new Lot(), PlacedUser = new UserProfile()
         },
         new Bid()
         {
             BidId = 5, LotId = 3, PlacedUserId = 3, Price = 30, Date = DateTime.Now, Lot = new Lot(), PlacedUser = new UserProfile()
         },
     };
     _users = new List <UserProfile>()
     {
         new UserProfile()
         {
             UserProfileId = 1, Name = "User"
         },
         new UserProfile()
         {
             UserProfileId = 2, Name = "User1"
         },
         new UserProfile()
         {
             UserProfileId = 3, Name = "User2"
         }
     };
     AutoMapperServicesConfiguration.Configure();
 }
Exemple #3
0
 public ProfileController(ILogger <ProfileController> logger,
                          ILotsService lotsService,
                          IBidsService bidsService,
                          IUserServices usersService, ICategoryRepository categoryRepository)
 {
     _lotsService   = lotsService;
     _bidsService   = bidsService;
     _usersServices = usersService;
 }
Exemple #4
0
 public LotHub(ILotsService lotService,
               IBidsService bidService,
               IUserServices userService)
 {
     _lotsService = lotService;
     _bidsService = bidService;
     _userService = userService;
     _errors      = new HubErrors();
 }
 public AuctionController(ILogger <AuctionController> logger,
                          ILotsService lotsService, IBidsService bidsService,
                          IUserServices userServices)
 {
     _lotsService   = lotsService;
     _bidsService   = bidsService;
     _usersServices = userServices;
     _logger        = logger;
 }
Exemple #6
0
 public AuctionController(ILogger <AuctionController> logger,
                          ILotsService lotsService, IBidsService bidsService,
                          IUserServices userServices, IHubContext <LotHub> hubcontext)
 {
     _lotsService   = lotsService;
     _bidsService   = bidsService;
     _usersServices = userServices;
     _hubcontext    = hubcontext;
     _logger        = logger;
 }
Exemple #7
0
        public MapPage(Bid bid)
        {
            _bidsService = DependencyService.Get <IBidsService>();

            _bidsService.Token = new UserToken
            {
                Token = (string)App.User.UserToken.Token.Clone()
            };


            _map = new CustomMap
            {
                IsShowingUser   = true,
                HeightRequest   = 100,
                HasZoomEnabled  = true,
                WidthRequest    = 960,
                VerticalOptions = LayoutOptions.FillAndExpand
            };

            _map.Pins.Add(new Pin
            {
                Label    = "Тревога",
                Position = new Position(bid.Location.Latitude, bid.Location.Longitude)
            });

            // You can use MapSpan.FromCenterAndRadius
            //map.MoveToRegion (MapSpan.FromCenterAndRadius (new Position (37, -122), Distance.FromMiles (0.3)));
            // or create a new MapSpan object directly
            double degrees = 360 / Math.Pow(2, 14);

            _map.ZoomLevel = new Distance(250);
            _map.MoveToRegion(new MapSpan(new Position(bid.Location.Latitude, bid.Location.Longitude), degrees, degrees));

            // create map style buttons
            var street = new Button {
                Text = "Street"
            };
            var hybrid = new Button {
                Text = "Hybrid"
            };
            var satellite = new Button {
                Text = "Satellite"
            };

            street.Clicked    += HandleClicked;
            hybrid.Clicked    += HandleClicked;
            satellite.Clicked += HandleClicked;
            var segments = new StackLayout
            {
                Spacing           = 30,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                Orientation       = StackOrientation.Horizontal,
                Children          = { street, hybrid, satellite }
            };

            // put the page together
            var stack = new StackLayout {
                Spacing = 0
            };

            stack.Children.Add(_map);
            stack.Children.Add(segments);
            Content = stack;

            Timer timer = new Timer(UpdateAlertLocation, bid, 0, 10000);
        }
 public CustomerInfoController()
 {
     service     = new CustomerService();
     bidsService = new BidsService();
 }
 public BidsController(IBidsService bidsService)
 {
     _bidsService = bidsService;
 }
 public BidsController(IBidsService bidsService)
 {
     this.bids = bidsService;
 }
Exemple #11
0
 public BidsController()
 {
     service    = new BidsService();
     cmdservice = new CommentService();
     db         = new MyDealDbContext();
 }
Exemple #12
0
 public AuctionsController(IBidsService bidsService)
 {
     this.bidsService = bidsService;
 }