GetComissions()
method. Programmer Peter, having seen Vasya, the programmer, had already written the GetComissions()
method on the service (and then we had one service with one endpoint), without thinking twice, took it and used it. Everything would be fine, it took only a couple of weeks for the customer to show, in one of the places other than the commissions, their statistics, statuses, decisions, and much more. As a result, the second module immediately began to fall with an error.copy local
parameters for project references with a client service (when working with MEF and the need to have one entity of some class in the service locator).Person
and Document
in the database. According to the canons, in the datacontraction, the Person
class will have a List, .. Document Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.
, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.
, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.
, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
List, .. Document
Person
. Person
Documents
, . , Person
List.
, , (, , Person
Document
), PersonEx
DocumentEx
, PersonEx
List! , β , . -, , - , .. .
4. , , -
, , . , , - , , β .
, β , - , , ( β ).
- , , .
Hint: date_insert
date_update
, - .
5. ,
, , -, - . , . , ..:
, - . - , , , , . , .. .
β Β« Β», - .
, «» () , - ( ) .
6.
.

, - ( - ). , ParentDiapason
, ChildDiapason
- .
, .. 245 300 400. , quantity
, , quantity
(startSeries, endSeries, startNumber, endNumber)
. , :
:
:
, β .
.
Hint: MsSQL Server 2012 - , -, .
7.
- , . , :
, ( β , β )
public class Users { public class Status : StatusBase<Status> { /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Active = 1; /// <summary> /// ( ) /// </summary> [StringStatus("")] public const int Inactive = 0; } }
StatusBase β , (-),
public class StatusBase<T> where T : class { private static Dictionary<int, string> statusesDictionary; public static string GetStringStatus(int key) { if (statusesDictionary == null) { CreateStatusDictionary(); } string result = statusesDictionary.ContainsKey(key) ? statusesDictionary[key] : " "; return result; } private static void CreateStatusDictionary() { statusesDictionary = new Dictionary<int, string>(); FieldInfo[] fields = typeof(T).GetFields(); foreach (FieldInfo field in fields) { string TextStatus = ((StringStatusAttribute)field.GetCustomAttributes(typeof(StringStatusAttribute), false)[0]). TextStatus; int statusKey = (int)field.GetValue(null); statusesDictionary.Add(statusKey, TextStatus); } } }
, , ,
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string result = Data.Statuses.Users.Status.GetStringStatus((int)value); return result; }
, , , .
. , - .
Source: https://habr.com/ru/post/182132/
All Articles