Beispiel #1
0
        public void deleteServerSMTP(int serverSMTPId)
        {
            ServerSMTPParameter serverSMTP = ConfigurationDB.ServerSMTPParameters.Where(param => param.ServerSMTPParametersId == serverSMTPId).ToList()[0];

            ConfigurationDB.ServerSMTPParameters.Remove(serverSMTP);
            ConfigurationDB.SaveChanges();
        }
Beispiel #2
0
        public void updateServerSMPT(int id, string nameServerSMTP, string port, string usernameSMTP, string passwordSMTP, string from, string subject, string body)
        {
            ServerSMTPParameter serverSmtp = ConfigurationDB.ServerSMTPParameters.Where(param => param.ServerSMTPParametersId == id).ToList()[0];

            serverSmtp.NameServerSMTP = nameServerSMTP;
            serverSmtp.Port           = port;
            serverSmtp.UsernameSMTP   = usernameSMTP;
            serverSmtp.PasswordSMTP   = passwordSMTP;
            serverSmtp.EmailFrom      = from;
            serverSmtp.Subject        = subject;
            serverSmtp.Body           = body;

            ConfigurationDB.SaveChanges();
        }
Beispiel #3
0
        public void saveServerSMPT(string nameServerSMTP, string port, string usernameSMTP, string passwordSMTP, string from, string subject, string body)
        {
            ServerSMTPParameter serverSmtp = new ServerSMTPParameter();

            serverSmtp.NameServerSMTP = nameServerSMTP;
            serverSmtp.Port           = port;
            serverSmtp.UsernameSMTP   = usernameSMTP;
            serverSmtp.PasswordSMTP   = passwordSMTP;
            serverSmtp.EmailFrom      = from;
            serverSmtp.Subject        = subject;
            serverSmtp.Body           = body;

            ConfigurationDB.ServerSMTPParameters.Add(serverSmtp);
            ConfigurationDB.SaveChanges();
        }
Beispiel #4
0
        public ServerSMTPParameter getServerSMTP(int id)
        {
            ServerSMTPParameter serverSMTP = ConfigurationDB.ServerSMTPParameters.Where(param => param.ServerSMTPParametersId == id).ToList()[0];

            return(serverSMTP);
        }