. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 87.98.249.37 / Your IP : 216.73.216.208 [ Web Server : Microsoft-IIS/10.0 System : Windows NT NS3076740 10.0 build 17763 (Windows Server 2019) AMD64 User : IWPD_292(growel19p) ( 0) PHP Version : 8.3.12 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Inetpub/vhosts/growel.com/httpdocs/Forms/ |
Upload File : |
using BLL.Bo;
using BLL.Services;
using GrowelBLL.Services;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GrowelWeb.Forms.assets
{
public partial class joinus_form : System.Web.UI.Page
{
string siteurl;
protected void Page_Load(object sender, EventArgs e)
{
siteurl = clsComman.value("SiteUrl");
}
protected void ValidateCaptcha(object sender, ServerValidateEventArgs e)
{
// Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim());
// e.IsValid = Captcha1.UserValidated;
// if (e.IsValid)
// {
// }
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
if (txtCaptcha.Text.ToLower() == Session["CaptchaVerify"].ToString())
{
SaveData();
}
else
{
lblCaptchaMessage.Text = "Please enter correct captcha !";
lblCaptchaMessage.ForeColor = System.Drawing.Color.Red;
ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "ShowPopup();", true); //this.GetType(), "Popup", "ShowPopup();", true);
}
}
private void SaveData()
{
EnquiryBo bo = new EnquiryBo();
EnquiryService enquiryService = new EnquiryService();
string url = Request.RawUrl;
bo.Type = "";
bo.ClientName = txtname.Text;
bo.ContactPerson = txtCompanyName.Text;
bo.EmailId = txtemail.Text;
bo.EnquiryType = "Job Post";
bo.MobileNo = txtmobile.Text;
bo.Country = "";//
bo.StateName = "";//
bo.Address = "";
bo.Description = txtMessages.Text;//
string strFileName = "";
if (this.flresume.HasFile)
{
FileInfo f = new FileInfo(this.flresume.PostedFile.FileName.ToString());
strFileName = f.Name;
this.flresume.PostedFile.SaveAs(Server.MapPath("..") + @"\upload\resume\" + strFileName);
}
//bo.LinkedinProfileLink = txtlikedinprofile.Text;
bo.ResumeName = strFileName;
Int64 Id = enquiryService.AddEnquiry(bo);
if (Id > 0)
{
SendMail("Join Us : Job Post", txtname.Text,txtCompanyName.Text, txtmobile.Text, txtemail.Text, txtMessages.Text, strFileName);
Response.Redirect(siteurl + "Forms/Thanks-you.aspx");
}
else
{
}
}
private void SendMail(string subject, string Name, string companyName, string Mobile, string Email, string Feedback, string ResumeFile)
{
//string subject = "Growel - Downlooad";
string message =
"Dear " + Name + ", <br>" +
"<table width='500' border='0' align='center' cellpadding='10' cellspacing='4' style='font-family:Arial, Helvetica, sans-serif;font-size:12px;border:1px solid #ddd;'><tr><td colspan='2' align='center' valign='top'><p><img src='https://growel.com/Includes/images/logo.png'>" +
"</p></td></tr><tr><td width='200' align='right' valign='top'>" +
"<strong>Name Of The Person </strong></td><td>" + Name + "</td></tr>" +
"<tr><td width='200' align='right' valign='top'>" +
"<strong>Comapny Name </strong></td><td>" + companyName + "</td></tr>" +
"<tr><td align='right' valign='top'><strong>Contact No </strong></td><td>" + Mobile + "</td></tr>" +
"<tr><td align='right' valign='top'><strong>Email</strong></div></td><td>" + Email + "</td></tr>" +
"<tr><td align='right' valign='top'><strong>Message</strong></td><td>" + Feedback + "</td></tr>";
message += "<tr><td align='right' valign='top'> </td><td> </td></tr></table><p> </p>";
clsComman clsComman = new clsComman();
string AttachementFile = "";
if (ResumeFile != "")
AttachementFile = System.AppDomain.CurrentDomain.BaseDirectory + "upload/resume/" + ResumeFile;
clsComman.SendMail(subject, message, AttachementFile);
}
}
}