CaseFileServerFunctions.cs
1.24 KB
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Core;
using Sungero.CoreEntities;
using DirRX.LongTermArchive.CaseFile;
namespace DirRX.LongTermArchive.Server
{
partial class CaseFileFunctions
{
// Получить список документов, у которых подразделение не соответствует указанному в деле.
[Remote(IsPure = true)]
public IQueryable<Sungero.Docflow.IOfficialDocument> GetInvalidDocuments()
{
return Sungero.Docflow.OfficialDocuments.GetAll(x => x.CaseFile != null && x.CaseFile.Equals(_obj) &&
(x.Department == null || !x.Department.Equals(_obj.Department)));
}
[Public,Remote(IsPure=true)]
public IQueryable<DirRX.Storage.IConsolidatedInventory> GetInventories()
{
// Выбрать описи с числом дела не превышающим максимальное.
return DirRX.Storage.ConsolidatedInventories.GetAll(i => i.Status == Sungero.CoreEntities.DatabookEntry.Status.Active &&
i.CasesNumber <= Storage.PublicConstants.Module.MaxCaseFilesNumber);
}
}
}