Esempio n. 1
0
        // 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);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// This method will do the deletion work and sleep until the next interval starts.
        /// </summary>
        public void DoCheckQuotesStatus()
        {
            try
            {
                while (true)
                {
                    try
                    {
                        IL.log.Debug("DoCheckQuotesStatus() - cycle begins...");

                        // Start checking the statuses of In Progress Quotes
                        QuoteBO objQuote = new QuoteBO();
                        objQuote.Status = 1;
                        List <QuoteBO> lstQuotes = objQuote.SearchObjects();
                        foreach (QuoteBO Quote in lstQuotes)
                        {
                            /// Start processing the Quote...
                            ///

                            if (Quote.QuoteExpiryDate.ToShortDateString() == DateTime.Now.ToShortDateString())
                            {
                                this.ChangeOrderStatus(Quote.ID);
                            }
                            if (Quote.QuoteExpiryDate.ToShortDateString() == DateTime.Now.AddDays(2).ToShortDateString())
                            {
                            }
                        }

                        IL.log.Debug("DoCheckQuotesStatus() - cycle ends.");
                    }
                    catch (Exception ex)
                    {
                        IL.log.ErrorFormat("DoCheckQuotesStatus() - Error occurred, Message: {0}\nStacktrace: {1}", ex.Message, ex.StackTrace);
                    }

                    // Sleep until the next inetrval starts.
                    Thread.Sleep(24 * 60 * 60 * 1000);
                    //Thread.Sleep(1000 * 60 * 1); // 1min
                }
            }
            catch (System.Threading.ThreadAbortException)
            {
                IL.log.InfoFormat("DoCheckQuotesStatus Task: Caught Thread Abort.");
            }
        }
Esempio n. 3
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            int quoteid = int.Parse(this.hdnSelectedPatternAccessoryID.Value.Trim());

            if (quoteid > 0)
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    QuoteBO objQuote = new QuoteBO(this.ObjContext);
                    objQuote.ID = quoteid;
                    objQuote.GetObject();

                    List <QuoteDetailBO> lstQuoteDetails = objQuote.QuoteDetailsWhereThisIsQuote;

                    if (lstQuoteDetails.Count > 0)
                    {
                        foreach (QuoteDetailBO qd in lstQuoteDetails)
                        {
                            QuoteDetailBO objQuoteDetail = new QuoteDetailBO(this.ObjContext);
                            objQuoteDetail.ID = qd.ID;
                            objQuoteDetail.GetObject();

                            objQuoteDetail.Delete();
                        }

                        this.ObjContext.SaveChanges();
                    }

                    objQuote.Delete();

                    this.ObjContext.SaveChanges();
                    ts.Complete();
                }
            }

            this.PopulateDataGrid();
        }
Esempio n. 4
0
        private void ChangeOrderStatus(int QuoteID)
        {
            try
            {
                if (QuoteID > 0)
                {
                    using (TransactionScope ts = new TransactionScope())
                    {
                        QuoteBO objQuote = new QuoteBO(this.ObjContext);
                        objQuote.ID = QuoteID;
                        objQuote.GetObject();

                        objQuote.Status = 4;

                        ObjContext.SaveChanges();
                        ts.Complete();
                    }
                }
            }
            catch (Exception ex)
            {
                IL.log.Error("Error occured while updating quote table in CheckQuote", ex);
            }
        }
Esempio n. 5
0
        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);
                }
            }
        }