refabrique des commandes
This commit is contained in:
@ -1,18 +1,18 @@
|
||||
using System.IO;
|
||||
using Microsoft.AspNet.FileProviders;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Billing;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
public static class FileSystemHelpers {
|
||||
public static IDirectoryContents GetFileContent(this Estimate estimate, string userFileDir)
|
||||
public static IDirectoryContents GetFileContent(this RDVEstimate estimate, string userFileDir)
|
||||
{
|
||||
if (estimate?.Command?.PerformerProfile?.Performer == null)
|
||||
if (estimate?.Query?.PerformerProfile?.Performer == null)
|
||||
return null;
|
||||
var fsp = new PhysicalFileProvider(
|
||||
Path.Combine(
|
||||
userFileDir,
|
||||
estimate.Command.PerformerProfile.Performer.UserName
|
||||
estimate.Query.PerformerProfile.Performer.UserName
|
||||
));
|
||||
return fsp.GetDirectoryContents(
|
||||
Path.Combine(Constants.UserBillsFilesDir, estimate.Id.ToString())
|
||||
|
Reference in New Issue
Block a user