Ejemplo n.º 1
0
        protected void btnsubmit_Click(object sender, EventArgs e)
        {

            BAL.remmessage ObjMess = new BAL.remmessage();

            string k = DAL.htmlromve.StripTagsRegex(CKEditorControl1.Text);
            string kk = DAL.htmlromve.StripTagsRegexCompiled(CKEditorControl1.Text);
            ObjMess.firstname = txtname.Text;
            ObjMess.surname = TxtSurname.Text;
            ObjMess.email = txtEmail.Text;
            ObjMess.rem_message = CKEditorControl1.Text;
            ObjMess.remembranceid = Convert.ToInt32(Request.QueryString["remembranceid"]);
            ObjMess.flowername = Request["flower"];
            ObjMess.onlineStatus =0;
            DAL.general objGen = new DAL.general();
            bool f = objGen.insertremembrancemessage(ObjMess);
            if (f)
            {
               
                
                
                DAL.general objGener = new DAL.general();
                string bodym = "<p align='left'>A new Tribute Message has been created on bmdnotices.com.<br> <a href='http://bmdnotices.com/AdminBMD/login.aspx' target='_blank'>Approve here</a></p>"; ;
          
                //string bodym = "<p align='left'>one more message added on to Tribute. page.</p>";
                objGener.Send_Mail("*****@*****.**", "Add message message to Tribute", bodym, "");

                string mbody = "<p align='left'>Dear Sir/Madam,<br><br>Thank you for submitting your Message to the Remembrance Garden Page.<br>Your Message will be reviewed within 24 hours.<br> You will receive an email notification once the Message is published <br><br><br> Thank You, <br>BMDnotices Team<p/>";
                objGener.Send_Mail(txtEmail.Text, "BMDnotices Message", mbody, "");

                ScriptManager.RegisterClientScriptBlock(this, GetType(), "succes", "succes();", true);
                cleardata();
                 binddata();
            }else
            {
                ScriptManager.RegisterClientScriptBlock(this, GetType(), "Worng", "worn();", true);
     
            }
            

        }