. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| 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/ |
Upload File : |
using BLL.Bo;
using BLL.Services;
using GrowelBLL.Services;
using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GrowelWeb
{
public partial class GetSubPage : System.Web.UI.Page
{
public string subpage = "";
string page = "";
public string section = "";
public string control = "";
public string cover = "";
public string pg_title = "";
public string pg_subtitle = "";
public string pg_body = "";
public string siteurl = "";
protected void Page_Load(object sender, EventArgs e)
{
try
{
siteurl = clsComman.value("SiteUrl");
subpage = Request.QueryString["subpage"].ToString();
//Response.Write(subpage);
BindPage();
//HtmlAnchor c = (HtmlAnchor)this.Master.FindControl("lnk" + section);
////Response.Write(c.ClientID.ToString());
//c.Attributes.Add("class", "active");
}
catch (Exception ex)
{
// throw ex;
}
}
public void BindPage()
{
try
{
TextInfo textInfo = new CultureInfo("en-US", false).TextInfo;
AdminService adminService = new AdminService();
DataSet ds = new DataSet();
ds = adminService.GetSubPageDetails(subpage);
string subpagetitle = ds.Tables[0].Rows[0]["subpage_displaytitle"].ToString();
page = ds.Tables[0].Rows[0]["page"].ToString();
string sub_page = ds.Tables[0].Rows[0]["subpage"].ToString();
pg_subtitle = textInfo.ToTitleCase(page) + " >> " + textInfo.ToTitleCase(subpagetitle);
pg_title = subpagetitle;
DataSet pds = adminService.GetPageDetails(page);
section = pds.Tables[0].Rows[0]["section"].ToString();
cover = ds.Tables[0].Rows[0]["cover"].ToString();
// IF Download pages
DataSet dsDownload = adminService.GetDownloadPaes(sub_page);
if (dsDownload.Tables[0].Rows.Count > 0)
{
StringBuilder sb = new StringBuilder();
//sb.Append(" <table class='table-custom table-custom-striped table-custom-primary' style='border-collapse: collapse; border-spacing: 0px; border: 1px solid #cccccc;' width='80%'>");
//foreach (DataRow dr in dsDownload.Tables[0].Rows)
//{
// sb.Append("<tr>");
// sb.Append("<td><img src= '" + siteurl + "images/Uploads/pdf-icon.png' width='25px' height='25px' /> <a onclick = \"DownloadFile('" + dr["Name"] + "','" + dr["FileName"] +"')\" >" + dr["Name"] + "</a></td> ");
// sb.Append("</tr>");
//}
//sb.Append("</table>");
sb.Append("<section class='section section-md bg-white'>");
sb.Append("<div class='shell'>");
sb.Append("<div class='range range-70 '>");
sb.Append(" <div class='cell-sm-12 cell-md-12'>");
sb.Append(" <h4><b> " + pg_title + "</h4>");
sb.Append(" </div>");
sb.Append("</div>");
// sb.Append("<div class='range range-md-center text-center'>");
sb.Append("<div class='range range-md text-center'>");
string imgName;
foreach (DataRow dr in dsDownload.Tables[0].Rows)
{
if (Convert.ToString(dr["imgName"]) != "")
imgName = siteurl + "images/download/" + Convert.ToString(dr["imgName"]);
else
imgName = siteurl + "Includes/images/noimg.jpg";
sb.Append("<div class='cell-sm-6 cell-md-4'>");
//sb.Append("<h5 style='margin-bottom: 10px;'>" + dr["Name"] + "</h5>");
sb.Append(" <div style='min-height: 50px;'> <time class='post-minimal__time'>" + dr["Name"] + "</time></div>");
sb.Append("<a style='cursor:pointer;' onclick = \"DownloadFile('" + dr["Name"] + "','" + dr["FileName"] + "')\" >");
sb.Append("<img class='img-fluid' style='margin-bottom: 20px;border: 1px solid #d6d6d6;' src='" + imgName + "' /></a>");
sb.Append("</div>");
}
sb.Append("</div>");
sb.Append("</div>");
sb.Append("</section>");
litdownload.Text = sb.ToString();
}
else
{
//SectionLinks1.pagename = section;
this.dtlstpagedetails.DataSource = ds.Tables[0].DefaultView;
this.dtlstpagedetails.DataBind();
this.Title = "Growel | " + ds.Tables[0].Rows[0]["subpage_displaytitle"].ToString();
}
}
catch (Exception ex)
{
throw ex;
}
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
EnquiryBo bo = new EnquiryBo();
EnquiryService enquiryService = new EnquiryService();
bo.Type = subpage;
bo.ClientName = txtname.Text;
bo.EmailId = txtemail.Text;
bo.EnquiryType = "Download";
bo.MobileNo = txtmobile.Text;
bo.Country = "";
bo.StateName = "";
bo.ContactPerson = "";
bo.Address = "";
bo.Description = hdnName.Value;
Int64 Id = enquiryService.AddEnquiry(bo);
if (Id > 0)
{
SendMail();
Response.Redirect(siteurl + "Thanks-you.aspx?ty=mail");
}
else
{
}
}
public void SendMail()
{
string subject = "Growel - Download";
string message =
"Dear " + txtname.Text +", <br>" +
"Thankyou for your interest. <br>" +
"Kindly click on the link to download the brochure.<br>" +
"<a href='" + siteurl + "downloads/brochures/" + hdnFileName.Value + "' target='_blank' ><b>" + hdnName.Value + "</b></a><br><br>" +
"Best Regards<br>" +
"<b>Grauer & Weil India Ltd.</b>";
clsComman cls = new clsComman();
cls.SendMail(subject, message);
cls.SendMail1(subject, message, txtemail.Text);
//MailMessage mymail = new MailMessage();
//mymail.To.Add(txtemail.Text);
////mymail.CC.Add("harshad.umrotkar@growel.com");
//mymail.CC.Add("corporatecommunications@growel.com");
//mymail.From = new MailAddress("webmaster@growel.com", "Growel");
//mymail.Subject = subject;
//mymail.IsBodyHtml = true;
//mymail.Body = message;
////NetworkCredential n = new NetworkCredential("webmaster@growel.com", "webmaster@1000");
////SmtpClient s = new SmtpClient("14.142.80.201", 25);
////s.Credentials = n;
//SmtpClient smt = new SmtpClient("smtp.office365.com", 587);
//System.Net.NetworkCredential ntwd = new NetworkCredential("webmaster@growel.com", "Samsung@879");
//smt.EnableSsl = true;
//smt.TargetName = "STARTTLS/smtp.office365.com"; // Set to avoid MustIssueStart
//smt.Send(mymail);
}
}
}