// GET: ThuTien public ActionResult ThuTiennn(ThuChiii thuchiii) { if (Session["TaiKhoan"] == null || Session["TaiKhoan"].ToString() == "") { return(RedirectToAction("DangNhap", "DangKyDangNhap")); } return(View(db.ThuChiiis.ToList().Where(n => n.ThuChi == "Thu"))); }
//Chi tiết public ActionResult HienThiii(int IDD) { ThuChiii thuchiii = db.ThuChiiis.SingleOrDefault(n => n.ID == IDD); if (thuchiii == null) { Response.StatusCode = 404; return(null); } return(View(thuchiii)); }
public ActionResult ChinhSuaaa(ThuChiii thuchiii, FormCollection f) { if (ModelState.IsValid) { db.Entry(thuchiii).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } ViewBag.ChuDe = new SelectList(db.MucChis.ToList(), "MaMuc", "TenMuc"); ViewBag.ThongBao = "Lưu lại thành công "; return(View(thuchiii)); }
public ActionResult ThemMoiii(ThuChiii thuchiii) { ViewBag.ChuDe = new SelectList(db.MucChis.ToList(), "MaMuc", "TenMuc"); if (ModelState.IsValid) { db.ThuChiiis.Add(thuchiii); db.SaveChanges(); return(RedirectToAction("QuanLyThuChiii")); } return(View()); }
public ActionResult GetData() { var thu = db.ThuChiiis.Where(x => x.ThuChi == "Thu").Count(); var chi = db.ThuChiiis.Where(x => x.ThuChi == "Chi").Count(); ThuChiii thuchiii = new ThuChiii(); thuchiii.Thu = thu; thuchiii.Chi = chi; return(Json(thuchiii, JsonRequestBehavior.AllowGet)); }
public ActionResult ChinhSuaaa(int IDD) { ThuChiii thuchiii = db.ThuChiiis.SingleOrDefault(n => n.ID == IDD); if (thuchiii == null) { Response.StatusCode = 404; return(null); } ViewBag.ChuDe = new SelectList(db.MucChis.ToList(), "MaMuc", "TenMuc"); return(View(thuchiii)); }
public ActionResult XacNhanXoaaa(int IDD) { ThuChiii thuchiii = db.ThuChiiis.SingleOrDefault(n => n.ID == IDD); if (thuchiii == null) { Response.StatusCode = 404; return(null); } db.ThuChiiis.Remove(thuchiii); db.SaveChanges(); return(RedirectToAction("QuanLyThuChiii", "QuanLyThuCHi")); }