Exemplo n.º 1
0
 public ActionResult Step3(int id, string fileUrlList)
 {
     //3.获取视频文件列表
     List<VideoFileList> json = JsonHelper.JsonDeserialize<List<VideoFileList>>(fileUrlList);
     VideoUrl videoUrl = new VideoUrl();
     foreach (var file in json)
     {
         videoUrl.VideoOrder = file.Num + 1;
         videoUrl.VideoURL = file.Url;
         videoUrl.VideoID = id;
         db.VideoUrls.Add(videoUrl);
     }
     db.SaveChanges();
     return Content("Succeed!");
 }
Exemplo n.º 2
0
 public ActionResult DeleteFile(int videoPartID)
 {
     if (Request.IsAjaxRequest())
     {
         var file = new VideoUrl { VideoPartID = videoPartID };
         db.Entry(file).State = EntityState.Deleted;
         db.SaveChanges();
         return Content("succeed");
     }
     return Content("faild");
 }