本文整理汇总了C#中IPerson.ReadValueByPropertyName方法的典型用法代码示例。如果您正苦于以下问题:C# IPerson.ReadValueByPropertyName方法的具体用法?C# IPerson.ReadValueByPropertyName怎么用?C# IPerson.ReadValueByPropertyName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPerson
的用法示例。
在下文中一共展示了IPerson.ReadValueByPropertyName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckOutOfOffice
/// <summary>
/// Checks the out of office.
/// </summary>
/// <param name="person">The person.</param>
/// <param name="oldPerson">The old person.</param>
public void CheckOutOfOffice(IPerson person, IPerson oldPerson)
{
if (person == null)
throw new ArgumentNullException("person");
if (oldPerson == null)
throw new ArgumentNullException("oldPerson");
try
{
if (person.ReadValueByPropertyName<bool?>(Constants.OutOfOfficePropertyName) == true)
{
if (oldPerson.ReadValueByPropertyName<bool?>(Constants.OutOfOfficePropertyName) != true)
{
var personInfo = PersonManager.GetPerson(person.Id);
MoveApprovalMemberResultToDelegate(personInfo);
MoveActionsToDelegate(personInfo);
}
else
{
if (person.ReadValueByPropertyName<int?>(Constants.DelegateApproverPropertyName)
!= oldPerson.ReadValueByPropertyName<int?>(Constants.DelegateApproverPropertyName))
{
var personInfo = PersonManager.GetPerson(person.Id);
GetApprovalMemberResultFromDelegate(personInfo);
GetActionsFromDelegate(personInfo, false);
MoveApprovalMemberResultToDelegate(personInfo);
MoveActionsToDelegate(personInfo);
}
}
}
else
{
if (oldPerson.ReadValueByPropertyName<bool?>(Constants.OutOfOfficePropertyName) == true)
{
var personInfo = PersonManager.GetPerson(person.Id);
GetApprovalMemberResultFromDelegate(personInfo);
GetActionsFromDelegate(personInfo);
}
}
}
catch (Exception ex)
{
Logger.Log(LogSeverity.Error, GetType().ToString(), ex);
throw;
}
}