// GET: Admin/AboutUs public ActionResult Index(int page = 1, int pagesize = 10) { var dao = new AboutUsDAO(); var model = dao.ListAllPage(page, pagesize); return(View(model)); }
protected void Page_Load(object sender, EventArgs e) { User currentUser = (User)Session["currentUser"]; if (currentUser != null) { Boolean authenticate = authenticateAccess(currentUser); if (!authenticate) { Response.Redirect("errorPage.aspx"); } else { if (!IsPostBack) { AboutUsDAO aDAO = new AboutUsDAO(); string message = aDAO.getAboutUs(); CKEditor1.Text = message; } } } else { Response.Redirect("login.aspx"); } }
protected void cfmSubmit_Click(object sender, EventArgs e) { AboutUsDAO aDAO = new AboutUsDAO(); aDAO.updateAboutUs(CKEditor1.Text); //set audit User currentUser = (User)Session["currentUser"]; setAudit(currentUser, "about us", "update", null, "updated about us"); Response.Redirect("aboutUs.aspx"); }
public ActionResult Edit(AboutU about) { if (ModelState.IsValid) { var dao = new AboutUsDAO(); bool result = dao.Update(about); if (result) { SetAlert("Cập nhật mới thành công", "success"); return(RedirectToAction("Index", "AboutUs")); } else { ModelState.AddModelError("", "Cập nhật không thành công ! "); } } return(View("Index")); }
// GET: About public ActionResult Index() { var model = new AboutUsDAO().GetAboutDescription(); return(View(model)); }
protected void Page_Load(object sender, EventArgs e) { AboutUsDAO aDAO = new AboutUsDAO(); lblMsg.Text = aDAO.getAboutUs(); }
public static List <AboutUs> GetAllAU() { return(AboutUsDAO.GetAllAU()); }
public static bool UpdateAU(AboutUs au) { return(AboutUsDAO.UpdateAU(au)); }
public static List <AboutUs> GetAUDisplay() { return(AboutUsDAO.GetAUDisplay()); }
public static List <AboutUs> GetAUHide() { return(AboutUsDAO.GetAUHide()); }
public static AboutUs GetAUByID(int id) { return(AboutUsDAO.GetAUByID(id)); }
public static bool CreateAU(AboutUs au) { return(AboutUsDAO.CreateAU(au)); }
public ActionResult Edit(int id) { var user = new AboutUsDAO().Getid(id); return(View(user)); }