コード例 #1
0
        public IActionResult Get()
        {
            var repository = new ShipperRepository(_context);
            var shippers   = repository.GetAll();

            return(Ok(shippers));
        }
コード例 #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()));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
 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());
     }
 }
コード例 #5
0
        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));
        }
コード例 #6
0
 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"));
 }
コード例 #7
0
 public IHttpActionResult GetAll()
 {
     return(Ok(shipperRepository.GetAll()));
 }
コード例 #8
0
 public List <Shipper> GetShippers()
 {
     return(shipperRepository.GetAll());
 }
コード例 #9
0
        public IEnumerable <ShipperDetailDTO> GetAll(int pageIndex, int pageSize)
        {
            var result = _repo.GetAll(pageSize, pageIndex).Translate <ShipperDetail, ShipperDetailDTO>();

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