本文整理汇总了C#中IDalSession.GetTypedList方法的典型用法代码示例。如果您正苦于以下问题:C# IDalSession.GetTypedList方法的具体用法?C# IDalSession.GetTypedList怎么用?C# IDalSession.GetTypedList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDalSession
的用法示例。
在下文中一共展示了IDalSession.GetTypedList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetPositions
public static List<IFundPosition> GetPositions(IDalSession session, int accountId, PositionsView view)
{
List<ICriterion> expressions = new List<ICriterion>();
expressions.Add(Expression.Eq("Account.Key", accountId));
addPositionsViewCriterion(expressions, view);
return session.GetTypedList<FundPosition, IFundPosition>(expressions);
}
示例2: GetGLLookupRecords
public static IGLLookupRecords GetGLLookupRecords(IDalSession session, BookingComponentParentTypes bookingComponentParentType)
{
List<ICriterion> expressions = new List<ICriterion>();
expressions.Add(Expression.Eq("BookingComponentParentType", bookingComponentParentType));
IList<IGLLookupRecord> gLLookupRecords = session.GetTypedList<IGLLookupRecord>();
return new GLLookupRecords(gLLookupRecords);
}
示例3: GetClientBalanceGLAccounts
public static IList<IGLAccount> GetClientBalanceGLAccounts(IDalSession session)
{
List<ICriterion> expressions = new List<ICriterion>();
expressions.Add(Expression.Eq("IsClientOpenBalance", true));
IList<IGLAccount> list = session.GetTypedList<GLAccount, IGLAccount>(expressions);
return list;
}
示例4: GetPositions
public static List<ICashPosition> GetPositions(IDalSession session, IAccountTypeInternal account, PositionsView view)
{
List<ICriterion> expressions = new List<ICriterion>();
expressions.Add(Expression.Eq("Account.Key", account.Key));
addPositionsViewCriterion(expressions, view);
return session.GetTypedList<CashPosition, ICashPosition>(expressions);
}
示例5: GetAccountFamilies
public static IList<IAccountFamily> GetAccountFamilies(IDalSession session, IAssetManager assetManager)
{
List<ICriterion> expressions = new List<ICriterion>();
if (!assetManager.IsStichting)
expressions.Add(Expression.Eq("AssetManager.Key", assetManager.Key));
return session.GetTypedList<AccountFamily,IAccountFamily>(expressions);
}
示例6: GetJournals
public static IList<IJournal> GetJournals(IDalSession session, JournalTypes journalType)
{
List<ICriterion> expressions = new List<ICriterion>();
List<Order> orderings = new List<Order>();
expressions.Add(Expression.Eq("JournalType", journalType));
orderings.Add(Order.Asc("JournalNumber"));
return session.GetTypedList<Journal, IJournal>(expressions, orderings);
}
示例7: GetCommissionRules
/// <summary>
/// Retrieves a list of all <b>CommRule</b> objects in the system.
/// </summary>
/// <param name="session">An instance of the Data Access Library (see class <see cref="B4F.TotalGiro.DAL.NHSession">NHSession</see>).</param>
/// <param name="company">The company that owns these rules.</param>
/// <returns>A list of all <b>CommRule</b> objects in the system.</returns>
public static IList<ICommRule> GetCommissionRules(IDalSession session)
{
List<ICriterion> expressions = new List<ICriterion>();
IManagementCompany company = LoginMapper.GetCurrentManagmentCompany(session);
if (!company.IsStichting)
expressions.Add(Expression.Eq("AssetManager.Key", company.Key));
return session.GetTypedList<CommRule, ICommRule>(expressions);
}
示例8: GetEmployees
public static List<IInternalEmployeeLogin> GetEmployees(IDalSession session, ActivityReturnFilter activityFilter)
{
List<ICriterion> expressions = new List<ICriterion>();
if (activityFilter != ActivityReturnFilter.All)
expressions.Add(Expression.Eq("IsActive", activityFilter == ActivityReturnFilter.Active));
return session.GetTypedList<InternalEmployeeLogin, IInternalEmployeeLogin>(expressions);
}
示例9: GetPosition
public static ICashPosition GetPosition(IDalSession session, int accountId, int currencyId)
{
return session.GetTypedList<CashPosition, ICashPosition>(new List<ICriterion>()
{
Expression.Eq("Account.Key", accountId),
Expression.Eq("PositionCurrency.Key", currencyId)
})
.FirstOrDefault();
}
示例10: GetModel
/// <summary>
/// Get model by ID
/// </summary>
/// <param name="session">Data access object</param>
/// <param name="id">Identifier</param>
/// <returns>Model object</returns>
public static IPortfolioModel GetModel(IDalSession session, int id)
{
IPortfolioModel model = null;
List<ICriterion> expressions = new List<ICriterion>();
expressions.Add(Expression.Eq("Key", id));
List<IPortfolioModel> list = session.GetTypedList<PortfolioModel, IPortfolioModel>(expressions);
if (list != null && list.Count > 0)
model = list[0];
return model;
}
示例11: GetWithdrawalRuleRegularity
public static WithdrawalRuleRegularity GetWithdrawalRuleRegularity(IDalSession session, Regularities id)
{
List<ICriterion> expressions = new List<ICriterion>();
expressions.Add(Expression.Eq("key", (int)id));
IList<WithdrawalRuleRegularity> rules = session.GetTypedList<WithdrawalRuleRegularity>(expressions);
if (rules != null && rules.Count == 1)
return rules[0];
else
return null;
}
示例12: GetDocument
public static IDocument GetDocument(IDalSession session, int documentId)
{
List<ICriterion> expressions = new List<ICriterion>();
expressions.Add(Expression.Eq("Key", documentId));
List<IDocument> documents = session.GetTypedList<Document, IDocument>(expressions);
if (documents != null && documents.Count > 0)
return documents[0];
else
return null;
}
示例13: GetModelBase
public static IModelBase GetModelBase(IDalSession session, int id)
{
IModelBase model = null;
List<ICriterion> expressions = new List<ICriterion>();
expressions.Add(Expression.Eq("Key", id));
List<IModelBase> list = session.GetTypedList<ModelBase, IModelBase>(expressions);
if (list != null && list.Count > 0)
model = list[0];
return model;
}
示例14: GetCounterAccount
public static ICounterAccount GetCounterAccount(IDalSession session, string tegenRekening)
{
List<ICriterion> expressions = new List<ICriterion>();
expressions.Add(Expression.Eq("Number", tegenRekening));
IList<ICounterAccount> list = session.GetTypedList<ICounterAccount>(expressions);
if (list != null && list.Count == 1)
return list[0];
else
return null;
}
示例15: GetLifecycle
/// <summary>
/// Get lifecycle by ID
/// </summary>
/// <param name="session">Data access object</param>
/// <param name="id">Identifier</param>
/// <returns>Lifecycle object</returns>
public static ILifecycle GetLifecycle(IDalSession session, int id)
{
ILifecycle lifecycle = null;
List<ICriterion> expressions = new List<ICriterion>();
expressions.Add(Expression.Eq("Key", id));
List<ILifecycle> list = session.GetTypedList<Lifecycle, ILifecycle>(expressions);
if (list != null && list.Count > 0)
lifecycle = list[0];
return lifecycle;
}