コード例 #1
0
 public async Task <ApiResult <string> > Edit(CmsDownload parm)
 {
     parm.SiteGuid = SiteTool.CurrentSite?.Guid;
     //处理文件类型
     parm.FileType = FileHelper.GetFileExt(parm.FileUrl);
     return(await _downloadService.UpdateAsync(parm));
 }
コード例 #2
0
 public async Task <IActionResult> Edit([FromBody] CmsDownload parm)
 {
     parm.SiteGuid = SiteTool.CurrentSite?.Guid;
     //处理文件类型
     parm.FileType = FileHelper.GetFileExt(parm.FileUrl);
     return(Ok(await _downloadService.UpdateAsync(parm)));
 }
コード例 #3
0
 public async Task <IActionResult> Add([FromBody] CmsDownload parm)
 {
     parm.SiteGuid = SiteGuid;
     //处理文件类型
     parm.FileType = FileHelper.GetFileExt(parm.FileUrl);
     return(Ok(await _downloadService.AddAsync(parm)));
 }
コード例 #4
0
 public void OnGet(int id = 0, int column = 0)
 {
     Download = _downservice.GetModelAsync(m => m.Id == id).Result.data;
     if (Download.Id == 0 && column != 0)
     {
         Download.ColumnId = column;
     }
 }
コード例 #5
0
 public async Task <ApiResult <string> > Edit(CmsDownload parm)
 {
     //处理文件类型
     parm.FileType = FileHelper.GetFileExt(parm.FileUrl);
     return(await _downloadService.UpdateAsync(parm));
 }