Пример #1
0
        public ActionResult ManufacturersTable(int id = 1, int removeId = -1)
        {
            try
            {
                if (removeId != -1)
                {
                    _manufacturers.RemoveManufacturer(removeId);
                }
            }
            catch
            {
                // ignored
            }

            var manufacturers = _manufacturers
                                .GetAll()
                                .Skip((id - 1) * _perPage)
                                .Take(_perPage);

            return(PartialView(manufacturers));
        }
Пример #2
0
 public ActionResult RemoveManufacturer(int id)
 {
     _manufacturers.RemoveManufacturer(id);
     return(RedirectToAction("Manufacturers"));
 }