Example #1
0
        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));
        }
Example #2
0
        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));
        }
Example #3
0
        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));
        }
Example #4
0
        /// <summary>
        /// 初始化修改界面
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public ActionResult Update(int Id)
        {
            HtmlItemDto js = _htmlItemContract.Edit(Id);

            return(PartialView(js));
        }