Esempio n. 1
0
        protected void btn_partner_Click(object sender, EventArgs e)
        {
            try
            {
                PARTNERS obj = new PARTNERS();
                obj.PARTNER_NAME = BLL.ReplaceQuote(txt_yourname.Text);
                obj.PARTNER_EMAIL = BLL.ReplaceQuote(txt_email.Text);
                obj.PARTNER_PHONENUMBER = txt_phonenumber.Text;
                obj.PARTNER_SUBJECT = BLL.ReplaceQuote(txt_subject.Text);
                obj.PARTNER_MESSAGE = BLL.ReplaceQuote(txt_comments.Text);
                obj.PARTNER_MODIFIEDBY = 1;
                DataTable dt = BLL.PARTNERE_MAIL(obj);
                DataTable dt_partners = new DataTable();
                bool status = BLL.INSERTPARTNER(obj);
                if (status == true)
                {
                    BLL.ShowMessage(this, "Thank you for contacting us, one of our executive will reach you soon");
                    clearcontrols();
                }
                else
                {
                    BLL.ShowMessage(this, "Please contact administrator");
                    clearcontrols();
                }

                MailMessage mailmessage = new MailMessage();
                mailmessage.IsBodyHtml = true;

                SmtpClient client = new SmtpClient("linkskart.com");
                client.Credentials = new System.Net.NetworkCredential("*****@*****.**", ".santhu143");
                mailmessage.From = new System.Net.Mail.MailAddress("*****@*****.**");
                // mailmessage.From = new MailAddress("*****@*****.**");
                mailmessage.To.Add(dt_partners.Rows[0]["PARTNER_EMAIL"].ToString());
                // mailmessage.CC.Add(emailid);
                mailmessage.Subject = "your account is created";
                mailmessage.Body = "<p> Dear " + dt_partners.Rows[0]["PARTNER_EMAIL"].ToString() + " " + ",<br /> <br />Your account is successfully created " + " please <a href=\"http://www.linkskart.com\">Click Here</a> to visit LINKSKART.</p></div>";
                client.EnableSsl = false;
                try
                {
                    client.Send(mailmessage);
                    //SmtpMail.Send(eMail);
                }
                catch (Exception ae)
                {
                    // Label1.Text = ae.Message;
                }

            }
            catch (Exception ex)
            {

            }
        }
Esempio n. 2
0
 internal static DataTable PARTNERE_MAIL(PARTNERS obj)
 {
     DataTable dt = BLL.ExecuteQuery("EXEC USP_PARTNERS @PARTNER_EMAIL='" + obj.PARTNER_EMAIL + "',@OPERATION='PARTNERE_MAIL''");
         return dt;
 }
Esempio n. 3
0
 internal static bool INSERTPARTNER(PARTNERS obj)
 {
     bool status = false;
     status = BLL.ExecuteNonQuery("EXEC USP_PARTNERS @PARTNER_NAME='" + obj.PARTNER_NAME + "',@PARTNER_EMAIL='" + obj.PARTNER_EMAIL + "',@PARTNER_PHONENUMBER='" + obj.PARTNER_PHONENUMBER + "',@PARTNER_SUBJECT='" + obj.PARTNER_SUBJECT + "',@PARTNER_MESSAGE='" + obj.PARTNER_MESSAGE + "',@PARTNER_CREATEDBY=1,@OPERATION='INSERTPARTNER'");
     return status;
 }