Example #1
0
        private string PrepareMailBody(string inpRows, int rowsCount, bool html = true)
        {
            string messageBody = "";

            string parSet = "";

            string newLine = "\n";

            ASVRequest myObject = (ASVRequest)this.MyRequest;

            if (myObject != null)
            {
                parSet = myObject.GetRequestStringPrintable();
            }
            if (html)
            {
                newLine      = "<br>";
                messageBody += String.Format(@"<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.=w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">");
                messageBody += String.Format(@"<html xmlns=""http://www.w3.org/1999/xhtml"">");
                messageBody += String.Format(@"<head>");
                messageBody += String.Format(@"<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-=1"" />");
                messageBody += String.Format(@"</head>");
                messageBody += String.Format(@"<body marginwidth=""0"" marginheight=""0"" leftmargin=""0"" topmargin=""0"" style=""width: 100 % !important"">");
            }
            messageBody += String.Format("По Вашему запросу: \"{0}\" были обнаружены новые записи:{2}{1}", parSet, inpRows, newLine);

            if (rowsCount >= 20)
            {
                messageBody += newLine + newLine + " Возможно, есть и другие новые записи! Обязательно проверьте на сайте!!";
            }
            if (html)
            {
                messageBody += String.Format(@"</body>");
                messageBody += "</html>";
            }
            return(messageBody);
        }
Example #2
0
 public ASVResponse(ASVRequest myReq, List <ASV> listResp)
 {
     this.MyRequest    = myReq;
     this.ListResponse = listResp;
 }