本文整理汇总了C#中PartnerEditTDS.RemoveEmptyTables方法的典型用法代码示例。如果您正苦于以下问题:C# PartnerEditTDS.RemoveEmptyTables方法的具体用法?C# PartnerEditTDS.RemoveEmptyTables怎么用?C# PartnerEditTDS.RemoveEmptyTables使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PartnerEditTDS
的用法示例。
在下文中一共展示了PartnerEditTDS.RemoveEmptyTables方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadData
//.........这里部分代码省略.........
TMailroom.GetLastContactDate(FPartnerKey, out LastContactDate);
GetContactsInternal(out ItemsCountContacts, out LastContactDate);
// Create 'miscellaneous' DataRow
MiscellaneousDataDT = FPartnerEditScreenDS.MiscellaneousData;
MiscellaneousDataDR = MiscellaneousDataDT.NewRowTyped(false);
MiscellaneousDataDR.PartnerKey = FPartnerKey;
if (FKeyForSelectingPartnerLocation.LocationKey == 0)
{
MiscellaneousDataDR.SelectedSiteKey = LocationPK.SiteKey;
MiscellaneousDataDR.SelectedLocationKey = LocationPK.LocationKey;
}
else
{
// TLogging.LogAtLevel(6, "Passed in FKeyForSelectingPartnerLocation.SiteKey and FKeyForSelectingPartnerLocation.LocationKey: " +
// FKeyForSelectingPartnerLocation.SiteKey.ToString() + "/" + FKeyForSelectingPartnerLocation.LocationKey.ToString());
MiscellaneousDataDR.SelectedSiteKey = FKeyForSelectingPartnerLocation.SiteKey;
MiscellaneousDataDR.SelectedLocationKey = FKeyForSelectingPartnerLocation.LocationKey;
}
if (LastGiftDate != DateTime.MinValue)
{
MiscellaneousDataDR.LastGiftDate = LastGiftDate;
}
else
{
MiscellaneousDataDR.SetLastGiftDateNull();
}
if (LastContactDate != DateTime.MinValue)
{
MiscellaneousDataDR.LastContactDate = LastContactDate;
}
else
{
MiscellaneousDataDR.SetLastContactDateNull();
}
MiscellaneousDataDR.LastGiftInfo = LastGiftInfo;
MiscellaneousDataDR.ItemsCountAddresses = ItemsCountAddresses;
MiscellaneousDataDR.ItemsCountAddressesActive = ItemsCountAddressesActive;
MiscellaneousDataDR.ItemsCountContactDetails = ItemsCountContactDetails;
MiscellaneousDataDR.ItemsCountContactDetailsActive = ItemsCountContactDetailsActive;
MiscellaneousDataDR.ItemsCountSubscriptions = ItemsCountSubscriptions;
MiscellaneousDataDR.ItemsCountSubscriptionsActive = ItemsCountSubscriptionsActive;
MiscellaneousDataDR.ItemsCountContacts = ItemsCountContacts;
MiscellaneousDataDR.ItemsCountPartnerTypes = ItemsCountPartnerTypes;
MiscellaneousDataDR.ItemsCountPartnerRelationships = ItemsCountPartnerRelationships;
MiscellaneousDataDR.ItemsCountFamilyMembers = ItemsCountFamilyMembers;
MiscellaneousDataDR.ItemsCountInterests = ItemsCountPartnerInterests;
MiscellaneousDataDR.ItemsCountPartnerBankingDetails = ItemsCountPartnerBankingDetails;
MiscellaneousDataDR.OfficeSpecificDataLabelsAvailable = OfficeSpecificDataLabelsAvailable;
MiscellaneousDataDR.FoundationOwner1Key = FoundationOwner1Key;
MiscellaneousDataDR.FoundationOwner2Key = FoundationOwner2Key;
MiscellaneousDataDR.HasEXWORKERPartnerType = HasEXWORKERPartnerType;
MiscellaneousDataDT.Rows.Add(MiscellaneousDataDR);
#endregion
// Add this partner key to the list of recently used partners.
TRecentPartnersHandling.AddRecentlyUsedPartner(FPartnerKey, FPartnerClass, false, TLastPartnerUse.lpuMailroomPartner);
}
catch (EPartnerLocationNotExistantException)
{
// don't log this exception this is thrown on purpose here and the Client deals with it.
DBAccess.GDBAccessObj.RollbackTransaction();
throw;
}
catch (ESecurityPartnerAccessDeniedException)
{
// don't log this exception this is thrown on purpose here and the Client deals with it.
DBAccess.GDBAccessObj.RollbackTransaction();
throw;
}
catch (Exception Exp)
{
DBAccess.GDBAccessObj.RollbackTransaction();
TLogging.Log("TPartnerEditUIConnector.LoadData exception: " + Exp.ToString(), TLoggingType.ToLogfile);
TLogging.Log(Exp.StackTrace, TLoggingType.ToLogfile);
throw;
}
}
finally
{
if (DBAccess.GDBAccessObj.Transaction != null)
{
DBAccess.GDBAccessObj.CommitTransaction();
}
}
// Accept row changes here so that the Client gets 'unmodified' rows
FPartnerEditScreenDS.AcceptChanges();
// Remove all Tables that were not filled with data before remoting them.
// Examples for such DataTables are the ones that exist for a certain Partner
// Class, eg. Person only one of those Tables will be filled, the other ones
// are not needed at the Client side.
FPartnerEditScreenDS.RemoveEmptyTables();
}
示例2: GetDataFoundation
/// <summary>
/// todoComment
/// </summary>
/// <param name="ABaseTableOnly"></param>
/// <returns></returns>
public PartnerEditTDS GetDataFoundation(Boolean ABaseTableOnly)
{
PartnerEditTDS ReturnValue;
TDBTransaction ReadTransaction;
Boolean NewTransaction;
TLogging.LogAtLevel(9, "TPartnerEditUIConnector.GetDataFoundation called!");
ReturnValue = new PartnerEditTDS(DATASETNAME);
ReadTransaction = DBAccess.GDBAccessObj.GetNewOrExistingTransaction(IsolationLevel.ReadCommitted,
TEnforceIsolationLevel.eilMinimum,
out NewTransaction);
// Foundation Table
PFoundationAccess.LoadByPrimaryKey(ReturnValue, FPartnerKey, ReadTransaction);
if (!ABaseTableOnly)
{
// Foundation Proposal Deadline
PFoundationDeadlineAccess.LoadViaPFoundation(ReturnValue, FPartnerKey, ReadTransaction);
// Proposal Table
PFoundationProposalAccess.LoadViaPFoundation(ReturnValue, FPartnerKey, ReadTransaction);
// Proposal Detail Table
PFoundationProposalDetailAccess.LoadViaPFoundation(ReturnValue, FPartnerKey, ReadTransaction);
}
if (NewTransaction)
{
DBAccess.GDBAccessObj.CommitTransaction();
TLogging.LogAtLevel(7, "TPartnerEditUIConnector.GetDataFoundation: committed own transaction.");
}
// Remove any unused tables from the Typed DataSet
ReturnValue.RemoveEmptyTables();
return ReturnValue;
}
示例3: GetBankingDetails
/// <summary>
/// get the banking details of the current partner
/// </summary>
public PartnerEditTDS GetBankingDetails()
{
Boolean NewTransaction;
PartnerEditTDS localDS = new PartnerEditTDS();
TDBTransaction ReadTransaction = DBAccess.GDBAccessObj.GetNewOrExistingTransaction(IsolationLevel.ReadCommitted,
TEnforceIsolationLevel.eilMinimum,
out NewTransaction);
// Get hold of the two tables needed for the banking information:
// p_partner_banking_details
// p_banking_details
try
{
FTaxDeductiblePercentageEnabled = TSystemDefaultsCache.GSystemDefaultsCache.GetBooleanDefault(
SharedConstants.SYSDEFAULT_TAXDEDUCTIBLEPERCENTAGE, false);
PBankingDetailsAccess.LoadViaPPartner(localDS, FPartnerKey, ReadTransaction);
PPartnerBankingDetailsAccess.LoadViaPPartner(localDS, FPartnerKey, ReadTransaction);
PBankingDetailsUsageAccess.LoadViaPPartner(localDS, FPartnerKey, ReadTransaction);
if (FTaxDeductiblePercentageEnabled)
{
PPartnerTaxDeductiblePctAccess.LoadViaPPartner(localDS, FPartnerKey, ReadTransaction);
}
}
catch (Exception)
{
TLogging.Log("An exception happened while retrieving data.", TLoggingType.ToLogfile);
throw;
}
finally
{
if (NewTransaction)
{
DBAccess.GDBAccessObj.CommitTransaction();
TLogging.LogAtLevel(7, "TPartnerEditUIConnector.GetBankingDetails: committed own transaction.");
}
}
foreach (PartnerEditTDSPBankingDetailsRow bd in localDS.PBankingDetails.Rows)
{
bd.MainAccount =
(localDS.PBankingDetailsUsage.Rows.Find(
new object[] { FPartnerKey, bd.BankingDetailsKey, MPartnerConstants.BANKINGUSAGETYPE_MAIN }) != null);
}
localDS.RemoveEmptyTables();
return localDS;
}
示例4: GetDataAddresses
/// <summary>
/// todoComment
/// </summary>
/// <returns></returns>
public PartnerEditTDS GetDataAddresses()
{
PartnerEditTDS ReturnValue;
TDBTransaction ReadTransaction;
Boolean NewTransaction;
TLogging.LogAtLevel(9, "TPartnerEditUIConnector.GetDataAddresses called!");
ReturnValue = new PartnerEditTDS(DATASETNAME);
ReadTransaction = DBAccess.GDBAccessObj.GetNewOrExistingTransaction(IsolationLevel.ReadCommitted,
TEnforceIsolationLevel.eilMinimum,
out NewTransaction);
// Load data
TPPartnerAddressAggregate.LoadAll(ReturnValue, FPartnerKey, ReadTransaction);
if (NewTransaction)
{
DBAccess.GDBAccessObj.CommitTransaction();
TLogging.LogAtLevel(7, "TPartnerEditUIConnector.GetDataAddresses: committed own transaction.");
}
// Remove any unused tables from the Typed DataSet
ReturnValue.RemoveEmptyTables();
return ReturnValue;
}
示例5: GetDataAddresses
/// <summary>
/// todoComment
/// </summary>
/// <returns></returns>
public PartnerEditTDS GetDataAddresses()
{
PartnerEditTDS ReturnValue;
TDBTransaction ReadTransaction = null;
TLogging.LogAtLevel(9, "TPartnerEditUIConnector.GetDataAddresses called!");
ReturnValue = new PartnerEditTDS(DATASETNAME);
DBAccess.GDBAccessObj.GetNewOrExistingAutoReadTransaction(IsolationLevel.ReadCommitted,
TEnforceIsolationLevel.eilMinimum, ref ReadTransaction,
delegate
{
// Load data
TPPartnerAddressAggregate.LoadAll(ReturnValue, FPartnerKey, ReadTransaction);
});
// Remove any unused tables from the Typed DataSet
ReturnValue.RemoveEmptyTables();
return ReturnValue;
}