public ActionResult Duyet(int id) { if (Session["Ten_NV"] != null) { ViewBag.Ten_NV = Session["Ten_NV"].ToString(); } if (Session["CHUCVU_NV"] != null) { ViewBag.CHUCVU_NV = Session["CHUCVU_NV"].ToString(); } if (Session["Email_NV"] != null) { ViewBag.Email_NV = Session["Email_NV"].ToString(); } var dao = new DON_HANG_DAO(); var model = dao.TimMaDH(id); if (model.TRANG_THAI == -1) { model.EMAIL_NV = @ViewBag.Email_NV; model.TRANG_THAI = 0; new DON_HANG_DAO().UpdateDonHang(model); return(Json(new { success = 1 })); } return(Json(new { success = 0 })); }
public ActionResult Edit(int MaDH) { var td = new DON_HANG_DAO(); DON_HANG mode = td.TimMaDH(MaDH); return(View(mode)); }