public InsertDataController(UserManager <ApplicationUser> user, IGenericBL <Devices> device, IGenericBL <Logs> log, ClientKeyManager clientKey)
 {
     _user      = user;
     _log       = log;
     _device    = device;
     _clientKey = clientKey;
 }
예제 #2
0
 public EditBuilder(IGenericBL <email> emails, IGenericBL <Devices> device)
 {
     _emails = emails;
     _device = device;
 }
예제 #3
0
 public DeleteController(UserManager <ApplicationUser> user, IGenericBL <Devices> device, IGenericBL <Logs> log)
 {
     _user   = user;
     _log    = log;
     _device = device;
 }
예제 #4
0
        public async static Task <string> SendEmail(string subject, string msg, string toemail, IGenericBL <email> email)
        {
            var e = email.AsQueryable().FirstOrDefault();

            if (e != null)
            {
                MailMessage mail       = new MailMessage();
                SmtpClient  SmtpServer = new SmtpClient(e.smtpserver);
                mail.From = new MailAddress(e.emailaddress);
                mail.To.Add(toemail);

                mail.Subject = subject;
                mail.Body    = msg;

                SmtpServer.Port = 587;

                SmtpServer.Credentials = new System.Net.NetworkCredential(e.emailaddress, e.password);
                SmtpServer.EnableSsl   = true;
                ServicePointManager.ServerCertificateValidationCallback =
                    delegate(object es, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
                {
                    return(true);
                };
                try
                {
                    await SmtpServer.SendMailAsync(mail);

                    return("Ok");
                }
                catch (Exception ex)
                {
                    return(ex.Message);
                }
            }
            return("Email No Configured");
        }
예제 #5
0
 public BlHelper(IGenericBL <otp> otps, IGenericBL <email> email)
 {
     _otps  = otps;
     _email = email;
 }
예제 #6
0
 public ClientKeyManager(IGenericBL <KeyMaintainer> key)
 {
     _key = key;
 }