Exemple #1
0
 public static DTO.GMH convertToDTO(DAL.GMH g)
 {
     return(new DTO.GMH
     {
         GmhName = g.GmhName,
         GmhCode = g.GmhCode,
         Adress = g.Adress,
         e_mail = g.e_mail,
         Phone = g.Phone,
         CategoryCode = g.CategoryCode,
         UserCode = g.UserCode,
         comments = g.comments
     });
 }
Exemple #2
0
        public static void offerDonationMail(string subject, DTO.Donations donation, DAL.GMH gmh)
        {
            string email    = "*****@*****.**";
            string password = "******";
            //string email = ConfigurationManager.AppSettings["emailAddress"];
            // string password = ConfigurationManager.AppSettings["emailPassword"];
            // string Body = System.IO.File.ReadAllText(HttpContext.Current.Server.MapPath("http://*****:*****@"
<div dir=' ltr'>
                    <h1>מצאנו תרומה תואמת לבקשתך!</h1>
                   
                    <div style='
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    color: #0c5460;
    width: 50%;
    background-color: #d1ecf1;
    border-color: #bee5eb;'
>
<h3>במידה ואתה לוקח את התרומה אשר את קבלתה</h3>
<h2>פרטי תרומה</h2>
<label>שם: {0} </label>
                    <br />
                    <label> תיאור: {1}</ label>
                    <br />
                        <img [src]='https://localhost:44360/image/{2}' />

                    <br />              
                    <br />
<h2>פרטי מוסר</h2>
<label> שם: {3}</label>
                    <br />
                    <label>  כתובת:{4}</ label>
                    <br />
                    <label> פלאפון: {5}</label>
                    <br />
                    <label>  אימייל:{6}</label>
                    <br />
                    <br />
</div>
<div>
<div style='display: inline-block;'>
 <form action= 'https://localhost:44360/api/donation/donationAnswer/true/{7}/{8}' method ='post' >
                        <button type='submit'
                           style='display: inline-block;
                           font-weight: 400;
                           text-align: center;
                           vertical-align: middle;
                           -webkit-user-select: none;
                           -moz-user-select: none;
                           -ms-user-select: none;
                           user-select: none;
                           border: 1px solid transparent;
                           padding: 0.375rem 0.75rem;
                           font-size: 1rem;
                           line-height: 1.5;
                           border-radius: 0.25rem;
                           transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
                           color: #fff;
                           background-color: #28a745;
                           border-color: #28a745;'>
                        אני לוקח
                          </button>
                        </form>
</div>
                     <form action= 'https://localhost:44360/api/donation/donationAnswer/false/{7}/{8}' method ='post'>
                        <button type='submit'
                           style='display: inline-block;
                           font-weight: 400;
                           text-align: center;
                           vertical-align: middle;
                           -webkit-user-select: none;
                           -moz-user-select: none;
                           -ms-user-select: none;
                           user-select: none;
                           border: 1px solid transparent;
                           padding: 0.375rem 0.75rem;
                           font-size: 1rem;
                           line-height: 1.5;
                           border-radius: 0.25rem;
                           transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
                           color: #fff;
                           background-color: #dc3545;
                           border-color: #dc3545;'>
                       לא רלוונטי
                    </button>
                 </form>
                 </div>
</div>
                "
                    ,
                    donation.donationName,
                    donation.Description,
                    donation.Picture,
                    donation.donorName,
                    donation.Adress,
                    donation.Phone,
                    donation.donorEmail,
                    gmh.UserCode,
                    donation.donationCode

                    );

            msg.IsBodyHtml                   = true;
            smtpClient.EnableSsl             = true;
            smtpClient.UseDefaultCredentials = false;
            smtpClient.Credentials           = loginInfo;
            smtpClient.Send(msg);
        }