// TODDO NNM //private void SendMail(QuoteBO objQuote, string mailSubject) //{ // try // { // string mailcc = string.Empty; // List<QuoteChangeEmailListBO> lstQuoteChangeEmailListCC = (new QuoteChangeEmailListBO()).SearchObjects().Where(o => o.IsCC == true).ToList(); // foreach (QuoteChangeEmailListBO ccList in lstQuoteChangeEmailListCC) // { // UserBO objUser = new UserBO(); // objUser.ID = (int)ccList.User; // objUser.GetObject(); // mailcc += objUser.EmailAddress + ","; // } // string emailContent = string.Empty; // string emailTemp = QuoteEmailTemplate; // string emailLogoPath = string.Empty; // if (!string.IsNullOrEmpty(objQuote.JobName)) // { // emailContent += " <tr>" + // "<td width=\"200\" style=\"border-left:0px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Job Name" + "</td>" + // "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + objQuote.JobName + "</td>" + // "</tr>"; // } // if (objQuote.Pattern != null && objQuote.Pattern > 0) // { // emailContent += " <tr>" + // "<td width=\"200\" style=\"border-left:0px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Item" + "</td>" + // "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + objQuote.objPattern.Number + "-" + objQuote.objPattern.NickName + "</td>" + // "</tr>"; // } // if (objQuote.IndimanPrice != null && objQuote.IndimanPrice > 0) // { // string currency = (objQuote.Currency != null && objQuote.Currency > 0) ? objQuote.objCurrency.Code : string.Empty; // string priceterm = (objQuote.PriceTerm != null && objQuote.PriceTerm > 0) ? objQuote.objPriceTerm.Name : string.Empty; // emailContent += " <tr>" + // "<td width=\"200\" style=\"border-left:0px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Price" + "</td>" + // "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + currency + " " + Convert.ToDecimal(objQuote.IndimanPrice).ToString("0.00") + " " + priceterm + "</td>" + // "</tr>"; // } // if (objQuote.Qty != null && objQuote.Qty != 0) // { // emailContent += " <tr>" + // "<td width=\"200\" style=\"border-left:1px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Indicated Quantity" + "</td>" + // "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + objQuote.Qty.ToString() + "</td>" + // "</tr>"; // } // if (objQuote.DeliveryDate != null) // { // emailContent += " <tr>" + // "<td width=\"200\" style=\"border-left:0px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Approx. despatch date" + "</td>" + // "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + Convert.ToDateTime(objQuote.DeliveryDate).ToString("dd MMMM yyyy") + "</td>" + // "</tr>"; // } // if (objQuote.QuoteExpiryDate != null) // { // emailContent += " <tr>" + // " <td width=\"200\" style=\"border-left:0px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Expires On" + "</td>" + // " <td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + Convert.ToDateTime(objQuote.QuoteExpiryDate).ToString("dd MMMM yyyy") + "</td>" + // " </tr>"; // } // if (!string.IsNullOrEmpty(objQuote.Notes)) // { // emailContent += " <tr>" + // "<td width=\"200\" style=\"border-left:1px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Notes" + "</td>" + // "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + objQuote.Notes + "</td>" + // "</tr>"; // } // if (objQuote.Distributor != null && objQuote.Distributor > 0) // { // emailContent += " <tr>" + // "<td width=\"200\" style=\"border-left:1px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Distributor" + "</td>" + // "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + objQuote.objDistributor.Name + "</td>" + // "</tr>"; // } // emailTemp = emailTemp.Replace("<$tabledata$>", emailContent); // emailTemp = emailTemp.Replace("<$contactname$>", (!string.IsNullOrEmpty(objQuote.ContactName)) ? objQuote.ContactName : string.Empty); // string designation = (!string.IsNullOrEmpty(LoggedUser.Designation)) ? (" | " + LoggedUser.Designation) : string.Empty; // emailTemp = emailTemp.Replace("<$name$>", LoggedUser.GivenName + " " + LoggedUser.FamilyName + "" + designation); // emailTemp = emailTemp.Replace(" <$email$>", objQuote.objCreator.EmailAddress); // emailTemp = emailTemp.Replace(" <$phone$>", objQuote.objCreator.OfficeTelephoneNumber); // emailTemp = emailTemp.Replace("<$Mobile$>", (objQuote.objCreator.MobileTelephoneNumber != null && !string.IsNullOrEmpty(objQuote.objCreator.MobileTelephoneNumber)) ? objQuote.objCreator.MobileTelephoneNumber : string.Empty); // emailTemp = emailTemp.Replace("<$fax$>", LoggedUser.objCompany.Fax); // EmailLogoBO objEmailLogo = new EmailLogoBO().SearchObjects().SingleOrDefault(); // if (objEmailLogo != null) // { // emailLogoPath = IndicoConfiguration.AppConfiguration.DataFolderName + "/EmailLogos/" + objEmailLogo.EmailLogoPath; // if (!File.Exists(Server.MapPath(emailLogoPath))) // { // emailLogoPath = IndicoConfiguration.AppConfiguration.DataFolderName + "/EmailLogos/logo_login.png"; // } // } // else // { // emailLogoPath = IndicoConfiguration.AppConfiguration.DataFolderName + "/EmailLogos/logo_login.png"; // } // System.Drawing.Image Image = System.Drawing.Image.FromFile(IndicoConfiguration.AppConfiguration.PathToProjectFolder + "/" + emailLogoPath); // SizeF emailLogo = Image.PhysicalDimension; // Image.Dispose(); // List<float> lstVLImageDimensions = (new ImageProcess()).GetResizedImageDimensionForHeight(Convert.ToInt32(Math.Abs(emailLogo.Width)), Convert.ToInt32(Math.Abs(emailLogo.Height)), 100); // if (File.Exists(IndicoConfiguration.AppConfiguration.PathToProjectFolder + "/" + emailLogoPath)) // { // emailLogoPath = "http://" + IndicoConfiguration.AppConfiguration.SiteHostAddress + "/" + emailLogoPath; // emailTemp = emailTemp.Replace("<$logoimage$>", "<img src=\"" + emailLogoPath + "\" height=\"" + lstVLImageDimensions[0].ToString() + "\" width=\"" + lstVLImageDimensions[1].ToString() + "\"/>"); // } // if (!string.IsNullOrEmpty(mailcc)) // { // IndicoEmail.SendMail(objQuote.objCreator.GivenName + " " + objQuote.objCreator.FamilyName, objQuote.objCreator.EmailAddress, objQuote.ContactName, objQuote.ClientEmail, mailcc, "Quote: QT- " + objQuote.ID + mailSubject, null, "", false, emailTemp); // } // } // catch (Exception ex) // { // IL.log.Error("Error occured while send email from CheckQuotes", ex); // } //} private void SendMail(QuoteBO objQuote, string mailSubject) { try { string mailcc = string.Empty; List <QuoteChangeEmailListBO> lstQuoteChangeEmailListCC = (new QuoteChangeEmailListBO()).SearchObjects().Where(o => o.IsCC == true).ToList(); foreach (QuoteChangeEmailListBO ccList in lstQuoteChangeEmailListCC) { UserBO objUser = new UserBO(); objUser.ID = (int)ccList.User; objUser.GetObject(); mailcc += objUser.EmailAddress + ","; } //string emailContent = CheckQuotes.CreateQuoteDetailBody(objQuote); //string emailTemp = QuoteEmailTemplate; //string emailTemp = CheckQuotes.CreateQuoteDetailBody(objQuote); string emailTemp = GenerateOdsPdf.CreateQuoteDetail(objQuote); string emailLogoPath = string.Empty; string[] attachment = { GenerateOdsPdf.CreateQuoteDetailAttachments(objQuote.ID) }; if (!string.IsNullOrEmpty(mailcc)) { IndicoEmail.SendMail(objQuote.objCreator.GivenName + " " + objQuote.objCreator.FamilyName, objQuote.objCreator.EmailAddress, objQuote.ContactName, objQuote.ClientEmail, mailcc, "quote: qt- " + objQuote.ID + mailSubject, null, "", false, emailTemp); } } catch (Exception ex) { IL.log.Error("Error occured while send email from CheckQuotes", ex); } }
protected void btnPrintReport_Click(object sender, EventArgs e) { if (this.WeekEndDate != null && this.WeekEndDate != new DateTime(1001, 1, 1)) { string pdfpath = GenerateOdsPdf.GeneratePackingReportPDF(this.WeekEndDate); if (File.Exists(pdfpath)) { this.DownloadPDFFile(pdfpath); } } }
protected void btnClientPackingList_Click(object sender, EventArgs e) { if (this.WeekEndDate != null && this.WeekEndDate != new DateTime(1001, 1, 1)) { string pdfpath = GenerateOdsPdf.GenerateClientPackingListReport(this.WeekEndDate, int.Parse(this.ddlShipmentMode.SelectedValue), int.Parse(this.ddlShippingAddress.SelectedValue)); if (File.Exists(pdfpath)) { this.DownloadPDFFile(pdfpath); } } }
protected void OnbtnCreateBatchLabelClick(object sender, EventArgs e) { var weekenddate = Convert.ToDateTime(((WebControl)(sender)).Attributes["wdate"]); try { var pdfpath = GenerateOdsPdf.CreateBathLabel(weekenddate); DownloadPDFFile(pdfpath); } catch (Exception ex) { IndicoLogging.log.Error("Error occurred while creating Batch Label in side ViewWeeklyCapacities.aspx", ex); } }
protected void OnbtnCreateShipmentDetailClick(object sender, EventArgs e) { var weekenddate = Convert.ToDateTime(((WebControl)(sender)).Attributes["wdate"]); try { var pdfpath = GenerateOdsPdf.GenerateShippingDetailsPDF(weekenddate); if (File.Exists(pdfpath)) { DownloadPDFFile(pdfpath); } } catch (Exception ex) { IndicoLogging.log.Error("Error occurred while creating Shipping Detail in side ViewWeeklyCapacities.aspx", ex); } }
private void GenerateResetCarton() { //NNM string imageLocation = IndicoConfiguration.AppConfiguration.PathToDataFolder + "\\Barcode\\" + Guid.NewGuid() + "\\"; Directory.CreateDirectory(imageLocation); string tempPath = imageLocation + "temp.jpg"; Bitmap lblBM = new Bitmap(400, 275); using (Graphics gfx = Graphics.FromImage(lblBM)) using (SolidBrush brush = new SolidBrush(Color.White)) { gfx.FillRectangle(brush, 0, 0, 400, 275); } lblBM.Save(tempPath); string imagePath = GenerateBarcode.GenerateResetLabel(lblBM, "Reset", imageLocation); string pdfPath = GenerateOdsPdf.PrintResetBarcode(imageLocation, imagePath); lblBM.Dispose(); File.Delete(tempPath); // download pdf if (File.Exists(pdfPath)) { this.DownloadPDFFile(pdfPath); } // delete image file if (File.Exists(imagePath)) { File.Delete(imagePath); } }
private void GenerateLabels(List <PackingList> lstPackingList) { string imageLocation = IndicoConfiguration.AppConfiguration.PathToDataFolder + "\\Barcode\\" + Guid.NewGuid() + "\\"; Directory.CreateDirectory(imageLocation); string tempPath = imageLocation + "temp.jpg"; foreach (PackingList obj in lstPackingList) { Bitmap lblBM = new Bitmap(400, 275); using (Graphics gfx = Graphics.FromImage(lblBM)) using (SolidBrush brush = new SolidBrush(Color.White)) { gfx.FillRectangle(brush, 0, 0, 400, 275); } lblBM.Save(tempPath); string labelText = string.Empty; string qty = string.Empty; List <KeyValuePair <int, string> > listOrderDetails = new List <KeyValuePair <int, string> >(); foreach (PackingListViewBO objPackingList in obj.ListPackingList) { qty = string.Empty; listOrderDetails.Add(new KeyValuePair <int, string>(objPackingList.PackingList.Value, objPackingList.OrderNumber.Value.ToString())); listOrderDetails.Add(new KeyValuePair <int, string>(objPackingList.PackingList.Value, objPackingList.Client)); listOrderDetails.Add(new KeyValuePair <int, string>(objPackingList.PackingList.Value, objPackingList.VLName)); PackingListSizeQtyBO objSizeQty = new PackingListSizeQtyBO(); objSizeQty.PackingList = objPackingList.PackingList.Value; foreach (PackingListSizeQtyBO objPackSize in objSizeQty.SearchObjects()) { string delimeter = string.IsNullOrEmpty(qty) ? string.Empty : ", "; qty = qty + delimeter + objPackSize.objSize.SizeName + "/" + objPackSize.Qty; } listOrderDetails.Add(new KeyValuePair <int, string>(objPackingList.PackingList.Value, qty)); } labelText = obj.CartonNo + "-" + obj.ListPackingList[0].WeeklyProductionCapacity.ToString(); GenerateBarcode.GenerateCartonLabel(lblBM, obj.CartonNo.ToString(), listOrderDetails, labelText, imageLocation); lblBM.Dispose(); File.Delete(tempPath); } // string excelFileName = "CartonLabels" + ".xlsx"; // CreateExcelDocument excell_app = new CreateExcelDocument(imageLocation, excelFileName, 400, 255, 255, true); //(imageLocation, excelFileName, 400, 275, 275, true); NNM string pdfpath = GenerateOdsPdf.PrintCartonBarcode(imageLocation); foreach (string imagePath in Directory.GetFiles(imageLocation, "*.jpg")) { File.Delete(imagePath); } //this.DownloadExcelFile(imageLocation + excelFileName);//NNM if (File.Exists(pdfpath)) { this.DownloadPDFFile(pdfpath); } }
protected void lbResendMail_OnClick(object sender, EventArgs e) { int QuoteID = int.Parse(((System.Web.UI.WebControls.WebControl)(sender)).Attributes["qid"]); if (QuoteID > 0) { QuoteBO objQuote = new QuoteBO(); objQuote.ID = QuoteID; objQuote.GetObject(); try { string mailcc = string.Empty; List <QuoteChangeEmailListBO> lstQuoteChangeEmailListCC = (new QuoteChangeEmailListBO()).SearchObjects().Where(o => o.IsCC == true).ToList(); foreach (QuoteChangeEmailListBO ccList in lstQuoteChangeEmailListCC) { UserBO objUser = new UserBO(); objUser.ID = (int)ccList.User; objUser.GetObject(); mailcc += objUser.EmailAddress + ","; } //mailcc = "*****@*****.**"; //string emailContent = CheckQuotes.CreateQuoteDetailBody(objQuote); //string emailTemp = QuoteEmailTemplate; //string emailTemp = CheckQuotes.CreateQuoteDetailBody(objQuote); string emailTemp = GenerateOdsPdf.CreateQuoteDetail(objQuote); string emailLogoPath = string.Empty; string[] attachment = { GenerateOdsPdf.CreateQuoteDetailAttachments(QuoteID) }; /*if (!string.IsNullOrEmpty(objQuote.JobName)) * { * emailContent += " <tr>" + * "<td width=\"200\" style=\"border-left:0px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Job Name" + "</td>" + * "<td width=\"480\" style=\"border-right:0px solid #ffffff;font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + objQuote.JobName + "</td>" + * "</tr>"; * } * * if (objQuote.Pattern != null && objQuote.Pattern > 0) * { * emailContent += " <tr>" + * "<td width=\"200\" style=\"border-left:0px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Item" + "</td>" + * "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + objQuote.objPattern.Number + " " + objQuote.objPattern.NickName + "</td>" + * "</tr>"; * } * * if ((objQuote.IndimanPrice != null && objQuote.IndimanPrice > 0)) * { * string priceterm = (objQuote.PriceTerm != null && objQuote.PriceTerm > 0) ? objQuote.objPriceTerm.Name : string.Empty; * string currency = (objQuote.Currency != null && objQuote.Currency > 0) ? objQuote.objCurrency.Code : string.Empty; * emailContent += " <tr>" + * "<td width=\"200\" style=\"border-left:0px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Price" + "</td>" + * "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + currency + " " + Convert.ToDecimal(objQuote.IndimanPrice).ToString("0.00") + " " + priceterm + "</td>" + * "</tr>"; * } * * if (objQuote.Qty != null) * { * emailContent += " <tr>" + * "<td width=\"200\" style=\"border-left:1px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Indicated Quantity" + "</td>" + * "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + objQuote.Qty.ToString() + "</td>" + * "</tr>"; * } * * if (objQuote.DeliveryDate != null) * { * emailContent += " <tr>" + * "<td width=\"200\" style=\"border-left:0px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Approx. despatch date" + "</td>" + * "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + Convert.ToDateTime(objQuote.DeliveryDate).ToString("dd MMMM yyyy") + "</td>" + * "</tr>"; * } * * if (objQuote.QuoteExpiryDate != null) * { * emailContent += " <tr>" + * " <td width=\"200\" style=\"border-left:0px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Expires On" + "</td>" + * " <td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + Convert.ToDateTime(objQuote.QuoteExpiryDate).ToString("dd MMMM yyyy") + "</td>" + * " </tr>"; * } * * if (!string.IsNullOrEmpty(objQuote.Notes)) * { * emailContent += " <tr>" + * "<td width=\"200\" style=\"border-left:1px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Notes" + "</td>" + * "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + objQuote.Notes + "</td>" + * "</tr>"; * } * * if (objQuote.Distributor != null && objQuote.Distributor > 0) * { * emailContent += " <tr>" + * "<td width=\"200\" style=\"border-left:1px; border-top:0; font-size:11px; font-family: Arial; background:#CAE8EA no-repeat; color:#000000; border-left:0px solid #ffffff; border-right:0px solid #ffffff; border-bottom:0px solid #C1DAD7; border-top:0px solid #ffffff; text-align:left; background:#fff \" scope=\"row\">" + "Distributor" + "</td>" + * "<td width=\"480\" style=\"border-right:0px solid #ffffff; font-size:11px; font-family: Arial; border-bottom:0px solid #ffffff; border-top:0px solid #ffffff; background:#fff; color:#000000\">" + objQuote.objDistributor.Name + "</td>" + * "</tr>"; * } * * * emailTemp = emailTemp.Replace("<$tabledata$>", emailContent); * emailTemp = emailTemp.Replace("<$contactname$>", objQuote.ContactName); * string designation = (!string.IsNullOrEmpty(LoggedUser.Designation)) ? (" | " + LoggedUser.Designation) : string.Empty; * emailTemp = emailTemp.Replace("<$name$>", LoggedUser.GivenName + " " + LoggedUser.FamilyName + "" + designation); * emailTemp = emailTemp.Replace(" <$email$>", LoggedUser.EmailAddress); * emailTemp = emailTemp.Replace(" <$phone$>", LoggedUser.OfficeTelephoneNumber); * emailTemp = emailTemp.Replace("<$Mobile$>", (LoggedUser.MobileTelephoneNumber != null && !string.IsNullOrEmpty(LoggedUser.MobileTelephoneNumber)) ? LoggedUser.MobileTelephoneNumber : string.Empty); * emailTemp = emailTemp.Replace("<$fax$>", LoggedUser.objCompany.Fax); * * EmailLogoBO objEmailLogo = new EmailLogoBO().SearchObjects().SingleOrDefault(); * * if (objEmailLogo != null) * { * emailLogoPath = IndicoConfiguration.AppConfiguration.DataFolderName + "/EmailLogos/" + objEmailLogo.EmailLogoPath; * * if (!File.Exists(Server.MapPath(emailLogoPath))) * { * emailLogoPath = IndicoConfiguration.AppConfiguration.DataFolderName + "/EmailLogos/logo_login.png"; * } * } * else * { * emailLogoPath = IndicoConfiguration.AppConfiguration.DataFolderName + "/EmailLogos/logo_login.png"; * } * * System.Drawing.Image emailImage = System.Drawing.Image.FromFile(Server.MapPath(emailLogoPath)); * SizeF emailLogo = emailImage.PhysicalDimension; * emailImage.Dispose(); * * List<float> lstVLImageDimensions = (new ImageProcess()).GetResizedImageDimensionForHeight(Convert.ToInt32(Math.Abs(emailLogo.Width)), Convert.ToInt32(Math.Abs(emailLogo.Height)), 110); * * emailLogoPath = "http://" + IndicoConfiguration.AppConfiguration.SiteHostAddress + "/" + emailLogoPath; * emailTemp = emailTemp.Replace("<$logoimage$>", "<img src=\"" + emailLogoPath + "\" height=\"" + lstVLImageDimensions[0].ToString() + "\" width=\"" + lstVLImageDimensions[1].ToString() + "\"/>"); * */ if (!string.IsNullOrEmpty(mailcc)) { //GenerateOdsPdf.GenerateQuoteDetail(QuoteID); mailcc += LoggedUser.EmailAddress + ","; IndicoEmail.SendMail(LoggedUser.GivenName + " " + LoggedUser.FamilyName, LoggedUser.EmailAddress, objQuote.ContactName, objQuote.ClientEmail, mailcc, "Quote: QT" + " - " + QuoteID, null, attachment, false, emailTemp); } } catch (Exception ex) { IndicoLogging.log.Error("Errour occured while send resend quote mail from ViewQuotes.aspx page", ex); } } }