public IActionResult ThemPhieuNhapData(PhieuNhapView PhieuNhapView) { if (ModelState.IsValid) { _phieuNhapServices.ThemPhieuNhap(PhieuNhapView.PhieuNhapDTO); Index(); return(View(nameof(Index))); } ViewBag.Error = "Thêm phiếu nhập thất bại"; return(View(nameof(Index))); }
public IActionResult SuaPhieuNhapData(PhieuNhapView PhieuNhapView) { ViewBag.Error = "Cập nhật thành công"; if (ModelState.IsValid) { _phieuNhapServices.SuaPhieuNhap(PhieuNhapView.PhieuNhapDTO); Index(); return(View(nameof(Index))); } ViewBag.Error = "Cập nhật thất bại"; return(View()); }
public IActionResult XoaPhieuNhapData(PhieuNhapView PhieuNhapView) { _phieuNhapServices.XoaPhieuNhap(PhieuNhapView.PhieuNhapDTO); Index(); return(View(nameof(Index))); }