Пример #1
0
 //public IActionResult QuanLy(string maloai, string search)
 //{
 //    return View(context.SanPham.Where(x => x.MaSp.ToLower().Contains(search.ToLower()) || x.TenSp.ToLower().Contains(search.ToLower())));
 //}
 //public IActionResult QuanLyDienThoai()
 //{
 //    return View(_shopRepo.ReadSanPham("LSP0002"));
 //}
 public IActionResult Them(string Id)
 {
     ViewBag.NhaSanXuat = _nsxService.GetNhaSanXuats();
     ViewBag.NhaCungCap = _nccService.GetNhaCungCaps();
     ViewBag.ThongSo    = _tsService.GetThongSo(Id);
     ViewData["MaLoai"] = Id;
     //ViewData["TenLoai"] = context.LoaiSp.Find(Id).TenLoai;
     ViewData["TenLoai"] = _spService.GetLoaiSp(Id);
     return(View());
 }