public ActionResult DownLoadFile(string id, string fileNum, string name) { Member member = m_SessionHelper.WebMember; if (member == null) { return Redirect(Url.Action("Index", "Member")); } new MemberModel().AddDownloadRecord(name, "1", member.MemberId.ToString()); EntityCounter(id, "Downer"); DownloadModel entityModel = new DownloadModel(id); switch (fileNum) { case ("1"): return Redirect(new HomeShowModel().GetFile(entityModel.AFile1, string.IsNullOrWhiteSpace(entityModel.AFile1Name) ? entityModel.Name : entityModel.AFile1Name)); case ("2"): return Redirect(new HomeShowModel().GetFile(entityModel.AFile2, string.IsNullOrWhiteSpace(entityModel.AFile2Name) ? entityModel.Name : entityModel.AFile1Name)); case ("3"): return Redirect(new HomeShowModel().GetFile(entityModel.AFile3, string.IsNullOrWhiteSpace(entityModel.AFile3Name) ? entityModel.Name : entityModel.AFile1Name)); } return new EmptyResult(); }
public ActionResult Detail(string id, string cdts) { GetConditions(cdts); EntityCounter(id, "Vister"); DownloadModel entityModel = new DownloadModel(id); if ("1".Equals(entityModel.IsOut) && !string.IsNullOrWhiteSpace(entityModel.AUrl)) { Member member = m_SessionHelper.WebMember; if (member == null) { return Redirect(Url.Action("Index", "Member")); } return Redirect(entityModel.AUrl); } return View(entityModel); }
public ActionResult Edit(DownloadModel model, string cdts) { GetConditions(cdts); ////檢查內容無障礙是否通過 if (!AccessibilityUtil.CheckFreeGO(model.Content)) { model.ShowFreeGOMsg = true; model.FreeGOColumnName = "Content"; } model.Update(); if (model.ShowFreeGOMsg) { return View("Save", model); } return View("AdminIndex"); }