Example #1
0
 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;
     }
 }
Example #2
0
        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;
            }
        }
Example #3
0
 public RolesController(CsxContext csxContext)
 {
     _csxContext = csxContext;
 }
Example #4
0
 public CompaniesController(CsxContext csxContext)
 {
     _csxContext = csxContext;
 }
Example #5
0
 public TokenLogsController(CsxContext csxContext)
 {
     _csxContext = csxContext;
 }
Example #6
0
 public DepartmentController(CsxContext csxContext)
 {
     _csxContext = csxContext;
 }
Example #7
0
 public SurveyBusiness(CsxContext csxContext, AppSettings appSettings)
 {
     _csxContext  = csxContext;
     _appSettings = appSettings;
 }
Example #8
0
 public SurveyBusiness(CsxContext csxContext)
 {
     _csxContext = csxContext;
 }
Example #9
0
 public CompanyUsersController(CsxContext csxContext)
 {
     _csxContext = csxContext;
 }
Example #10
0
 public UsersController(CsxContext csxContext, AppSettings appSettings)
 {
     _csxContext  = csxContext;
     _appSettings = appSettings;
 }
Example #11
0
 public TokenLogBusiness(CsxContext csxContext)
 {
     _csxContext = csxContext;
 }
Example #12
0
 public SurveyController(CsxContext csxContext, IConfiguration config)
 {
     _csxContext = csxContext;
     _config     = config;
 }
Example #13
0
 public ActionBusiness(CsxContext csxContext)
 {
     _csxContext = csxContext;
 }
Example #14
0
 public ActionsController(CsxContext csxContext)
 {
     _csxContext = csxContext;
 }
Example #15
0
 public LoginController(CsxContext csxContext)
 {
     _csxContext = csxContext;
 }