public static void SendEmail(CsxContext _csxContext, AppSettings _appSettings, Notification dados) { try{ Surveys survey = _csxContext.Surveys.Find(dados.fk_survey); Companies company = _csxContext.Companies.Find(survey.fk_company); //Send email notification Authentication.Common.SendEmail.Notification(dados, company); }catch (Exception ex) { throw ex; } }
public static void SendChatBot(CsxContext _csxContext, AppSettings _appSettings, string URL_NOTIFICATION, Notification dados) { var _chatboturl = "URL" + URL_NOTIFICATION; //Add participant_key if phone is null. dados.phone = string.IsNullOrEmpty(dados.phone) ? dados.participant_key : dados.phone; //Connect with chatbotmaker. using (var httpClient = new HttpClient()) { var content = new StringContent(JsonConvert.SerializeObject(dados, new JsonSerializerSettings() { ContractResolver = new CamelCasePropertyNamesContractResolver() }), Encoding.UTF8, "application/json"); var response = httpClient.PostAsync(_chatboturl, content).Result; } }
public RolesController(CsxContext csxContext) { _csxContext = csxContext; }
public CompaniesController(CsxContext csxContext) { _csxContext = csxContext; }
public TokenLogsController(CsxContext csxContext) { _csxContext = csxContext; }
public DepartmentController(CsxContext csxContext) { _csxContext = csxContext; }
public SurveyBusiness(CsxContext csxContext, AppSettings appSettings) { _csxContext = csxContext; _appSettings = appSettings; }
public SurveyBusiness(CsxContext csxContext) { _csxContext = csxContext; }
public CompanyUsersController(CsxContext csxContext) { _csxContext = csxContext; }
public UsersController(CsxContext csxContext, AppSettings appSettings) { _csxContext = csxContext; _appSettings = appSettings; }
public TokenLogBusiness(CsxContext csxContext) { _csxContext = csxContext; }
public SurveyController(CsxContext csxContext, IConfiguration config) { _csxContext = csxContext; _config = config; }
public ActionBusiness(CsxContext csxContext) { _csxContext = csxContext; }
public ActionsController(CsxContext csxContext) { _csxContext = csxContext; }
public LoginController(CsxContext csxContext) { _csxContext = csxContext; }