public ActionResult Edit(Advertise collection) { AdvertiseDao bdDao = new AdvertiseDao(); try { UserLogin us = (UserLogin)Session[SystemConsts.USER_SESSION]; collection.ModifiedBy = us.UserName; collection.ModifiedDate = Hepper.GetDateServer(); if (bdDao.Update(collection)) { SetAlert(@Resources.ResourceAdmin.AdminEditRecordSucess, "success"); return(RedirectToAction("Index")); } else { SetAlert(@Resources.ResourceAdmin.AdminEditRecordFailed, "danger"); } return(RedirectToAction("Index")); } catch { SetAlert(@Resources.ResourceAdmin.AdminEditRecordFailed, "danger"); return(View()); } }
/// <summary> /// /// </summary> /// <param name="emp"></param> /// <returns></returns> public int Update(ADVERTISEMENT obj) { return(dao.Update(obj)); }