本文整理汇总了C#中Zippy.ExecuteScalar方法的典型用法代码示例。如果您正苦于以下问题:C# Zippy.ExecuteScalar方法的具体用法?C# Zippy.ExecuteScalar怎么用?C# Zippy.ExecuteScalar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zippy
的用法示例。
在下文中一共展示了Zippy.ExecuteScalar方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Query
//.........这里部分代码省略.........
}
}
}
#endregion
string orderBy = "[CreateDate] desc";
if (orderCol == 0)
{
orderBy = "[CreateDate] desc";
}
else if (orderCol == 1)
{
orderBy = "[FlowID]";
}
else if (orderCol == 2)
{
orderBy = "[FlowID] desc";
}
else if (orderCol == 3)
{
orderBy = "[BankID]";
}
else if (orderCol == 4)
{
orderBy = "[BankID] desc";
}
else if (orderCol == 5)
{
orderBy = "[CategoryID]";
}
else if (orderCol == 6)
{
orderBy = "[CategoryID] desc";
}
else if (orderCol == 7)
{
orderBy = "[OrderID]";
}
else if (orderCol == 8)
{
orderBy = "[OrderID] desc";
}
else if (orderCol == 9)
{
orderBy = "[FlowType]";
}
else if (orderCol == 10)
{
orderBy = "[FlowType] desc";
}
else if (orderCol == 11)
{
orderBy = "[FlowStatus]";
}
else if (orderCol == 12)
{
orderBy = "[FlowStatus] desc";
}
else if (orderCol == 13)
{
orderBy = "[CreateDate]";
}
else if (orderCol == 14)
{
orderBy = "[CreateDate] desc";
}
int RecordCount = db.Count<EAP.Logic.Z01.View.V_FinancialFlow>(where, dbParams.ToArray());
int PageCount =0;
if (RecordCount % PageSize == 0)
{
PageCount = RecordCount / PageSize;
}
else
{
PageCount = RecordCount / PageSize + 1;
}
if (PageIndex > PageCount)
PageIndex = PageCount;
if (PageIndex < 1)
PageIndex = 1;
List<EAP.Logic.Z01.View.V_FinancialFlow> records = db.Take<EAP.Logic.Z01.View.V_FinancialFlow>(where + " order by " + orderBy, PageSize, PageIndex, dbParams.ToArray());
rtn.AddRange(records);
rtn.PageIndex = PageIndex;
rtn.PageSize = PageSize;
rtn.TotalCount = RecordCount;
if (qCurrency.IsNotNullOrEmpty())
{
string sqlSum = "select sum(Amount) as sAmount from V_FinancialFlow where " + where;
object oSum = db.ExecuteScalar(sqlSum, dbParams.ToArray());
sumAll = oSum.ToDecimal();
}
else
{
sumAll = 0;
}
return rtn;
}