本文整理汇总了C#中Privilege.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# Privilege.Clone方法的具体用法?C# Privilege.Clone怎么用?C# Privilege.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Privilege
的用法示例。
在下文中一共展示了Privilege.Clone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetRefferalReturnOptions_SearchOne
/// <summary>
/// По заданному Referral'у строит Options для SeacrhOne.
///
/// Может можно сделать лучше?(проверки на null)
///
/// </summary>
public Options GetRefferalReturnOptions_SearchOne(Referral referral, Privilege[] privileges, string idMq, Coding mqReferralStatus)
{
Options opt = new Options();
opt.IdMq = idMq;
if (referral.ReferralInfo != null)
{
opt.ReferralInfo = new ReferralInfo
{
ProfileMedService = referral.ReferralInfo.ProfileMedService,
ReferralType = referral.ReferralInfo.ReferralType,
MqReferralStatus = mqReferralStatus
};
}
if (referral.Target != null)
{ opt.Target = new ReferralTarget { Lpu = referral.Target.Lpu }; }
if (referral.Source != null)
{ opt.Source = new ReferralSource { Lpu = referral.Source.Lpu }; }
if (referral.ReferralSurvey != null)
{
opt.Survey = new Survey
{
SurveyType = referral.ReferralSurvey.SurveyType,
SurveyOrgan = referral.ReferralSurvey.SurveyOrgan
};
}
if (referral.Patient != null)
{
opt.Patient.Person = new Person
{
BirthDate = referral.Patient.Person.BirthDate,
IdPatientMis = referral.Patient.Person.IdPatientMis
};
if (referral.Patient.Person.HumanName != null)
{
opt.Patient.Person.HumanName = new HumanName
{
FamilyName = referral.Patient.Person.HumanName.FamilyName,
GivenName = referral.Patient.Person.HumanName.GivenName,
MiddleName = referral.Patient.Person.HumanName.MiddleName
};
}
}
if (privileges != null)
{ opt.Patient.Privileges = (Privilege[])privileges.Clone(); }
if (referral.EventsInfo != null && referral.EventsInfo.Target != null)
{
opt.EventsInfo.Target = new EventTarget
{
IsReferralReviwed = referral.EventsInfo.Target.IsReferralReviwed,
ReceptionAppointDate = referral.EventsInfo.Target.ReceptionAppointDate
};
}
OptionData.options = opt;
return opt;
}