/// <remarks/> public void GetMemberAsync(string SearchStr, TMemberInfo MemberInfo, object userState) { if ((this.GetMemberOperationCompleted == null)) { this.GetMemberOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMemberOperationCompleted); } this.InvokeAsync("GetMember", new object[] { SearchStr, MemberInfo}, this.GetMemberOperationCompleted, userState); }
public bool GetMember(string SearchStr, ref TMemberInfo MemberInfo) { object[] results = this.Invoke("GetMember", new object[] { SearchStr, MemberInfo}); MemberInfo = ((TMemberInfo)(results[1])); return ((bool)(results[0])); }
/// <remarks/> public void GetMemberAsync(string SearchStr, TMemberInfo MemberInfo) { this.GetMemberAsync(SearchStr, MemberInfo, null); }
public ActionResult AddAuction(AuctionInitData auctionInitData, AuctionGeneralInfo generalInfo, Contact[] contacts, string auctionRole, Lot[] lots, String content, String signature, File[] files) { TAuction auction = new TAuction(); //заполняем шапку TAuctionHeader auctionHeader = new TAuctionHeader(); auctionHeader.AuctionRegNumber = auctionInitData.AuctionRegNumber; auctionHeader.PurchaseName = auctionInitData.PurchaseName; auctionHeader.PurchaseSite = auctionInitData.PurchaseSite; auction.AuctionHeader = auctionHeader; //заполняем информацию о заказчике TMemberInfo memeberInfo = new TMemberInfo(); memeberInfo.Address = auctionInitData.Address; memeberInfo.MemberRegNumber = auctionInitData.MemberRegNumber; memeberInfo.MemberType = int.Parse(auctionInitData.MemberType); memeberInfo.Name = auctionInitData.Name; memeberInfo.UNP = auctionInitData.UNP; auction.Customer = memeberInfo; //заполняем общую информацию об аукционе TAuctionInfo auctionInfo = new TAuctionInfo(); auctionInfo.AddInfo = generalInfo.AddInfo; auctionInfo.CodeTender = generalInfo.RegNum; //currency code auctionInfo.Currency = generalInfo.CurrencyCode; //currency label auctionInfo.CurrencyAbb = generalInfo.Currency; auctionInfo.EndOfferDate = DateTimeUtils.DateTimeToDouble(DateTime.Parse(generalInfo.EndOfferDate.Trim().Replace(" ", string.Empty))); auctionInfo.ExpiryOfferDate = DateTimeUtils.DateTimeToDouble(DateTime.Parse(generalInfo.TenderEndDate.Trim().Replace(" ", string.Empty))); auctionInfo.FinanceType = generalInfo.FinanceType; auctionInfo.MemberRequires = generalInfo.MemberRequires; auctionInfo.PublishDate = DateTimeUtils.DateTimeToDouble(DateTime.Parse(generalInfo.RegDate.Trim().Replace(" ", string.Empty))); auctionInfo.QualificationRequires = generalInfo.QualificationRequires; if (generalInfo.SecurityPercent != null) { auctionInfo.SecurityPercent = double.Parse(generalInfo.SecurityPercent, System.Globalization.CultureInfo.InvariantCulture); } else { auctionInfo.SecurityPercent = 0; } auctionInfo.ServiceFee = double.Parse(auctionInitData.ServiceFee, System.Globalization.CultureInfo.InvariantCulture); auctionInfo.TotalCost = double.Parse(auctionInitData.TotalCost, System.Globalization.CultureInfo.InvariantCulture); auctionInfo.SubjectName = generalInfo.Name; auctionInfo.TenderDate = DateTimeUtils.DateTimeToDouble(DateTime.Parse(generalInfo.TenderDate.Trim().Replace(" ", string.Empty) + " " + generalInfo.TenderTime.Trim().Replace(" ", string.Empty))); auction.AuctionInfo = auctionInfo; //заполняем роль заказчика auction.CustomerRoleText = auctionRole; //заполняем контактные лица TContactPerson[] contactsPerson = new TContactPerson[contacts.Length]; for (int i = 0; i < contacts.Length; i++) { TContactPerson contact = new TContactPerson(); contact.Email = contacts[i].Email; contact.FIO = contacts[i].FIO; contact.Phone = contacts[i].Phones; contact.Fax= contacts[i].Fax; contact.AddInfo = contacts[i].OtherInfo; contactsPerson[i] = contact; } auction.ContactPersons = contactsPerson; TLotInfo[] lotsInfo = new TLotInfo[lots.Length]; for (int i = 0; i < lots.Length; i++) { TLotInfo lotInfo = new TLotInfo(); lotInfo.AddInfo = lots[i].OtherInfo; //lotInfo.AgreementConsent= //lotInfo.AuctionLotStatusText= lotInfo.Currency = generalInfo.CurrencyCode; lotInfo.CurrencyAbb = generalInfo.Currency; lotInfo.DeliveryDate = lots[i].Time; lotInfo.DeliveryPlace = lots[i].Place; lotInfo.Description = lots[i].Description; lotInfo.EdIzm = lots[i].EdIzmCode; lotInfo.EdIzmAbb = lots[i].EdIzm; lotInfo.FundingSource = int.Parse(lots[i].FinanceSourceCode); lotInfo.FundingSourceText = lots[i].FinanceSource; //lotInfo.LotID= lotInfo.LotVolume = double.Parse(lots[i].Value, System.Globalization.CultureInfo.InvariantCulture); lotInfo.NumLot = i + 1; //lotInfo.OfferLotStatusText= TOKRBRec[] okrb = new TOKRBRec[lots[i].OKRB.Length]; for (int j = 0; j < lots[i].OKRB.Length;j++ ) { TOKRBRec okrbRec = new TOKRBRec(); okrbRec.OKRBCode = lots[i].OKRB[j].OKRBCode; okrbRec.OKRBID = int.Parse(lots[i].OKRB[j].OKRBID); okrbRec.OKRBName = lots[i].OKRB[j].OKRBName; okrb[j] = okrbRec; } lotInfo.OKRBList = okrb; //lotInfo.PrefPercent = lots[i]. //lotInfo.PrefReason = lots[i]. //lotInfo.SecurityValue= lotInfo.StartPrice = double.Parse(lots[i].Price, System.Globalization.CultureInfo.InvariantCulture); lotInfo.VolumeMethod = lots[i].CalcMethod; lotsInfo[i] = lotInfo; } auction.Lots = lotsInfo; TEDContent eContent = new TEDContent(); eContent.Content = content; eContent.Signature = signature; TAuthHeader header = new TAuthHeader(); header.SessionID = (String)Session["sessionID"]; header.SessionKey = (String)Session["sessionKey"]; client.TAuthHeaderValue = header; int AuctionID = new int(); client.AddAuction(auction, eContent, ref AuctionID); if (files != null) { GovernmentPurchases.IUploadFiles.IUploadFilesservice fileClient = new GovernmentPurchases.IUploadFiles.IUploadFilesservice(); GovernmentPurchases.IUploadFiles.TEDocument document = new GovernmentPurchases.IUploadFiles.TEDocument(); GovernmentPurchases.IUploadFiles.TEDContent cont = new GovernmentPurchases.IUploadFiles.TEDContent(); for (int i = 0; i < files.Length; i++) { document.IDParent = AuctionID; document.FileName = files[i].FileName; document.NameDocument = files[i].DocName; document.TypeDocument = files[i].DocType; cont.Content = files[i].Content; cont.Signature = files[i].Signature; int DocID = new int(); fileClient.AddEDoc((String)Session["sessionID"], (String)Session["sessionKey"], C_LINK_AUCTIONS, document, cont, ref DocID); } } client.LockAuctionForEdit(AuctionID, 0); return Json(true); }