本文整理汇总了C#中Bussiness.PlayerBussiness.GetAuctionPage方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerBussiness.GetAuctionPage方法的具体用法?C# PlayerBussiness.GetAuctionPage怎么用?C# PlayerBussiness.GetAuctionPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bussiness.PlayerBussiness
的用法示例。
在下文中一共展示了PlayerBussiness.GetAuctionPage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessRequest
public void ProcessRequest(HttpContext context)
{
bool value = false;
string message = "Fail!";
int total = 0;
XElement result = new XElement("Result");
try
{
int page = int.Parse(context.Request["page"]);
string name = csFunction.ConvertSql(HttpUtility.UrlDecode(context.Request["name"]));
int type = int.Parse(context.Request["type"]);
int pay = int.Parse(context.Request["pay"]);
int userID = int.Parse(context.Request["userID"]);
int buyID = int.Parse(context.Request["buyID"]);
int order = int.Parse(context.Request["order"]);
bool sort = bool.Parse(context.Request["sort"]);
string AuctionIDs = csFunction.ConvertSql(HttpUtility.UrlDecode(context.Request["Auctions"]));
AuctionIDs = string.IsNullOrEmpty(AuctionIDs) ? "0" : AuctionIDs;
int size = 50;//int.Parse(context.Request["size"]);
using (PlayerBussiness db = new PlayerBussiness())
{
AuctionInfo[] infos = db.GetAuctionPage(page, name, type, pay, ref total, userID, buyID, order, sort, size, AuctionIDs);
foreach (AuctionInfo info in infos)
{
XElement temp = FlashUtils.CreateAuctionInfo(info);
using (PlayerBussiness pb = new PlayerBussiness())
{
ItemInfo item = pb.GetUserItemSingle(info.ItemID);
if (item != null)
{
temp.Add(Road.Flash.FlashUtils.CreateGoodsInfo(item));
}
result.Add(temp);
}
}
value = true;
message = "Success!";
}
}
catch (Exception ex)
{
log.Error("AuctionPageList", ex);
}
result.Add(new XAttribute("total", total));
result.Add(new XAttribute("vaule", value));
result.Add(new XAttribute("message", message));
context.Response.ContentType = "text/plain";
context.Response.Write(result.ToString(false));
//context.Response.BinaryWrite(StaticFunction.Compress(result.ToString()));
}