webapi同时支持get和post 怎么接受多个参数
1个回答
2017-07-27
展开全部
[csharp] view plain copy
[AcceptVerbs("Get", "Post")] //用AcceptVerbs标识即可
public List<PUB_HqewIndexResult> GetSalesRankByHqewIndex()
{
List<PUB_HqewIndexResult> resultList = new List<PUB_HqewIndexResult>();
DMSParam dmsParam = new DMSParam();
List<PUB_Stock> stockList = new List<PUB_Stock>();
IResult stockResult = ExecuteDmsParam(dmsParam, new PUB_HqewIndex(), "PUB.PUB_HqewIndexBLL", "GetSalesRankByHqewIndex");
if (stockResult.Complete == DMSComplete.Succeed)
{
if (stockResult != null && stockResult.Result != null)
{
resultList = (List<PUB_HqewIndexResult>)stockResult.Result;
}
}
return resultList;
}
[AcceptVerbs("Get", "Post")] //用AcceptVerbs标识即可
public List<PUB_HqewIndexResult> GetSalesRankByHqewIndex()
{
List<PUB_HqewIndexResult> resultList = new List<PUB_HqewIndexResult>();
DMSParam dmsParam = new DMSParam();
List<PUB_Stock> stockList = new List<PUB_Stock>();
IResult stockResult = ExecuteDmsParam(dmsParam, new PUB_HqewIndex(), "PUB.PUB_HqewIndexBLL", "GetSalesRankByHqewIndex");
if (stockResult.Complete == DMSComplete.Succeed)
{
if (stockResult != null && stockResult.Result != null)
{
resultList = (List<PUB_HqewIndexResult>)stockResult.Result;
}
}
return resultList;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询