public ActionResult GetAgreements(int auctionID) { TAgreementsListRec[] agreementsList = new TAgreementsListRec[0]; TAuthHeader header = new TAuthHeader(); header.SessionID = (String)Session["sessionID"]; header.SessionKey = (String)Session["sessionKey"]; client.TAuthHeaderValue = header; client.GetAgreements(auctionID, ciAgrAuOwn, ref agreementsList); List<AgreementRec> recs = new List<AgreementRec>(); for (int i = 0; i < agreementsList.Length; i++) { recs.Add(new AgreementRec( DateTimeUtils.DoubleToDateTime(agreementsList[i].AgreementDate).ToString("dd.MM.yyyy"), agreementsList[i].AgreementForm, agreementsList[i].AgreementRegNum, agreementsList[i].AgreementStatusText, agreementsList[i].CostWithPref.ToString("#,##.####"), agreementsList[i].CurrencyAbb, agreementsList[i].Description, agreementsList[i].DocID, agreementsList[i].LotID, agreementsList[i].NumLot, agreementsList[i].ParticipantName, agreementsList[i].RatePref.ToString("#,##.####")) ); } return Json(recs); }
/// <remarks/> public void GetAgreementsAsync(int AuctionID, int Filter, TAgreementsListRec[] Agreements) { this.GetAgreementsAsync(AuctionID, Filter, Agreements, null); }
/// <remarks/> public void GetAgreementsAsync(int AuctionID, int Filter, TAgreementsListRec[] Agreements, object userState) { if ((this.GetAgreementsOperationCompleted == null)) { this.GetAgreementsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAgreementsOperationCompleted); } this.InvokeAsync("GetAgreements", new object[] { AuctionID, Filter, Agreements}, this.GetAgreementsOperationCompleted, userState); }
public bool GetAgreements(int AuctionID, int Filter, ref TAgreementsListRec[] Agreements) { object[] results = this.Invoke("GetAgreements", new object[] { AuctionID, Filter, Agreements}); Agreements = ((TAgreementsListRec[])(results[1])); return ((bool)(results[0])); }