Exemplo n.º 1
0
            public PostingDetail ShowPosting(int postid)
            {
                PostingDetail result = null;

                DoRequest <ReqShowPosting, RespShowPosting>(
                    (send) =>
                {
                    send.SetParameter(new ReqShowPosting {
                        postID = postid
                    });
                },
                    (recv) =>
                {
                    if (recv.param != null)
                    {
                        result             = new PostingDetail();
                        result.postingInfo = recv.param;

                        var imageList = new List <byte[]>();
                        for (var i = 0; i < recv.binaryDataCount; i++)
                        {
                            imageList.Add(recv.GetBinaryData(i));
                        }

                        result.imageArray = imageList;
                    }
                    else
                    {
                    }
                });

                return(result);
            }
Exemplo n.º 2
0
        //public InstrumentTypeGLMapData[] GetInstrumentTypeGLMaps()
        //{
        //    return Channel.GetInstrumentTypeGLMaps();
        //}


        //public InstrumentTypeGLMapData[] GetInstrumentTypeGLMapByExtraction(int extractionId)
        //{
        //    return Channel.GetInstrumentTypeGLMapByExtraction(extractionId);
        //}

        //public InstrumentTypeGLMapData[] GetInstrumentTypeGLMapByRunDate(DateTime startDate,DateTime endDate)
        //{
        //    return Channel.GetInstrumentTypeGLMapByRunDate(startDate,endDate);
        //}

        //public InstrumentTypeGLMapData[] GetInstrumentTypeGLMapByRunTime(DateTime runTime)
        //{
        //    return Channel.GetInstrumentTypeGLMapByRunTime(runTime);
        //}

        //public InstrumentTypeGLMapData[] RunExtraction(int extractionId,DateTime startDate, DateTime endDate, DateTime runTime)
        //{
        //    return Channel.RunExtraction(extractionId,startDate, endDate, runTime);
        //}

        //public InstrumentTypeGLMapData[] CancelExtractions(DateTime startDate, DateTime endDate)
        //{
        //    return Channel.CancelExtractions(startDate, endDate);
        //}

        #endregion

        #region PostingDetail

        public PostingDetail UpdatePostingDetail(PostingDetail postingDetail)
        {
            return(Channel.UpdatePostingDetail(postingDetail));
        }
Exemplo n.º 3
0
    protected void btnPostPosting_Click(object sender, EventArgs e)
    {
        string url = "http://localhost:54106/1.0/Posting/New";

        PostingDetail postingDetail = new PostingDetail
        {
            PostingType = postingType,
            ComplaintId = complaintId,
            ParentPostingId = parentPostingId,
            AccountId = accountId,
            EntityId = entityId,
            Description = description
        };

        string jsonPostingDetail = postingDetail.ToJSON();

        HttpWebRequest GETRequest = (HttpWebRequest)WebRequest.Create(url);
        GETRequest.Method = "POST";

        using (var streamWriter = new StreamWriter(GETRequest.GetRequestStream()))
        {
            streamWriter.Write(jsonPostingDetail);
            streamWriter.Flush();
            streamWriter.Close();

            HttpWebResponse GETResponse = (HttpWebResponse)GETRequest.GetResponse();
            Stream GETResponseStream = GETResponse.GetResponseStream();
            StreamReader sr = new StreamReader(GETResponseStream);

            lblResult.Text = sr.ReadToEnd();
        }
    }
Exemplo n.º 4
0
 public void SetPostingDetails(PostingDetail postingDetails)
 {
     this.postingDetails = postingDetails;
 }