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);
        }
예제 #2
0
 /// <remarks/>
 public void GetAgreementsAsync(int AuctionID, int Filter, TAgreementsListRec[] Agreements) {
     this.GetAgreementsAsync(AuctionID, Filter, Agreements, null);
 }
예제 #3
0
 /// <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);
 }
예제 #4
0
 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]));
 }