本文整理汇总了C#中IDalSession.GetObjectInstance方法的典型用法代码示例。如果您正苦于以下问题:C# IDalSession.GetObjectInstance方法的具体用法?C# IDalSession.GetObjectInstance怎么用?C# IDalSession.GetObjectInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDalSession
的用法示例。
在下文中一共展示了IDalSession.GetObjectInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateKickBackOnUnit
/// <summary>
/// Calculate kickback on a unit
/// </summary>
/// <param name="session">The dal session.</param>
/// <param name="unit">The unit for which the fee is calculated.</param>
/// <param name="feeTypeKickBack">FeeType of type KickBack.</param>
/// <param name="message">returns stuff when fu</param>
/// <returns></returns>
public static bool CalculateKickBackOnUnit(IDalSession session, IManagementPeriodUnit unit, FeeType feeTypeKickBack, out string message)
{
bool success = false;
message = "";
if (unit.Account != null && unit.Account.AccountType == AccountTypes.Customer)
{
ICustomerAccount account = (ICustomerAccount)unit.Account;
if (account.UseKickback)
{
IRemisierHistory remisierHistory = account.CurrentRemisierDetails;
if (remisierHistory != null && remisierHistory.KickBack > 0)
{
if (feeTypeKickBack == null)
feeTypeKickBack = (FeeType)session.GetObjectInstance(typeof(FeeType), (int)FeeTypes.KickbackFee);
if (unit.AverageHoldings != null && unit.AverageHoldings.Count > 0)
{
Money totalKickBackFee = null;
foreach (IAverageHolding holding in unit.AverageHoldings)
{
Money avgAmount = holding.AverageValue;
if (avgAmount != null && avgAmount.IsNotZero)
{
Money kickbackFee = avgAmount * ((remisierHistory.KickBack / 100M) * (unit.Days / 365M) * feeTypeKickBack.FeeTypeSign);
if (kickbackFee != null && kickbackFee.IsNotZero)
{
totalKickBackFee += kickbackFee;
holding.FeeItems.AddFeeItem(feeTypeKickBack, kickbackFee, unit, null, remisierHistory.KickBack);
unit.FeesCalculated = FeesCalculatedStates.Yes;
unit.Message = "";
}
}
}
if (unit.FeesCalculated != FeesCalculatedStates.Yes && (totalKickBackFee == null || totalKickBackFee.IsZero))
{
unit.FeesCalculated = FeesCalculatedStates.Irrelevant;
unit.Message = "Calculated kickback amount is either zero or too small";
}
success = true;
}
}
else
message = "No kickback percentage found";
}
else
{
unit.FeesCalculated = FeesCalculatedStates.Irrelevant;
success = true;
}
}
return success;
}
示例2: GetExportFile
/// <summary>
/// Gets an FS export file by id.
/// </summary>
/// <param name="DataSession">Data session object</param>
/// <param name="FSExportFileid">File Id (Key)</param>
/// <returns></returns>
public static FSExportFile GetExportFile(IDalSession DataSession, Int32 FSExportFileid)
{
return (FSExportFile)DataSession.GetObjectInstance(typeof(FSExportFile), FSExportFileid);
}
示例3: GetModelBenchmarkPerformance
public static IModelPerformance GetModelBenchmarkPerformance(IDalSession session, int modelperformanceID)
{
return (IModelPerformance)session.GetObjectInstance(typeof(ModelPerformance), modelperformanceID);
}
示例4: GetCommissionRule
/// <summary>
/// Retrieves a <b>CommRule</b> object by ID.
/// </summary>
/// <param name="session">An instance of the Data Access Library (see class <see cref="B4F.TotalGiro.DAL.NHSession">NHSession</see>).</param>
/// <param name="ID">The ID of the <b>CommRule</b> object to be retrieved.</param>
/// <returns>The <b>CommRule</b> object with the given ID, retrieved from the database.</returns>
public static ICommRule GetCommissionRule(IDalSession session, int ID)
{
return (ICommRule)session.GetObjectInstance(typeof(CommRule), ID);
}
示例5: GetSecCategory
/// <summary>
/// Get Category by ID
/// </summary>
/// <param name="session">Data access object</param>
/// <param name="SecCategoryID">Identifier</param>
/// <returns>Category</returns>
public static SecCategory GetSecCategory(IDalSession session, SecCategories SecCategoryID)
{
return (SecCategory)session.GetObjectInstance(typeof(SecCategory), (int)SecCategoryID);
}
示例6: GetReportLetter
public static IReportLetter GetReportLetter(IDalSession session, int id)
{
return (IReportLetter)session.GetObjectInstance(typeof(ReportLetter), id);
}
示例7: GetFeeRule
/// <summary>
/// Retrieve a <b>FeeRule</b> object.
/// </summary>
/// <param name="session">An instance of the Data Access Library (see class <see cref="B4F.TotalGiro.DAL.NHSession">NHSession</see>).</param>
/// <param name="feeRuleID">The unique id.</param>
/// <returns>A <b>FeeRule</b> object.</returns>
public static IFeeRule GetFeeRule(IDalSession session, int feeRuleID)
{
return (IFeeRule)session.GetObjectInstance(typeof(FeeRule), feeRuleID);
}
示例8: GetIdentificationType
/// <summary>
/// Get Identification object by ID
/// </summary>
/// <param name="session">Data Access object</param>
/// <param name="IdentificationTypeID">Unique identifier</param>
/// <returns>Identification object</returns>
public static IdentificationType GetIdentificationType(IDalSession session, int IdentificationTypeID)
{
return (IdentificationType)session.GetObjectInstance(typeof(IdentificationType), IdentificationTypeID);
}
示例9: GetPandHouder
public static IPandHouder GetPandHouder(IDalSession session, int PandhouderID)
{
return (IPandHouder)session.GetObjectInstance(typeof(PandHouder), PandhouderID);
}
示例10: GetHistoricalExRate
public static IHistoricalExRate GetHistoricalExRate(IDalSession session, int historicalExRateID)
{
return (IHistoricalExRate)session.GetObjectInstance(typeof(HistoricalExRate), historicalExRateID);
}
示例11: GetIssueDetails
/// <summary>
/// Gets the details of a TBM issue by issueid.
/// </summary>
/// <param name="DataSession">Data session object</param>
/// <param name="IssueId">Issue Id (TBM Key value for an instrument)</param>
/// <returns></returns>
public static TBMIssueDetails GetIssueDetails(IDalSession DataSession, Int32 IssueId)
{
return (TBMIssueDetails)DataSession.GetObjectInstance(typeof(TBMIssueDetails), IssueId);
}
示例12: GetFeeCalculation
/// <summary>
/// Retrieves a <b>FeeCalc</b> object by ID.
/// </summary>
/// <param name="session">An instance of the Data Access Library (see class <see cref="B4F.TotalGiro.DAL.NHSession">NHSession</see>).</param>
/// <param name="ID">The ID of the <b>FeeCalc</b> object to be retrieved.</param>
/// <returns>The <b>FeeCalc</b> object with the given ID, retrieved from the database.</returns>
public static IFeeCalc GetFeeCalculation(IDalSession session, int ID)
{
return (IFeeCalc)session.GetObjectInstance(typeof(FeeCalc), ID);
}
示例13: GetPredefinedBeneficiary
public static PredefinedBeneficiary GetPredefinedBeneficiary(IDalSession session, int PredefinedBeneficiaryID)
{
return (PredefinedBeneficiary)session.GetObjectInstance(typeof(PredefinedBeneficiary), PredefinedBeneficiaryID);
}
示例14: GetInstrumentExchange
/// <summary>
/// Get InstrumentExchange by ID
/// </summary>
/// <param name="session">Data access object</param>
/// <param name="InstrumentExchangeID">Identifier</param>
/// <returns>InstrumentExchange</returns>
public static InstrumentExchange GetInstrumentExchange(IDalSession session, int InstrumentExchangeID)
{
return (InstrumentExchange)session.GetObjectInstance(typeof(InstrumentExchange), InstrumentExchangeID);
}
示例15: GetNavCalculation
public static INavCalculation GetNavCalculation(IDalSession session, int navCalculationID)
{
return (INavCalculation)session.GetObjectInstance(typeof(NavCalculation), navCalculationID);
}