tworzenie exela

Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); if (xlApp == null) { MessageBox.Show(„Excel is not properly installed!!”); return; } Excel.Workbook xlWorkBook; Excel.Worksheet xlWorkSheet; object misValue = System.Reflection.Missing.Value; xlWorkBook = xlApp.Workbooks.Add(misValue); xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1); xlWorkSheet.Cells[1, 1] = „ID”; xlWorkSheet.Cells[1, 2] = „Name”; xlWorkSheet.Cells[2, 1] = „1”; xlWorkSheet.Cells[2, 2] = „One”; xlWorkSheet.Cells[3, 1] = „2”; xlWorkSheet.Cells[3, 2] = „Two”;

Wysylanie mail

MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient(„smtp.gmail.com”); mail.From = new MailAddress(„your mail@gmail.com”); mail.To.Add(„to_mail@gmail.com”); mail.Subject = „Test Mail – 1”; mail.Body = „mail with attachment”; System.Net.Mail.Attachment attachment; attachment = new System.Net.Mail.Attachment(„c:/textfile.txt”); mail.Attachments.Add(attachment); SmtpServer.Port = 587; SmtpServer.Credentials = new System.Net.NetworkCredential(„your mail@gmail.com”, „your password”); SmtpServer.EnableSsl = true; SmtpServer.Send(mail);

poziomy istotności msSQL

Severity level Description 0-9 Informational messages that return status information or report errors that are not severe. The Database Engine does not raise system errors with severities of 0 through 9. 10 Informational messages that return status information or report errors that are not severe. For compatibility reasons, the Database Engine converts severity 10 to