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; }
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); }
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 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)); }