当前位置: 首页>>代码示例>>C#>>正文


C# IDalSession.GetTypedListByHQL方法代码示例

本文整理汇总了C#中IDalSession.GetTypedListByHQL方法的典型用法代码示例。如果您正苦于以下问题:C# IDalSession.GetTypedListByHQL方法的具体用法?C# IDalSession.GetTypedListByHQL怎么用?C# IDalSession.GetTypedListByHQL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDalSession的用法示例。


在下文中一共展示了IDalSession.GetTypedListByHQL方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetRecordsforDividWepFile

        public static IList<IDividWepRecord> GetRecordsforDividWepFile(IDalSession session, int fileID)
        {
            Hashtable parameters = new Hashtable(1);
            parameters.Add("fileID", fileID);

            string hql = string.Format(
                @"from DividWepRecord D
                where D.ParentFile.Key = :fileID");
            return session.GetTypedListByHQL<IDividWepRecord>(hql, parameters);
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:10,代码来源:DividWepRecordMapper.cs

示例2: GetDefaultInstrumentsCategory

 public static IInstrumentsCategories GetDefaultInstrumentsCategory(IDalSession session)
 {
     IInstrumentsCategories category = null;
     string hql = "from InstrumentsCategories I where I.IsDefault = 1";
     IList<IInstrumentsCategories> list = session.GetTypedListByHQL<IInstrumentsCategories>(hql);
     if (list != null && list.Count == 1)
     {
         category = list[0];
     }
     return category;
 }
开发者ID:kiquenet,项目名称:B4F,代码行数:11,代码来源:ClassificationMapper.cs

示例3: GetReport

        public static IReport GetReport(IDalSession session, int accountId, int reportLetterYear, ReportLetterTypes reportLetterType)
        {
            Hashtable parameters = new Hashtable();
            parameters.Add("AccountId", accountId);
            parameters.Add("ReportLetterYear", reportLetterYear);
            parameters.Add("ReportLetterType", (int)reportLetterType);

            string hql = @"FROM  Report R
                           WHERE R.Account.Key = :AccountId
                             AND R.ReportLetter.ReportLetterYear = :ReportLetterYear
                             AND R.ReportLetter.ReportLetterTypeId = :ReportLetterType
                           ORDER BY R.ReportLetter.CreationDate DESC";

            List<IReport> reports = session.GetTypedListByHQL<IReport>(hql, parameters);
            if (reports.Count == 0)
                return null;
            else if (reports.Count == 1)
                return reports[0];
            else
                throw new ApplicationException(string.Format("More than one Report object found for account {0}, year {1}, and letter type '{2}'",
                                                             accountId, reportLetterYear, reportLetterType));
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:22,代码来源:ReportMapper.cs

示例4: GetAccountIdsWithFreshDocuments

        public static int[] GetAccountIdsWithFreshDocuments(IDalSession session, DocumentSubtypes documentSubtype, 
                                                            int managementCompanyId, int accountId)
        {
            Hashtable parameters = new Hashtable();

            string hql = string.Format(@"SELECT CA.Key FROM CustomerAccount CA
                                          WHERE CA.Key IN (SELECT DISTINCT A.Key {0})", hqlDocumentsWithJoins(documentSubtype, false));

            if (managementCompanyId != 0)
            {
                parameters.Add("ManagementCompanyId", managementCompanyId);
                hql += " AND CA.AccountOwner.Key = :ManagementCompanyId";
            }

            if (accountId != 0)
            {
                parameters.Add("AccountId", accountId);
                hql += " AND CA.Key = :AccountId";
            }

            hql += " ORDER BY CA.Number";

            return session.GetTypedListByHQL<int>(hql, parameters).ToArray();
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:24,代码来源:DocumentMapper.cs

示例5: GetYearEndValues

        public static IList<IEndTermValue> GetYearEndValues(IDalSession session, DateTime endTermDate)
        {
            Hashtable parameters = new Hashtable(1);
            parameters.Add("endTermDate", endTermDate);

            string hql = string.Format(
                @"From EndTermValue E
                  where E.Key in (
                    Select A.Key
                    from EndTermValue A
                    left join A.ReportingPeriod R
                    where R.EndTermDate = :endTermDate)");
            return session.GetTypedListByHQL <IEndTermValue>(hql, parameters);
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:14,代码来源:EndTermValueMapper.cs

示例6: GetContacts

        public static List<IContact> GetContacts(IDalSession session, int[] contactIds)
        {
            Hashtable parameters = new Hashtable();
            Hashtable parameterLists = new Hashtable();

            string where = "1 = 2";
            if (contactIds.Length > 0)
            {
                parameterLists.Add("keys", contactIds);
                where = "C.Key in (:keys)";
            }

            string hql = string.Format("from Contact C where {0} order by C.CurrentNAW.Name", where);
            return session.GetTypedListByHQL<IContact>(hql, parameters, parameterLists);
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:15,代码来源:ContactMapper.cs

示例7: GetValuations

        public static List<IValuation> GetValuations(IDalSession session, int accountID, int instrumentID, DateTime[] dates, 
                                                     bool includeClosedPositions, bool includeChildInstruments)
        {
            Hashtable parameters = new Hashtable();
            Hashtable parameterLists = new Hashtable();
            parameters.Add("AccountID", accountID);
            parameters.Add("InstrumentID", instrumentID);
            parameterLists.Add("Dates", dates);

            string hql = string.Format(@"from Valuation V
                                         left join fetch {0} I
                                         {1}
                                         where V.Account.Key = :AccountID
                                           and I.Key = :InstrumentID
                                           and V.Date in (:Dates)
                                           {2}
                                         order by I.Key, V.Date",
                                       (includeChildInstruments ? "V.Instrument.topParentInstrument" : "V.Instrument"),
                                       (includeClosedPositions ? "" : "left join fetch V.ValuationMutation VM"),
                                       (includeClosedPositions ? "" : "and VM.Size.Quantity != 0"));

            return session.GetTypedListByHQL<IValuation>(hql, parameters, parameterLists);
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:23,代码来源:ValuationMapper.cs

示例8: GetFreshDocuments

        public static List<IDocument> GetFreshDocuments(IDalSession session, DocumentSubtypes documentSubtype, int accountId)
        {
            Hashtable parameters = new Hashtable();
            parameters.Add("AccountId", accountId);

            string hql = string.Format(@"FROM Document DD
                                         WHERE DD.Key IN (SELECT DISTINCT D.Key {0} AND A.Key = :AccountId)
                                         ORDER BY DD.CreationDate",
                                       hqlDocumentsWithJoins(documentSubtype, false));

            return session.GetTypedListByHQL<IDocument>(hql, parameters);
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:12,代码来源:DocumentMapper.cs

示例9: GetFinancialReportDocuments

        public static List<IFinancialReportDocument> GetFinancialReportDocuments(IDalSession session, int accountId)
        {
            Hashtable parameters = new Hashtable();
            parameters.Add("AccountId", accountId);
            parameters.Add("ReportStatus", (int)ReportStatuses.PrintSuccess);

            string hql = @"FROM FinancialReportDocument D
                           WHERE D.Report.Account = :AccountId
                             AND D.Report.ReportStatusId = :ReportStatus";

            return session.GetTypedListByHQL<IFinancialReportDocument>(hql, parameters);
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:12,代码来源:DocumentMapper.cs

示例10: GetNotaDocuments

        public static List<INotaDocument> GetNotaDocuments(IDalSession session, int accountId)
        {
            Hashtable parameters = new Hashtable();
            parameters.Add("AccountId", accountId);

            string hql = @"FROM NotaDocument DD WHERE
                           DD.Key IN (SELECT D.Key FROM NotaDocument D
                                      JOIN D.bagOfNotas N
                                      WHERE N.NotaAccount.Account.Key = :AccountId)";

            return session.GetTypedListByHQL<INotaDocument>(hql, parameters);
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:12,代码来源:DocumentMapper.cs

示例11: getTRansactions

        private static IList<int> getTRansactions(IDalSession session)
        {
            string hqlstring = @"Select T.Key from Transaction T where T.Description = ''";

            return session.GetTypedListByHQL<int>(hqlstring);
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:6,代码来源:CashTransactionPageAdapter.cs

示例12: GetReports

        public static List<IReport> GetReports(IDalSession session, int reportLetterYear, ReportLetterTypes reportLetterType, 
                                               int? managementCompanyId, int[] accountIds, ReportStatuses? reportStatus)
        {
            Hashtable parameters = new Hashtable();
            Hashtable parameterLists = new Hashtable();

            string hql = @"FROM  Report R
                           WHERE R.ReportLetter.ReportLetterYear = :ReportLetterYear
                             AND R.ReportLetter.ReportLetterTypeId = :ReportLetterType";

            parameters.Add("ReportLetterYear", reportLetterYear);
            parameters.Add("ReportLetterType", (int)reportLetterType);

            if (managementCompanyId != null)
            {
                parameters.Add("CompanyId", managementCompanyId);
                hql += @" AND R.Account.Key IN (SELECT AI.Key FROM AccountTypeInternal AI
                                                 WHERE AI.AccountOwner.Key = :CompanyId)";
            }

            if (accountIds != null)
            {
                if (accountIds.Length == 0)
                    accountIds = new int[] { 0 };
                parameterLists.Add("AccountIds", accountIds);
                hql += " AND R.Account.Key IN (:AccountIds)";
            }

            if (reportStatus != null)
            {
                parameters.Add("ReportStatus", (int)reportStatus);
                hql += " AND R.ReportStatusId = :ReportStatus";
            }

            hql += " ORDER BY R.Account.Number";

            return session.GetTypedListByHQL<IReport>(hql, parameters, parameterLists);
        }
开发者ID:kiquenet,项目名称:B4F,代码行数:38,代码来源:ReportMapper.cs


注:本文中的IDalSession.GetTypedListByHQL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。