public ActionResult Edit([Bind(Include = "MaLoaiSP,TenLoaiSP")] LoaiSP loaiSP) { if (ModelState.IsValid) { db.Entry(loaiSP).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(loaiSP)); }
public ActionResult Edit([Bind(Include = "MaNV,HoNV,Ten,Diachi,Dienthoai")] Nhanvien nhanvien) { if (ModelState.IsValid) { db.Entry(nhanvien).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(nhanvien)); }
public ActionResult Edit([Bind(Include = "MaKH,TenKH,DiaChi,DienThoai,Fax,Email")] KhachHang khachHang) { if (ModelState.IsValid) { db.Entry(khachHang).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(khachHang)); }
public ActionResult Edit([Bind(Include = "MaSP,TenSP,Donvitinh,Dongia,MaLoaiSP,HinhSP")] SanPham sanPham) { if (ModelState.IsValid) { db.Entry(sanPham).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MaLoaiSP = new SelectList(db.LoaiSPs, "MaLoaiSP", "TenLoaiSP", sanPham.MaLoaiSP); return(View(sanPham)); }
public ActionResult Edit([Bind(Include = "MaHD,MaSP,Soluong,DongiaBan,Giamgia")] CTHD cTHD) { if (ModelState.IsValid) { db.Entry(cTHD).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MaHD = new SelectList(db.HoaDons, "MaHD", "MaKH", cTHD.MaHD); return(View(cTHD)); }
public ActionResult Edit([Bind(Include = "MaHD,MaKH,MaNV,NgayLapHD,NgayGiaoHang")] HoaDon hoaDon) { if (ModelState.IsValid) { db.Entry(hoaDon).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MaKH = new SelectList(db.KhachHangs, "MaKH", "TenKH", hoaDon.MaKH); ViewBag.MaNV = new SelectList(db.Nhanviens, "MaNV", "HoNV", hoaDon.MaNV); return(View(hoaDon)); }