Exemple #1
0
        public static void SendEmail(MailMessage email)
        {
            try
            {
                using (var db = new PortfolioDataContext())
                {
                    InboxMessage message = new InboxMessage()
                    {
                        MessageFrom = email.From.ToString(),
                        Subject     = email.Subject,
                        Message     = email.Body,
                        IsChecked   = false,
                        Date        = DateTime.Now
                    };

                    db.InboxMessages.InsertOnSubmit(message);
                    db.SubmitChanges();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 partial void DeleteInboxMessage(InboxMessage instance);
 partial void UpdateInboxMessage(InboxMessage instance);
 partial void InsertInboxMessage(InboxMessage instance);