if CurState First Enclosed newState Name AwaitingActivation return tru

 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
if (CurState.First() == "Enclosed" && newState.Name == "AwaitingActivation") return true;
else
{
if (CurState.First() == "AwaitingActivation" && newState.Name == "Active") return true;
else
{
if (CurState.First() == "Active" && newState.Name == "Frozen") return true;
else
{
if (CurState.First() == "Active" && newState.Name == "Cancellation") return true;
else
{
if (CurState.First() == "Active" && newState.Name == "Violation") return true;
else
{
if (CurState.First() == "Frozen" && newState.Name == "Active") return true;
else
{
if (CurState.First() == "Cancellation" && newState.Name == "Active") return true;
else
{
if (CurState.First() == "Cancellation" && newState.Name == "Cancelled") return true;
else return false;
}
}
}
}
}
}
//---------------------------------------------
//И это не смотря на наличие такой вот штуки:
public enum FeeTypes
{
/// <summary>
/// разовое начисление
/// </summary>
SingleFee = 1,
/// <summary>
/// периодическое начисление
/// </summary>
PeriodicalFee = 2,
/// <summary>
/// оплата наличными
/// </summary>
CashPayment = 3,
/// <summary>
/// банковский перевод
/// </summary>
BankPayment = 4,
/// <summary>
/// сторно
/// </summary>
ReversePayment = 5,
/// <summary>
/// справка
/// </summary>
Request = 6,
/// <summary>
/// возврат
/// </summary>
ReturnFee = 7,
}