Beispiel #1
0
        public IActionResult Get()
        {
            var repository = new ShipperRepository(_context);
            var shippers   = repository.GetAll();

            return(Ok(shippers));
        }
Beispiel #2
0
        public ActionResult GetAllShippers()
        {
            var repository = new ShipperRepository(_context);

            return(Ok(repository.GetAll()
                      .Select(r => new SelectItem(r.ShipperID.ToString(), r.ShipperID.ToString() + " - "
                                                  + r.CompanyName))
                      .ToList()));
        }
        public ActionResult Shippers()
        {
            List <Shipper> shippers = new List <Shipper>();

            using (MySqlConnection conn = DBUtils.GetConnection()) {
                ShipperRepository repo = new ShipperRepository(conn);
                shippers = repo.GetAll().ToList <Shipper>();
            }
            return(View(shippers));
        }
 public IEnumerable <SelectItem> GetAllShippers()
 {
     using (var context = new NorthwindDbContext(_options))
     {
         ShipperRepository repository = new ShipperRepository(context);
         return(repository.GetAll()
                .Select(r => new SelectItem(r.ShipperID.ToString(), r.ShipperID.ToString() + " - "
                                            + r.CompanyName))
                .ToList());
     }
 }
        public ActionResult ShipperList(int?page, int?shipperID)
        {
            ShipperVM svm = new ShipperVM
            {
                PagedOrders = shipperID == null?oRep.GetAll().ToPagedList(page ?? 1, 15) : oRep.Where(x => x.ShipperID == shipperID).ToPagedList(page ?? 1, 15),
                                  Shippers = sRep.GetAll()
            };

            if (shipperID != null)
            {
                TempData["shipID"] = shipperID;
            }
            return(View(svm));
        }
 public ActionResult ConfirmOrder()
 {
     if (Session["scart"] != null)
     {
         AppUser mevcutKullanici;
         if (Session["member"] != null)
         {
             mevcutKullanici = Session["member"] as AppUser;
         }
         else
         {
             TempData["anonim"] = "Kullanıcı üye değil";
         }
         OrderVM ovm = new OrderVM
         {
             Shippers = sRep.GetAll()
         };
         return(View(ovm));
     }
     TempData["sepetBos"] = "Sepetinizde ürün bulunmamaktadır";
     return(RedirectToAction("ShoppingList"));
 }
Beispiel #7
0
 public IHttpActionResult GetAll()
 {
     return(Ok(shipperRepository.GetAll()));
 }
 public List <Shipper> GetShippers()
 {
     return(shipperRepository.GetAll());
 }
        public IEnumerable <ShipperDetailDTO> GetAll(int pageIndex, int pageSize)
        {
            var result = _repo.GetAll(pageSize, pageIndex).Translate <ShipperDetail, ShipperDetailDTO>();

            return(result);
        }
Beispiel #10
0
 // GET: Admin/Shipper
 public ActionResult ShipperList()
 {
     return(View(sRep.GetAll()));
 }