public static void SendNotificationEmail(INotification NotificationObj) { Stocky.DataAcesse.Reposetories.UserRepo Repo = new DataAcesse.Reposetories.UserRepo(); var userobject = Repo.GetUserObject(NotificationObj.NewNotification.RaisedBy); MailService Mail = new MailService(); Mail.FromEmail = @"*****@*****.**"; Mail.ToEmail = userobject.Email; Mail.Attachments = NotificationObj.NewNotification.NotificationAttachments; Mail.Send(NotificationObj.NewNotification.EmailBody, "New Notification: " + NotificationObj.NewNotification.Name); }
static bool ValidateUser(string UserName) { if (UserName != null) { DataAcesse.Reposetories.UserRepo Repo = new DataAcesse.Reposetories.UserRepo(); if (Repo.DoesUserExist(UserName)) { CurrentPassword = Repo.GetPassWord(UserName); return(true); } else { return(false); } } else { return(false); } }