public ActionResult SuaPhiVC(TinhThanh tinh) { if (!Models.User.CurrentUser.Quyen.CoChucNang("sua_phi_van_chuyen")) { return RedirectToAction("Error", "Admin"); } try { if (ModelState.IsValid) { db.Entry(tinh).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("QLPhiVanChuyen"); } } catch (Exception ex) { } return View(); }
public ActionResult ThemPhiVC(TinhThanh tinh) { if (!Models.User.CurrentUser.Quyen.CoChucNang("them_phi_van_chuyen")) { return RedirectToAction("Error", "Admin"); } if (ModelState.IsValid) { db.TinhThanhs.Add(tinh); db.SaveChanges(); return RedirectToAction("QLPhiVanChuyen"); } return View(); }