SupAgreementClientFunctions.cs
1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Contracts.SupAgreement;
using Sungero.Core;
using Sungero.CoreEntities;
namespace Sungero.Contracts.Client
{
partial class SupAgreementFunctions
{
/// <summary>
/// Показывать сводку по документу в заданиях на согласование и подписание.
/// </summary>
/// <returns>True, если в заданиях нужно показывать сводку по документу.</returns>
[Public]
public override bool NeedViewDocumentSummary()
{
return true;
}
/// <summary>
/// Получить список типов документов, доступных для смены типа.
/// </summary>
/// <returns>Список типов документов, доступных для смены типа.</returns>
public override List<Domain.Shared.IEntityInfo> GetTypesAvailableForChange()
{
if (_obj.ExchangeState != null)
return new List<Domain.Shared.IEntityInfo>() { Docflow.SimpleDocuments.Info };
var types = new List<Domain.Shared.IEntityInfo>();
types.Add(Contracts.Info);
return types;
}
/// <summary>
/// Дополнительное условие доступности действия "Сменить тип".
/// </summary>
/// <returns>True - если действие "Сменить тип" доступно, иначе - false.</returns>
public override bool CanChangeDocumentType()
{
return _obj.VerificationState == VerificationState.InProcess || base.CanChangeDocumentType();
}
}
}