我创建了c#的功能来比较我项目中的价格.
public static decimal? SpecialPrice(decimal w, decimal p)
{
if (w < p)
{
return p;
}
else if (w > p && p > 0)
{
//return (w , p);
}
else
{
return w;
}
}
Run Code Online (Sandbox Code Playgroud)
我想在w> p和p> 0时返回两个变量(w和p),但我不知道怎么能像那样返回.有人知道吗?
我有存储过程,我将执行其结果并将其传递到数据集并返回它,但同时我的存储过程中有一个输出参数,我也想返回,如何返回数据集和整数使用我的函数输出值,还是有更合适的方法来处理这种情况?请好好的建议,谢谢.
Public Function SelectCampaignManagementTableListing(ByVal objCampaignManagmentClassBLL As CampaignManagementBLL, ByVal dbConnection As DbConnection, ByVal SortExpression As String, ByVal SortFilterText As String, ByVal SortFilterField As String, ByVal SortDirection As String, ByVal PageNumber As Integer, ByVal PageCount As Integer, ByVal TotalCount As Integer) As DataSet
Dim dbCommand As DbCommand = Nothing
Dim retDS As DataSet = Nothing
Try
If dbConnection.State <> ConnectionState.Open Then
dbConnection.Open()
End If
dbCommand = GetStoredProcedureCommand("Campaign_LoadListing")
dbCommand.Connection = dbConnection
With objCampaignManagmentClassBLL
Select Case SortFilterField
Case "Code"
AddInParameter(dbCommand, "@Code", DbType.String, 50, DBNull.Value) …Run Code Online (Sandbox Code Playgroud)