public ActionResult GetAnnouncedAuctions(int page = 1, int status=100, string request="") { List<Auction> auctions = new List<Auction>(); TViewSummary view = new TViewSummary(); view.CurrentPage = page; if (!request.Equals("")) { view.SearchStr = request; } TAuctionsListRec[] list = new TAuctionsListRec[0]; TAuthHeader header = new TAuthHeader(); header.SessionID = (String)Session["sessionID"]; header.SessionKey = (String)Session["sessionKey"]; client.TAuthHeaderValue = header; client.GetAuctionsList(status, false, ref view, ref list); for (int i = 0; i < list.Length; i++) { auctions.Add(new Auction( list[i].AuctionRegNumber, DateTimeUtils.DoubleToDateTime(list[i].PublishDate).ToString("dd.MM.yyyy"), list[i].SubjectName, list[i].Customer, list[i].FinanceType, DateTimeUtils.DoubleToDateTime(list[i].EndOfferDate).ToString("dd.MM.yyyy"), DateTimeUtils.DoubleToDateTime(list[i].TenderDate).ToString("dd.MM.yyyy HH:mm:ss"), list[i].AuctionStatusText, list[i].OfferAvailable, list[i].AuctionID.ToString() )); } PageStateStruc p; p.auctions = auctions; p.viewSummary = view; return Json(p); }
/// <remarks/> public void GetAuctionsListAsync(int Filter, bool IsOwn, TViewSummary ViewSummary, TAuctionsListRec[] AuctionsList) { this.GetAuctionsListAsync(Filter, IsOwn, ViewSummary, AuctionsList, null); }
/// <remarks/> public void GetAuctionsListAsync(int Filter, bool IsOwn, TViewSummary ViewSummary, TAuctionsListRec[] AuctionsList, object userState) { if ((this.GetAuctionsListOperationCompleted == null)) { this.GetAuctionsListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAuctionsListOperationCompleted); } this.InvokeAsync("GetAuctionsList", new object[] { Filter, IsOwn, ViewSummary, AuctionsList}, this.GetAuctionsListOperationCompleted, userState); }
public bool GetAuctionsList(int Filter, bool IsOwn, ref TViewSummary ViewSummary, ref TAuctionsListRec[] AuctionsList) { object[] results = this.Invoke("GetAuctionsList", new object[] { Filter, IsOwn, ViewSummary, AuctionsList}); ViewSummary = ((TViewSummary)(results[1])); AuctionsList = ((TAuctionsListRec[])(results[2])); return ((bool)(results[0])); }