public async Task <IEnumerable <LeadDTO> > GetLeadsByStatus(int status) { var sd = new LeadDTO(); sd.ResponsibleUserId = (int)ResponsibleUserEnum.Анастасия_Столовая; return(await crm.Leads.Get().Filter(x => x.Status = status).Execute()); }
public HttpResponseMessage PostLead(ref LeadDTO notification) { using (var client = createClient(_accessToken)) { var response = client.PostAsJsonAsync(_appPath + "/api/Leads", notification).Result; var result = response.Content.ReadAsStringAsync().Result; notification = JsonConvert.DeserializeObject <LeadDTO>(result); return(response); } }
public bool PostLeadTest() { LeadDTO item = new LeadDTO() { //Name = "ТестАпи Заявка", //Comment = "Можно указать название курса", Phone = "+79111647627", CourseId = 12 }; var response = _database.PostLead(ref item); return(response.StatusCode == HttpStatusCode.OK ? true : false); }