public ResponseDTO UpdateAttendantStructure() { AttendantServices attendantService = new AttendantServices(); var response = new ResponseDTO(); try { var ret = attendantService.SincronizeAttendantWithBitrix(); if (ret == 1) { response.Data = new { sucesso = 1, message = "Atendentes atualizados com sucesso!" }; } else { response.Data = new { sucesso = 0, message = "Não foi possível atualizar os departamentos!" }; } } catch (Exception ex) { response.Message = ex.Message; } return(response); }
static void Main(string[] args) { Bitrix24Services objService = new Bitrix24Services(); AttendantServices attedantasService = new AttendantServices(); FormServices formService = new FormServices(); DepartmentServices departmentServices = new DepartmentServices(); List <Department> lstDepartments = departmentServices.GetDepartments(); //objService.CreateLead("Silvia Aparecida", 12, "Silvia Aparecida", "1198987787", "*****@*****.**","NEW"); //objService.CreateLead("Amanda Nunes", 12, "Amanda Nunes", "1198987787", "*****@*****.**", "1"); //objService.CreateLead("Renata dos Santos", 12, "Renata dos Santos", "1198987787", "*****@*****.**", "IN_PROCESS"); //objService.GetDepartments(); //List<Attendant> lstAttendants = attedantasService.GetAttendants(); //objService.GetEmployeeDepartments(); //List<string> lstString = formService.GetNextUserDepartmentLeadDisQualifield(); Console.WriteLine("Hello World!"); }