/// <summary>
        /// Запрос на импорт платежных документов
        /// </summary>
        /// <param name="_orgPPAGUID">Идентификатор зарегистрированной организации</param>
        /// <param name="_accountGUID">Идентификатор лицевого счета</param>
        /// <returns></returns>
        public importPaymentDocumentDataResponse SetPaymentDocumentData(string _orgPPAGUID, string _accountGUID, List <PaymentDocumentTypeChargeInfo> _paymentDocumentTypeChargeArray)
        {
            var srvBillsService = new BillsPortsTypeClient();

            srvBillsService.ClientCredentials.UserName.UserName = ConfigurationManager.AppSettings["_login"];
            srvBillsService.ClientCredentials.UserName.Password = ConfigurationManager.AppSettings["_pass"];

            var PITG = Guid.NewGuid().ToString();

            var reqBillsServiceImpDoc = new importPaymentDocumentDataRequest
            {
                RequestHeader = new RequestHeader
                {
                    Date            = DateTime.Now,
                    MessageGUID     = Guid.NewGuid().ToString(),
                    ItemElementName = ItemChoiceType1.orgPPAGUID,
                    Item            = _orgPPAGUID
                },
                importPaymentDocumentRequest = new importPaymentDocumentRequest
                {
                    version = "11.2.0.16",
                    Items   = new object[]
                    {
                        //true,
                        (int)DateTime.Now.Month,  //(int)12, //Месяц
                        (short)DateTime.Now.Year, //(short)2017, //Год
                        new importPaymentDocumentRequestPaymentInformation
                        {
                            TransportGUID          = PITG,
                            BankBIK                = "046577904",
                            operatingAccountNumber = "40702810800010003850"
                        },
                        new importPaymentDocumentRequestPaymentDocument
                        {
                            TransportGUID         = Guid.NewGuid().ToString(),
                            AccountGuid           = _accountGUID, //GUID лицевого счета
                            PaymentInformationKey = PITG,         //GUID платежных реквизитов
                            Item  = true,
                            Items = _paymentDocumentTypeChargeArray.ToArray()
                        }
                    }
                }
            };

            var resBillServiceImpDoc = srvBillsService.importPaymentDocumentData(reqBillsServiceImpDoc);

            return(resBillServiceImpDoc);
        }
Example #2
0
        /// <summary>
        /// Запрос на импорт платежных документов
        /// </summary>
        /// <param name="_orgPPAGUID">Идентификатор зарегистрированной организации</param>
        /// <param name="_accountGUID">Идентификатор лицевого счета</param>
        /// <returns></returns>
        public importPaymentDocumentDataResponse SetPaymentDocumentData(string _orgPPAGUID, string _accountGUID)
        {
            var srvBillsService = new BillsPortsTypeClient();

            srvBillsService.ClientCredentials.UserName.UserName = ConfigurationManager.AppSettings["_login"];
            srvBillsService.ClientCredentials.UserName.Password = ConfigurationManager.AppSettings["_pass"];

            var PITG = Guid.NewGuid().ToString();

            var reqBillsServiceImpDoc = new importPaymentDocumentDataRequest
            {
                RequestHeader = new RequestHeader
                {
                    Date            = DateTime.Now,
                    MessageGUID     = Guid.NewGuid().ToString(),
                    ItemElementName = ItemChoiceType1.orgPPAGUID,
                    Item            = _orgPPAGUID
                },
                importPaymentDocumentRequest = new importPaymentDocumentRequest
                {
                    version = "11.2.0.16",
                    Items   = new object[]
                    {
                        //true,
                        (int)DateTime.Now.Month,  //(int)12, //Месяц
                        (short)DateTime.Now.Year, //(short)2017, //Год
                        new importPaymentDocumentRequestPaymentInformation
                        {
                            TransportGUID          = PITG,
                            BankBIK                = "046577904",
                            operatingAccountNumber = "40702810800010003850"
                        },
                        new importPaymentDocumentRequestPaymentDocument
                        {
                            TransportGUID         = Guid.NewGuid().ToString(),
                            AccountGuid           = _accountGUID, //GUID лицевого счета
                            PaymentInformationKey = PITG,         //GUID платежных реквизитов
                            Item  = true,
                            Items = new object[]
                            {
                                new PaymentDocumentTypeChargeInfo
                                {
                                    Item = new PDServiceChargeTypeMunicipalService
                                    {
                                        AccountingPeriodTotal = 100, //Всего начислено за расчетный период
                                        TotalPayable          = 100, //Итого к оплате за расчетный период
                                        Rate        = 10m,           //Тариф
                                        ServiceType = new nsiRef
                                        {
                                            Code = "1.1",
                                            GUID = "e12e7b13-4e81-41b4-86d1-724fe9c0b874"
                                        },
                                        Consumption = new PDServiceChargeTypeMunicipalServiceVolume[]
                                        {
                                            new PDServiceChargeTypeMunicipalServiceVolume
                                            {
                                                typeSpecified = true,
                                                type          = PDServiceChargeTypeMunicipalServiceVolumeType.I,                           //(I)ndividualConsumption - индивидульное потребление (O)verallNeeds - общедомовые нужды
                                                determiningMethodSpecified = true,
                                                determiningMethod          = PDServiceChargeTypeMunicipalServiceVolumeDeterminingMethod.N, //(N)orm - Норматив (M)etering device - Прибор учета (O)ther - Иное
                                                Value = 10m
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            };

            var resBillServiceImpDoc = srvBillsService.importPaymentDocumentData(reqBillsServiceImpDoc);

            return(resBillServiceImpDoc);
        }