public JsonResult Create(HtmlItemDto JSDto) { HttpFileCollectionBase listFile = Request.Files; //获取配置文件下JS的保存路径 string jsPath = ConfigurationHelper.GetAppSetting("JSPath"); List <OperationResult> listOper = _htmlItemContract.Insert(listFile, JSDto, HtmlItemFlag.Js, jsPath); return(Json(listOper)); }
public JsonResult Create(HtmlItemDto dto) { HttpFileCollectionBase listFile = Request.Files; //获取配置文件下的保存路径 string path = ConfigurationHelper.GetAppSetting("ImagePath"); var res = _htmlItemContract.Insert(listFile, dto, HtmlItemFlag.Image, path); return(Json(res)); }
public JsonResult Update(HtmlItemDto dto) { HttpFileCollectionBase listFile = Request.Files; var entity = _htmlItemContract.View(dto.Id); string path = string.Empty; if (entity != null) { path = entity.SavePath; } dto.HtmlItemType = (int)HtmlItemFlag.Js; List <OperationResult> listOper = _htmlItemContract.Update(listFile, dto, HtmlItemFlag.Js, path); return(Json(listOper)); }
/// <summary> /// 初始化修改界面 /// </summary> /// <param name="Id"></param> /// <returns></returns> public ActionResult Update(int Id) { HtmlItemDto js = _htmlItemContract.Edit(Id); return(PartialView(js)); }