示例#1
0
        public IEnumerable<Deal> Get(DealStatus dealStatus)
        {
            var url = "deals.xml?status=" + dealStatus.ToString().ToLower();
            var response = _client.Execute<List<Deal>>(new RestRequest(url, Method.GET));
            var deals = response.Data;

            foreach (var deal in deals)
                deal.LoadParties(response.Content);

            return deals;
        }
示例#2
0
        public IEnumerable <Deal> Get(DealStatus dealStatus)
        {
            var url      = "deals.xml?status=" + dealStatus.ToString().ToLower();
            var response = Client.Execute <List <Deal> >(new RestRequest(url, Method.GET));
            var deals    = response.Data;

            foreach (var deal in deals)
            {
                deal.LoadParties(response.Content);
            }

            return(deals);
        }
示例#3
0
        public bool UpdateStatus(int id, DealStatus dealStatus)
        {
            var request = new RestRequest(String.Format("deals/{0}/status.xml", id), Method.PUT)
            {
                XmlSerializer = new XmlIgnoreSerializer()
            };

            request.AddParameter("text/xml", String.Format("<status><name>{0}</name></status>", dealStatus.ToString().ToLower()), ParameterType.RequestBody);

            var response = Client.Execute(request);

            return(response.StatusCode == HttpStatusCode.OK);
        }
示例#4
0
        public bool UpdateStatus(int id, DealStatus dealStatus)
        {
            var request = new RestRequest(String.Format("deals/{0}/status.xml", id), Method.PUT) { XmlSerializer = new XmlIgnoreSerializer() };
            request.AddParameter("text/xml", String.Format("<status><name>{0}</name></status>", dealStatus.ToString().ToLower()), ParameterType.RequestBody);

            var response = _client.Execute(request);
            return response.StatusCode == HttpStatusCode.OK;
        }
 public int UpdateDealStatus(int submitId, DealStatus dealStatus)
 {
     Tracking(ActionType.Edit, ResourceType.EntrustCommand, submitId, dealStatus.ToString());
     return(_entrustcmddao.UpdateDealStatus(submitId, dealStatus));
 }