Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "MaDanhMuc,TenDanhMuc")] DanhMuc danhMuc)
 {
     if (ModelState.IsValid)
     {
         db.Entry(danhMuc).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(danhMuc));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "MaNhanVien,HoTen,TenDangNhap,MatKhau,NgayVaoLam")] NhanVien nhanVien)
 {
     if (ModelState.IsValid)
     {
         db.Entry(nhanVien).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(nhanVien));
 }
 public ActionResult Edit([Bind(Include = "MaTrangThai,TenTrangThai")] TrangThaiDonHang trangThaiDonHang)
 {
     if (ModelState.IsValid)
     {
         db.Entry(trangThaiDonHang).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(trangThaiDonHang));
 }
Ejemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "MaChatLieu,TenChatLieu")] ChatLieu chatLieu)
 {
     if (ModelState.IsValid)
     {
         db.Entry(chatLieu).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(chatLieu);
 }
Ejemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "MaKichCo,TenKichCo")] KichCo kichCo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(kichCo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(kichCo));
 }
 public ActionResult Edit([Bind(Include = "MaThuongHieu,TenThuongHieu,DiaChi,SoDienThoai")] ThuongHieu thuongHieu)
 {
     if (ModelState.IsValid)
     {
         db.Entry(thuongHieu).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(thuongHieu));
 }
 public ActionResult Edit([Bind(Include = "ID,username,pass")] QuanTriVien quanTriVien)
 {
     if (ModelState.IsValid)
     {
         db.Entry(quanTriVien).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(quanTriVien));
 }
Ejemplo n.º 8
0
 public ActionResult Edit([Bind(Include = "MaKhachHang,HoTen,Email,DiaChi,SoDienThoai,TenDangNhap,MatKhau,NgaySinh,GioiTinh,ThoiGianDangKy")] KhachHang khachHang)
 {
     if (ModelState.IsValid)
     {
         db.Entry(khachHang).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(khachHang));
 }
Ejemplo n.º 9
0
 public ActionResult Edit([Bind(Include = "MaDMSP,MaDanhMuc,TenDMSP")] DanhMucSanPham danhMucSanPham)
 {
     if (ModelState.IsValid)
     {
         db.Entry(danhMucSanPham).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaDanhMuc = new SelectList(db.DanhMucs, "MaDanhMuc", "TenDanhMuc", danhMucSanPham.MaDanhMuc);
     return(View(danhMucSanPham));
 }
 public ActionResult Edit([Bind(Include = "SoHieuDonHang,MaDonHang,MaSanPham,SoLuongSanPham,GiaSanPham,GhiChu")] ChiTietDonHang chiTietDonHang)
 {
     if (ModelState.IsValid)
     {
         db.Entry(chiTietDonHang).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaDonHang = new SelectList(db.DonHangs, "MaDonHang", "MaNhanVien", chiTietDonHang.MaDonHang);
     ViewBag.MaSanPham = new SelectList(db.SanPhams, "MaSanPham", "MaDMSP", chiTietDonHang.MaSanPham);
     return(View(chiTietDonHang));
 }
Ejemplo n.º 11
0
 public ActionResult Edit([Bind(Include = "MaDonHang,MaNhanVien,MaKhachHang,MaTrangThai,TongTien,ThoiGianTaoDonHang,ThoiGianThanhToan,ThoiGianGiaoHang,GhiChu")] DonHang donHang)
 {
     if (ModelState.IsValid)
     {
         db.Entry(donHang).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaKhachHang = new SelectList(db.KhachHangs, "MaKhachHang", "HoTen", donHang.MaKhachHang);
     ViewBag.MaNhanVien  = new SelectList(db.NhanViens, "MaNhanVien", "HoTen", donHang.MaNhanVien);
     ViewBag.MaTrangThai = new SelectList(db.TrangThaiDonHangs, "MaTrangThai", "TenTrangThai", donHang.MaTrangThai);
     return(View(donHang));
 }
Ejemplo n.º 12
0
 public ActionResult Edit([Bind(Include = "MaSanPham,MaDMSP,MaKichCo,MaChatLieu,MaThuongHieu,TenSanPham,GiaSanPham,GiaChietKhau,SoLuong,LinkAnh,LinkListAnh,ThongTinSP,NgayCapNhat,SoLuongMua")] SanPham sanPham)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sanPham).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaChatLieu   = new SelectList(db.ChatLieux, "MaChatLieu", "TenChatLieu", sanPham.MaChatLieu);
     ViewBag.MaDMSP       = new SelectList(db.DanhMucSanPhams, "MaDMSP", "MaDanhMuc", sanPham.MaDMSP);
     ViewBag.MaKichCo     = new SelectList(db.KichCoes, "MaKichCo", "TenKichCo", sanPham.MaKichCo);
     ViewBag.MaThuongHieu = new SelectList(db.ThuongHieux, "MaThuongHieu", "TenThuongHieu", sanPham.MaThuongHieu);
     return(View(sanPham));
 }