Exemplo n.º 1
0
 //[ValidateAntiForgeryToken]
 public ActionResult SubmitForm(ContentEntity moduleEntity, string keyValue)
 {
     try
     {
         List <UpFileDTO> upFileentitys   = new List <UpFileDTO>();
         List <string>    lstRemoveImgIds = new List <string>();
         if (HttpContext.Request["upFileentitys"] != null)
         {
             string strupFiles = HttpContext.Request["upFileentitys"].ToString();
             upFileentitys = JsonConvert.DeserializeObject <List <UpFileDTO> >(strupFiles);
         }
         if (HttpContext.Request["removeImageIds"] != null && !string.IsNullOrEmpty(keyValue))
         {
             string strRemoveImageIds = HttpContext.Request["removeImageIds"].ToString();
             lstRemoveImgIds = JsonConvert.DeserializeObject <List <string> >(strRemoveImageIds);
         }
         moduleEntity.WebSiteId = Base_WebSiteId;
         c_contentApp.SubmitForm(moduleEntity, keyValue, upFileentitys, lstRemoveImgIds);
         return(Success("操作成功。"));
     }
     catch (Exception ex)
     {
         return(Error("操作失败。" + ex.Message));
     }
 }