Beispiel #1
0
        /// <summary>
        /// Отправка письма пользователям по группе
        /// </summary>
        /// <param name="mailOutlook">Письма заступившие</param>
        /// <param name="arrayUsers">Рассылка пользователям</param>
        public void SendMailIn(MailLotusOutlookIn mailOutlook, List <string> arrayUsers)
        {
            Db.LotusConnectedDataBaseServer(Config.LotusServer, Config.LotusMailSend);
            Db.DeleteDataBaseAllMailSizeWarning();
            DocumentGenerationAllDxl document = new DocumentGenerationAllDxl(Db.Db);

            document.DocumentGenerationMailMemo(arrayUsers, "От кого: " + mailOutlook.MailAdress + " Тема: " + mailOutlook.SubjectMail, Db.Session.UserName, mailOutlook.Body, mailOutlook.FullPathFile);
            DonloadOnCreateDxlFile download = new DonloadOnCreateDxlFile();

            download.DxlFileSave(Config.PathGenerateScheme, document.Document, typeof(note));
            var noteId = download.ImportDxlFile(Config.PathGenerateScheme, Db.Db);

            if (noteId != null)
            {
                var docSave = Db.Db.GetDocumentByID(noteId);
                docSave.Send(false);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Генерация производного документа ответа БД должна быть открыта
 /// </summary>
 /// <param name="arrayUsers">Кому отправлять</param>
 /// <param name="subject">Тема</param>
 /// <param name="body">Тело документа</param>
 /// <param name="fileFullPathName">Имя файла</param>
 public void SendMailAutoOutput(List <string> arrayUsers, string subject, string body, string fileFullPathName = null)
 {
     if (Db.Db != null)
     {
         DocumentGenerationAllDxl document = new DocumentGenerationAllDxl(Db.Db);
         document.DocumentGenerationMailMemo(arrayUsers, subject, Db.Session.UserName, body, fileFullPathName);
         DonloadOnCreateDxlFile download = new DonloadOnCreateDxlFile();
         download.DxlFileSave(Config.PathGenerateScheme, document.Document, typeof(note));
         var noteId = download.ImportDxlFile(Config.PathGenerateScheme, Db.Db);
         if (noteId != null)
         {
             var docSave = Db.Db.GetDocumentByID(noteId);
             docSave.Send(false);
         }
     }
     else
     {
         Loggers.Log4NetLogger.Error(new Exception($"База не открыта или пуста для обратной связи ошибки"));
     }
 }