public ActionResult IndexDetail(int ma) { tbl_DeXuat_TM tm = new tbl_DeXuat_TM(); tm = new DeXuatTMDao().load(ma).FirstOrDefault(); ViewBag.TM = tm; var model = new DeXuatDao().Detail(ma); return(View(model)); }
public ActionResult Detail(int Id) { DeXuatModel model = new DeXuatModel(); if (Id > 0) { model = new DeXuatDao().Detail(Id); } return(PartialView("_DetailTradeRequest", model)); }
public ActionResult Save(DeXuatModel model) { if (!ModelState.IsValid) { return(PartialView("_DetailTradeRequest", model)); } bool status; if (model.Id > 0) { status = new DeXuatDao().Update(model); } else { status = new DeXuatDao().Save(model); } return(Json(new { status = status }, JsonRequestBehavior.AllowGet)); }
// Kiểm tra tồn tại của đề xuất public JsonResult CheckExistDX(string ma) { bool status = new DeXuatDao().CheckExistDX(ma); return(Json(status, JsonRequestBehavior.AllowGet)); }
public ActionResult Delete(int ma) { bool status = new DeXuatDao().Delete(ma); return(Json(new { status = status }, JsonRequestBehavior.AllowGet)); }
public ActionResult Load() { var model = new DeXuatDao().Load(); return(Json(new { data = model }, JsonRequestBehavior.AllowGet)); }