public void insert() { string regin; if (drlistRegionCounty.Text != "") { regin = drlistRegionCounty.Text; } else { regin = txtregion.Text; } BAL.inmemorial objInmorial = new BAL.inmemorial(); objInmorial.name = txtname.Text; objInmorial.email = txtemail.Text; objInmorial.country = DropDownList1.Text; objInmorial.townCity = txtcitytown.Text; objInmorial.regionCounty = regin; objInmorial.mess = CKEditorControl1.Text; string kk = DAL.htmlromve.StripTagsRegexCompiled(CKEditorControl1.Text); objInmorial.pmess = kk; objInmorial.dessurname = txtdecsurname.Text; objInmorial.desname = txtdecname.Text; objInmorial.desemail = txtemaildes.Text; objInmorial.active = 0; objInmorial.img = fpi; DAL.general bjGen = new DAL.general(); bool f = bjGen.insertinmemorial(objInmorial); if (f) { string body = infoBody1(txtname.Text, "", txtdecname.Text, txtdecsurname.Text, CKEditorControl1.Text, fpi); DAL.general objGen = new DAL.general(); string mbody = "<p align='left'>Dear Sir/Madam,<br><br>Thank you for creating an In Memoriam Notice. It will be reviewed within 24 hours.<br>You will receive an email notification once the In Memoriam is published.<br><br><br> Thank You, <br>BMDnotices Team<p/>"; objGen.Send_Mail(txtemail.Text, "BMDnotices In Memoriam", mbody, ""); string bodym = "<p align='left'>A new In Memoriam Notice 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 In Memory Card. page.</p>"; DAL.general objGener = new DAL.general(); objGener.Send_Mail("*****@*****.**", "New In Memoriam For Approval", bodym, ""); Response.Redirect("thankyoupostin.aspx"); } else { ScriptManager.RegisterClientScriptBlock(this, GetType(), "Worng", "worn();", true); } }
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); } }
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "Approved") { BAL.inmemorial objrem = new BAL.inmemorial(); objrem.cid =Convert.ToInt32( e.CommandArgument); objrem.active = 0; DAL.general objGen = new DAL.general(); objGen.updateinmomoriyamstatus(objrem); } else if (e.CommandName == "Pending") { BAL.inmemorial objrem = new BAL.inmemorial(); objrem.cid = Convert.ToInt32(e.CommandArgument); objrem.active = 1; DAL.general objGen = new DAL.general(); bool f= objGen.updateinmomoriyamstatus(objrem); DataSet ds = objGen.getdataset("select * from inmemorialcardtdl where cid=" + Convert.ToInt32(e.CommandArgument) + ""); if(f) { try { string link= "http://bmdnotices.com/remembrance-garden-book/viewinmemoriam.aspx?cid=" + Convert.ToString(e.CommandArgument); string postNewInMemoriumLink = " <a href='http://www.bmdnotices.com/remembrance-garden-book/Post-inmemorial-card.aspx'>click here</a>."; string mail = "<p align='left'>Dear Sir/Madam,<br><br>The In Memoriam Notice you created has now been approved and is ready for you to view on bmdnotices.com website.<br>You are welcome to send as many In Memoriams as you like.<br>Please note that you can also add your messages, tributes and in memoriams to existing Pages in our Remembrance Garden Book. <br>If you would like to create such a Page, please"+postNewInMemoriumLink +"<br>You can view your In Memoriam Notice here: " + link + "<br><br><br> Thank You, <br>BMDnotices Team</p>"; // string mail = "<p align='left'>Dear Sir / Madam,<br><br>Your Card has now been approved and is ready for you to view on bmdnotices.com website.<br>You are welcome to send as many Cards as you like.<br>Please note that you can also add your messages, tributes and in memorials to existing Pages in our Remembrance Garden Book. <br>If you would like to create such a Page, please clik here.<br> You can view your Card here:" + link + "<br><br><br> Thank You, <br>BMDnotices Team"; objGen.Send_Mail(Convert.ToString(ds.Tables[0].Rows[0]["email"]), "BMDnotices In Memoriam Approved", mail, ""); string body = infoBody1(Convert.ToString(ds.Tables[0].Rows[0]["name"]), "", Convert.ToString(ds.Tables[0].Rows[0]["desname"]), Convert.ToString(ds.Tables[0].Rows[0]["dessurname"]), Convert.ToString(ds.Tables[0].Rows[0]["mess"]), Convert.ToString(ds.Tables[0].Rows[0]["img"])); string[] words = Convert.ToString(ds.Tables[0].Rows[0]["desemail"]).Split(','); foreach (string word in words) { objGen.Send_Mail(word, "BMDnotices In Memoriam Notice has been shared with you", body, ""); } } catch (Exception) { } } } else if (e.CommandName == "Delete") { BAL.inmemorial objrem = new BAL.inmemorial(); objrem.cid = Convert.ToInt32(e.CommandArgument); DAL.general objGen = new DAL.general(); objGen.deleteinmomoriyamstatus(objrem); } else { if (e.CommandName == ViewState["Column"].ToString()) { if (ViewState["Sortorder"].ToString() == "ASC") ViewState["Sortorder"] = "DESC"; else ViewState["Sortorder"] = "ASC"; } else { ViewState["Column"] = e.CommandName; ViewState["Sortorder"] = "ASC"; } } bindData1(); }
public void insertdata() { string regin; if (drlistRegionCounty.Text != "") { regin = drlistRegionCounty.Text; } else { regin = txtregion.Text; } BAL.remembrance objRemebmrance = new BAL.remembrance(); objRemebmrance.country = DropDownList1.Text; objRemebmrance.regionCounty = regin; objRemebmrance.townCity = txtcitytown.Text; objRemebmrance.address = txtaddress.Text.Replace(Environment.NewLine, "<br />"); objRemebmrance.message = CKEditorControl1.Text; objRemebmrance.name = txtname.Text; objRemebmrance.number = txtphone.Text; objRemebmrance.email = txtemail.Text; objRemebmrance.active = 0; objRemebmrance.img3 = mi; objRemebmrance.capa = txtcap3.Text; if (HiddenPageOfType.Value.ToString() == "1") { objRemebmrance.type = 0; if (HiddenPersonofSex.Value.ToString() == "1") { objRemebmrance.cattype = "M"; objRemebmrance.name1 = txtfistname.Text; objRemebmrance.deathdate1 = Convert.ToString(ddlday1.SelectedValue.ToString() + " " + ddlmonth1.SelectedValue.ToString() + " " + ddlyear1.SelectedValue.ToString()); objRemebmrance.img1 = fpi; objRemebmrance.img2 = "2.jpg"; objRemebmrance.Surname1 = txtsurname.Text; objRemebmrance.capm = txtcap1.Text; } else { objRemebmrance.cattype = "F"; objRemebmrance.name2 = txtfemale.Text; objRemebmrance.middlename = txtmaiden.Text; objRemebmrance.deathdate2 = Convert.ToString(ddlday2.SelectedValue.ToString() + " " + ddlmonth2.SelectedValue.ToString() + " " + ddlyear2.SelectedValue.ToString()); objRemebmrance.img2 = spi; objRemebmrance.img1 = "1.jpg"; objRemebmrance.capf = txtcap2.Text; objRemebmrance.Surname1 = TextFemaleSurname.Text; } } else { objRemebmrance.Surname1 = txtsurname.Text; objRemebmrance.type = 1; objRemebmrance.cattype = "N"; objRemebmrance.name1 = txtfistname.Text; objRemebmrance.deathdate1 = Convert.ToString(ddlday1.SelectedValue.ToString() + " " + ddlmonth1.SelectedValue.ToString() + " " + ddlyear1.SelectedValue.ToString()); objRemebmrance.img1 = fpi; objRemebmrance.name2 = txtfemale.Text; objRemebmrance.middlename = txtmaiden.Text; objRemebmrance.deathdate2 = Convert.ToString(ddlday2.SelectedValue.ToString() + " " + ddlmonth2.SelectedValue.ToString() + " " + ddlyear2.SelectedValue.ToString()); objRemebmrance.img2 = spi; objRemebmrance.capm = txtcap1.Text; objRemebmrance.capf = txtcap2.Text; } DAL.general objGeneral = new DAL.general(); bool f = objGeneral.insertremembrance(objRemebmrance); if (f) { string body = "A new Remembrance Graden page has been created on bmdnotices.com.<br> <a href='http://bmdnotices.com/AdminBMD/login.aspx' target='_blank'>Approve here</a></p>"; DAL.general objGener = new DAL.general(); objGener.Send_Mail("*****@*****.**", "Remembrance garden add page", body, ""); string mbody = "<p align='left'>Dear Sir/Madam,<br><br> Thank you for creating a Page in the Remembrance Garden Book.<br> Your Page will be reviewed within 24 hours.<br>You will receive an email notification once the Page is published. <br><br><br> Thank You, <br>BMDnotices Team</p>"; objGener.Send_Mail(txtemail.Text, "BMDnotices Remembrance Garden Page", mbody, ""); Response.Redirect("thankyoupost.aspx"); } else { ScriptManager.RegisterClientScriptBlock(this, GetType(), "Worng", "worn();", true); } }
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { string s = e.CommandName; if (e.CommandName == "Approved") { BAL.remembrance objrem = new BAL.remembrance(); objrem.rid =Convert.ToInt32( e.CommandArgument); objrem.active = 0; DAL.general objGen = new DAL.general(); objGen.updateremembrancestatus(objrem); } else if (e.CommandName == "Pending") { BAL.remembrance objrem = new BAL.remembrance(); objrem.rid = Convert.ToInt32(e.CommandArgument); objrem.active = 1; DAL.general objGen = new DAL.general(); bool f= objGen.updateremembrancestatus(objrem); DataSet ds = objGen.getdataset("select * from remembrancetdl where rid=" + Convert.ToInt32(e.CommandArgument) + ""); if(f) { try { string link="<a href='http://bmdnotices.com/remembrance-garden-book/viewremembrance.aspx?remembranceid="+Convert.ToString(e.CommandArgument) + "'>View the Page:</a>"; string mail = "<p align='left'>Dear Sir/Madam,<br><br> Your Remembrance Garden Page has now been approved and is ready for you to view on bmdnotices.com website.<br>Please feel free to start adding messages, tributes or in memorials directly on that Page.<br> You can also share this Page with your family and friends and encourage them to post their own tributes there. Should you, at any stage, wish to change the wording of the Page you created, please contact us be email and will we be happy to make these changes for you. <br> " + link + " <br><br><br> Thank You, <br> BMDnotices Team"; objGen.Send_Mail(Convert.ToString(ds.Tables[0].Rows[0]["email"]), "BMDnotices Remembrance Garden Page Approved", mail, ""); } catch (Exception) { } } } else if (e.CommandName == "Delete") { BAL.remembrance objrem = new BAL.remembrance(); objrem.rid = Convert.ToInt32(e.CommandArgument); DAL.general objGen = new DAL.general(); objGen.deleteremembrancestatus(objrem); objGen.deletetribut(Convert.ToInt32(e.CommandArgument)); } else { if (e.CommandName == ViewState["Column"].ToString()) { if (ViewState["Sortorder"].ToString() == "ASC") ViewState["Sortorder"] = "DESC"; else ViewState["Sortorder"] = "ASC"; } else { ViewState["Column"] = e.CommandName; ViewState["Sortorder"] = "ASC"; } } bindData1(); }