/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Page_Load(object sender, System.EventArgs e) { int contactId = Request.QueryString.ToString().IndexOf("CTID") > - 1 ? Convert.ToInt32(Request.QueryString["CTID"]) : 1744; this.m_contact = new OTCContact(contactId); switch(this.m_contact.OTCContactTypeId) { case (int)Contact.OTCContactType.BetterManContact: this.sendMessage("Betterman Contact","BetterMAN"); this.m_responseMessage = "<HTML><HEAD><TITLE>Thank You</TITLE></HEAD><style type=\"text/css\">h1 {font-family: Arial, Helvetica, sans-serif; font-size:18px; font-style: normal; line-height: 14px; font-weight: normal} h2 {font-family: Arial, Helvetica, sans-serif; font-size:14px; font-style: normal; line-height: 14px; font-weight: normal} p {font-family: Arial, Helvetica, sans-serif; font-size:12px; font-style: normal; line-height: 14px; font-weight: normal}</style> <BODY BGCOLOR=#FFFFFF><H1><b>Thank You</b></H1><h2>Important notice: save <a href=\"mailto:[email protected]\">[email protected]</a> in your email address book now to receive future notice about your winning of the prize, and our free bulletin and specials via email. Thank you. </h2><HR><P> Your message has been sent. Thank You. Click here to go to the <A HREF=\"http://www.bettermannow.com/interceuticals/betterman/index.html\"> BetterMAN Home Page</A></BODY></HTML>"; break; case (int)Contact.OTCContactType.BetterManWin3: this.sendMessage("Betterman Win 3","BetterMAN"); this.m_responseMessage = "<HTML><HEAD><TITLE>Thank You</TITLE></HEAD><style type=\"text/css\">h1 {font-family: Arial, Helvetica, sans-serif; font-size:18px; font-style: normal; line-height: 14px; font-weight: normal} h2 {font-family: Arial, Helvetica, sans-serif; font-size:14px; font-style: normal; line-height: 14px; font-weight: normal} p {font-family: Arial, Helvetica, sans-serif; font-size:12px; font-style: normal; line-height: 14px; font-weight: normal}</style> <BODY BGCOLOR=#FFFFFF><H1><b>Thank You</b></H1><h2>Important notice: save <a href=\"mailto:[email protected]\">[email protected]</a> in your email address book now to receive future notice about your winning of the prize, and our free bulletin and specials via email. Thank you. </h2><HR><P> Your message has been sent. Thank You. Click here to go to the <A HREF=\"http://www.bettermannow.com/interceuticals/betterman/index.html\"> BetterMAN Home Page</A></BODY></HTML>"; break; case (int)Contact.OTCContactType.BetterWomanContact: this.sendMessage("Betterwoman Contact","BetterWOMAN"); this.m_responseMessage = "<HTML><HEAD><TITLE>Thank You</TITLE></HEAD><style type=\"text/css\">h1 {font-family: Arial, Helvetica, sans-serif; font-size:18px; font-style: normal; line-height: 14px; font-weight: normal}h2 {font-family: Arial, Helvetica, sans-serif; font-size:14px; font-style: normal; line-height: 14px; font-weight: normal}p {font-family: Arial, Helvetica, sans-serif; font-size:12px; font-style: normal; line-height: 14px; font-weight: normal}</style><BODY BGCOLOR=#FFFFFF><H1><b>Thank You</b></H1><h2>Important notice: save <a href=\"mailto:[email protected]\">[email protected]</a> in your email address book now to receive future notice about your winning of the prize, and our free bulletin and specials via email. Thank you. </h2><HR><P> Your message has been sent. Thank You. Click here to go to the <A HREF=\"http://www.betterwomannow.com/\"> BetterWOMAN Home Page</A>.</BODY></HTML>"; break; case (int)Contact.OTCContactType.BetterWomanWin3: this.sendMessage("Betterwoman Win 3","BetterWOMAN"); this.m_responseMessage = "<HTML><HEAD><TITLE>Thank You</TITLE></HEAD><style type=\"text/css\">h1 {font-family: Arial, Helvetica, sans-serif; font-size:18px; font-style: normal; line-height: 14px; font-weight: normal}h2 {font-family: Arial, Helvetica, sans-serif; font-size:14px; font-style: normal; line-height: 14px; font-weight: normal}p {font-family: Arial, Helvetica, sans-serif; font-size:12px; font-style: normal; line-height: 14px; font-weight: normal}</style><BODY BGCOLOR=#FFFFFF><H1><b>Thank You</b></H1><h2>Important notice: save <a href=\"mailto:[email protected]\">[email protected]</a> in your email address book now to receive future notice about your winning of the prize, and our free bulletin and specials via email. Thank you. </h2><HR><P> Your message has been sent. Thank You. Click here to go to the <A HREF=\"http://www.betterwomannow.com/\"> BetterWOMAN Home Page</A>.</BODY></HTML>"; break; case (int)Contact.OTCContactType.InterceuticalsContact: this.sendMessage("Interceuticals Contact","Interceuticals"); this.m_responseMessage = "<HTML><HEAD><TITLE>Thank You</TITLE></HEAD><style type=\"text/css\">h1 {font-family: Arial, Helvetica, sans-serif; font-size:18px; font-style: normal; line-height: 14px; font-weight: normal}p {font-family: Arial, Helvetica, sans-serif; font-size:12px; font-style: normal; line-height: 14px; font-weight: normal}</style><BODY BGCOLOR=#FFFFFF><H1><b>Thank You</b></H1><HR><P>Your message has been sent. Thank You.Click here to go to the <A HREF=\"/interceuticals/index.html\"> Interceuticals Home Page</A>.</BODY></HTML>"; break; case (int)Contact.OTCContactType.NewsLetter: this.sendMessage("Interceuticals Newsletter","Interceuticals"); this.m_responseMessage = "<HTML><HEAD><TITLE>Thank You</TITLE></HEAD><style type=\"text/css\">h1 {font-family: Arial, Helvetica, sans-serif; font-size:18px; font-style: normal; line-height: 14px; font-weight: normal}p {font-family: Arial, Helvetica, sans-serif; font-size:12px; font-style: normal; line-height: 14px; font-weight: normal}</style><BODY BGCOLOR=#FFFFFF><H1><b>Thank You</b></H1><HR><P>Your message has been sent. Thank You.Click here to go to the <A HREF=\"/interceuticals/index.html\"> Interceuticals Home Page</A>.</BODY></HTML>"; break; } }
private void btnSave_Click(object sender, System.EventArgs e) { OTCContact c = new OTCContact(); c.OTCContactTypeId = (int)OTCContactType.BetterManWin3; c.Address = this.txtAddress.Text; c.Address2 = this.txtAddress2.Text; c.City = this.txtCity.Text; //c.Comment1 = this.txtHowDidYouHear.Text; depricated //c.Comment2 = this.txtCompany.Text; depricated c.Comment3 = this.txtComments.Value; c.CountryCode = this.txtCountry.Text; c.EmailAddress = this.txtEmailAddress.Text; c.FirstName = this.txtFirstName.Text; c.LastName = this.txtLastName.Text; c.PhoneNumber = this.txtPhone.Text; c.SiteId = 7; c.State = this.txtState.Text; c.Zip = this.txtZip.Text; c.WhereDidYouHear = this.txtHowDidYouHear.Text; c.Company = this.txtCompany.Text; Response.Redirect("thankyou.aspx?CTID=" + c.Add()); }
private void btnSave_Click(object sender, System.EventArgs e) { OTCContact c = new OTCContact(); c.Address = this.txtAddress.Text; c.Address2 = this.txtAddress2.Text; c.City = this.txtCity.Text; c.Comment1 = this.txtHowDidYouHear.Text; c.Comment2 = this.txtCompany.Text; c.Comment3 = this.txtComments.Value; c.EmailAddress = this.txtEmailAddress.Text; c.FirstName = this.txtFirstName.Text; c.LastName = this.txtLastName.Text; c.PhoneNumber = this.txtPhone.Text; c.SiteId = 7; c.State = this.txtState.Text; c.Zip = this.txtZip.Text; c.Add(); }