Exemplo n.º 1
0
 public async Task <IActionResult> GetDocByID([FromQuery] PlanDocs model)
 {
     try
     {
         return(Ok(await new PlanDocs().GetDocByIDAsync(model, contextWeb)));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
Exemplo n.º 2
0
        public async Task <IActionResult> UploadPlanDocs([FromForm] FileUpload model)
        {
            string initialPath = appSettings.File.PB_PlanDocsInitialPath;

            try
            {
                PlanDocs planDocs = await new PlanDocs().UploadFileAsync(model: model, initialPath: initialPath);

                return(Ok(planDocs));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }