本文整理汇总了C#中IO.RetrieveEntitiesFromCommand方法的典型用法代码示例。如果您正苦于以下问题:C# IO.RetrieveEntitiesFromCommand方法的具体用法?C# IO.RetrieveEntitiesFromCommand怎么用?C# IO.RetrieveEntitiesFromCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IO
的用法示例。
在下文中一共展示了IO.RetrieveEntitiesFromCommand方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExecuteDigitalLibrarySearch
public static List<DigitalLibrarySearchItem> ExecuteDigitalLibrarySearch(List<System.Data.SqlClient.SqlParameter> spParams)
{
using (IO io = new IO(WebCommon.ConnectionString))
{
return io.RetrieveEntitiesFromCommand<DigitalLibrarySearchItem>(IO.CreateCommandFromStoredProc("DigitalLibrary_GetDashboard_Tagged", spParams));
}
}
示例2: LoadSpotMatrix
/// <summary>TBD</summary>
/// <param name="stationId">TBD</param>
/// <param name="startMonth">TBD</param>
/// <param name="startYear">TBD</param>
/// <param name="numberOfMonths">TBD</param>
/// <returns>TBD</returns>
public static List<Spot> LoadSpotMatrix(int stationId, int startMonth, int startYear, int numberOfMonths)
{
using (IO io = new IO(WebCommon.DigitalAvailsConnectionString))
{
return io.RetrieveEntitiesFromCommand<Spot>(IO.CreateCommandFromStoredProc("DIGITALAVAILS_GETSPOTMATRIX",
Param.CreateParam("STATIONID", SqlDbType.Int, stationId),
Param.CreateParam("STARTMONTH", SqlDbType.Int, startMonth),
Param.CreateParam("STARTYEAR", SqlDbType.Int, startYear),
Param.CreateParam("NUMBEROFMONTHS", SqlDbType.Int, numberOfMonths)));
}
}
示例3: GetReportData
/// <summary>TBD</summary>
public void GetReportData()
{
List<System.Data.SqlClient.SqlParameter> spParams = new List<SqlParameter>();
spParams.Add(Param.CreateParam("market", SqlDbType.VarChar, this.ReportMarket));
spParams.Add(Param.CreateParam("year", SqlDbType.Int, this.ReportYear));
spParams.Add(Param.CreateParam("includeGuaranteedBonus", SqlDbType.Bit, this.IncludeGuaranteedBonus));
spParams.Add(Param.CreateParam("includeSpaceAvailBonus", SqlDbType.Bit, this.IncludeSpaceAvailBonus));
using (IO io = new IO(WebCommon.DigitalAvailsConnectionString))
{
this.ReportItems = io.RetrieveEntitiesFromCommand<MarketUtilizationReportItem>(IO.CreateCommandFromStoredProc("DigitalAvails_Reporting_MarketUtilization", spParams));
}
}
示例4: GetSelectList
private List<SelectListItem> GetSelectList(string term, int count, string storedProcName, List<System.Data.SqlClient.SqlParameter> parameters)
{
parameters.Add(Param.CreateParam("term", SqlDbType.VarChar, term));
parameters.Add(Param.CreateParam("count", SqlDbType.Int, count));
List<SelectListItem> selectList = new List<SelectListItem>();
using (IO io = new IO(WebCommon.ConnectionString))
{
selectList = io.RetrieveEntitiesFromCommand<SelectListItem>(IO.CreateCommandFromStoredProc(storedProcName, parameters));
}
if (selectList.Count == 0)
{
selectList.Add(new SelectListItem { Text = "No results found", Value = "" });
}
return selectList;
}