예제 #1
0
        public IActionResult Index()
        {
            var Moves = _sellingMovesService.GetSellingMovesWithPerconelFilter().Select(x => new SellingMovesListView()
            {
                Id         = x.Id,
                Adet       = x.Adet,
                AppUserId  = x.AppUserId,
                Cariler    = x.Cariler,
                Date       = x.Date,
                Price      = x.Price,
                ProductId  = x.ProductId,
                Products   = x.Products,
                TotalPrice = x.TotalPrice
            }).ToList();

            return(View(Moves));
        }
예제 #2
0
        public IActionResult Detail(int id)
        {
            var moves = _sellingMovesService.GetSellingMovesWithPerconelFilter(id).Select(x => new SellingMovesListView()
            {
                Adet       = x.Adet,
                AppUserId  = x.AppUserId,
                Date       = x.Date,
                Id         = x.Id,
                Products   = x.Products,
                Price      = x.Price,
                TotalPrice = x.TotalPrice,
                Cariler    = x.Cariler,
                ProductId  = x.ProductId
            }).ToList();

            return(View(moves));
        }
        public async Task <IActionResult> Order()
        {
            var id = await _userManager.FindByNameAsync(User.Identity.Name);

            if (id != null)
            {
                var moves = _sellingMovesService.GetSellingMovesWithPerconelFilter().Where(x => x.AppUserId == id.Id).Select(x => new OrderViewModel()
                {
                    Date      = x.Date,
                    Price     = x.Price,
                    ProductId = x.ProductId,
                    Product   = x.Products
                }).ToList();
                return(View(moves));
            }

            return(RedirectToAction("Index", "Login"));
        }