CounterpartyDocumentHandlers.cs
1.11 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
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Core;
using Sungero.CoreEntities;
using Sungero.Docflow.CounterpartyDocument;
namespace Sungero.Docflow
{
partial class CounterpartyDocumentSharedHandlers
{
public virtual void CounterpartyChanged(Sungero.Docflow.Shared.CounterpartyDocumentCounterpartyChangedEventArgs e)
{
this.FillName();
}
public override void DocumentKindChanged(Sungero.Docflow.Shared.OfficialDocumentDocumentKindChangedEventArgs e)
{
base.DocumentKindChanged(e);
if (e.NewValue != null && e.NewValue.NumberingType != Docflow.DocumentKind.NumberingType.NotNumerable)
{
if (_obj.BusinessUnit == null)
_obj.BusinessUnit = Docflow.PublicFunctions.Module.GetDefaultBusinessUnit(Company.Employees.Current);
_obj.State.Properties.BusinessUnit.IsVisible = true;
_obj.State.Properties.Department.IsVisible = true;
}
else
{
_obj.State.Properties.BusinessUnit.IsVisible = false;
_obj.State.Properties.Department.IsVisible = false;
}
}
}
}