Beispiel #1
0
        /// <summary>
        /// Проверяет существование Реестра оплат по id
        /// </summary>
        /// <param name="id">id Реестра оплат</param>
        /// <returns></returns>
        // GET: api/OnlineReestr/5
        public HttpResponseMessage Get(string id)
        {
            Online_log.Info($"Get реестра оплат {0}", id.ToString());

            HttpResponseMessage response;

            Reestr c = new Reestr();

            String ln = "";
            BusinessEntityCollection fcontact = c.searchnew_reestr(id);

            foreach (DynamicEntity cont1 in fcontact.BusinessEntities)
            {
                ln = cont1["new_txn_id"].ToString();
            }

            if ((ln != ""))
            {
                response = Request.CreateResponse(HttpStatusCode.OK, ln);
            }
            else
            {
                response = Request.CreateResponse(HttpStatusCode.NoContent, ln);
            }

            return(response);
        }