本文整理汇总了C#中PartnerEditTDS.DisableConstraint方法的典型用法代码示例。如果您正苦于以下问题:C# PartnerEditTDS.DisableConstraint方法的具体用法?C# PartnerEditTDS.DisableConstraint怎么用?C# PartnerEditTDS.DisableConstraint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PartnerEditTDS
的用法示例。
在下文中一共展示了PartnerEditTDS.DisableConstraint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadData
//.........这里部分代码省略.........
{
DataRow InterestRow;
// Load data for Interests
FPartnerEditScreenDS.Merge(GetPartnerInterestsInternal(out ItemsCountPartnerInterests, false));
FPartnerEditScreenDS.Merge(GetInterestsInternal(out ItemsCountInterests, false));
// fill field for interest category in PartnerInterest table in dataset
foreach (PartnerEditTDSPPartnerInterestRow row in FPartnerEditScreenDS.PPartnerInterest.Rows)
{
InterestRow = FPartnerEditScreenDS.PInterest.Rows.Find(new object[] { row.Interest });
if (InterestRow != null)
{
row.InterestCategory = ((PInterestRow)InterestRow).Category;
}
}
}
else
{
// Only count Interests
GetPartnerInterestsInternal(out ItemsCountPartnerInterests, true);
}
#region Partner Details data according to PartnerClass
switch (FPartnerClass)
{
case TPartnerClass.PERSON:
// Disable some constraints that relate to other tables in the DataSet that are not filled with data.
// This applies for the DataTables that exist for a certain Partner Class, eg. Person, where all other
// DataTables that represent certain Partner Classes are not filled.
FPartnerEditScreenDS.DisableConstraint("FKPerson2");
// points to PFamily
FPartnerEditScreenDS.DisableConstraint("FKPerson4");
// points to PUnit
TLogging.LogAtLevel(9, "Disabled Constraints in Typed DataSet PartnerEditTDS.");
PPersonAccess.LoadByPrimaryKey(FPartnerEditScreenDS, FPartnerKey, ReadTransaction);
// Gift Destination
PPartnerGiftDestinationAccess.LoadViaPPartner(FPartnerEditScreenDS,
FPartnerEditScreenDS.PPerson[0].FamilyKey,
ReadTransaction);
// Determine whether the Partner has a 'EX-WORKER*' Partner Type
HasEXWORKERPartnerType = Ict.Petra.Shared.MPartner.Checks.PartnerIsExWorker(FPartnerEditScreenDS.PPartnerGiftDestination);
if (((!ADelayedDataLoading)) || (ATabPage == TPartnerEditTabPageEnum.petpFamilyMembers))
{
// Load data for Family Members
FPartnerEditScreenDS.Merge(GetFamilyMembersInternal(FPartnerEditScreenDS.PPerson[0].FamilyKey, "",
out ItemsCountFamilyMembers, false));
}
else
{
// Only count Family Members
GetFamilyMembersInternal(FPartnerEditScreenDS.PPerson[0].FamilyKey, "", out ItemsCountFamilyMembers, true);
}
break;
case TPartnerClass.FAMILY:
PFamilyAccess.LoadByPrimaryKey(FPartnerEditScreenDS, FPartnerKey, ReadTransaction);