Esempio n. 1
0
    public ArrayList GetCarFeatures(string sCarId, string AuthenticationID, string CustomerID)
    {
        DataSet ds = new DataSet();
        CarFeatures objCarFeatures = new CarFeatures();
        ArrayList arr = new ArrayList();
        MobileBL objMobileBL = new MobileBL();
        if (CustomerID.Trim() != "")
        {
            DataSet dsSaveCustInfo = objMobileBL.SaveMobileCustomerInfo("GetCarFeatures", CustomerID,AuthenticationID,sCarId);
        }

        if (AuthenticationID == ConfigurationManager.AppSettings["AppleID"].ToString())
        {
            ds = objCarFeatures.GetCarFeatures(sCarId);

            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    arr.Add(ds.Tables[0].Rows[i]["FeatureTypeName"].ToString() + "," + ds.Tables[0].Rows[i]["FeatureName"].ToString());
                }
            }

        }
        return arr;
    }
    public ArrayList GetCarFeatures(string sCarId)
    {
        DataSet ds = new DataSet();
        CarFeatures objCarFeatures = new CarFeatures();
        ArrayList arr = new ArrayList();
        ds = objCarFeatures.GetCarFeatures(sCarId);

        if (ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                arr.Add(ds.Tables[0].Rows[i]["FeatureTypeName"].ToString() + "," + ds.Tables[0].Rows[i]["FeatureName"].ToString());
            }
        }
        return arr;
    }
    public DataSet GetCarFeatures(string sCarId)
    {
        DataSet ds = new DataSet();
        CarFeatures objCarFeatures = new CarFeatures();
        ArrayList arr = new ArrayList();
        DataSet dsNewFeatures = new DataSet();

        dsNewFeatures.Tables.Add();
        dsNewFeatures.Tables[0].Columns.Add("FeatureTypeName");
        dsNewFeatures.Tables[0].Columns.Add("FeatureName");

        ds = objCarFeatures.GetCarFeatures_New(sCarId);

        if (ds.Tables[0].Rows.Count > 0)
        {

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                if (i == 0)
                {

                    dsNewFeatures.Tables[0].Rows.Add();
                    dsNewFeatures.Tables[0].Rows[dsNewFeatures.Tables[0].Rows.Count - 1][0] = ds.Tables[0].Rows[i]["FeatureTypeName"].ToString();
                    dsNewFeatures.Tables[0].Rows[dsNewFeatures.Tables[0].Rows.Count - 1][1] = ds.Tables[0].Rows[i]["FeatureName"].ToString();
                }
                else
                {
                    if (ds.Tables[0].Rows[i - 1]["FeatureTypeName"].ToString().Trim() != ds.Tables[0].Rows[i]["FeatureTypeName"].ToString().Trim())
                    {
                        dsNewFeatures.Tables[0].Rows.Add();
                        dsNewFeatures.Tables[0].Rows[dsNewFeatures.Tables[0].Rows.Count - 1][0] = ds.Tables[0].Rows[i]["FeatureTypeName"].ToString();
                        dsNewFeatures.Tables[0].Rows[dsNewFeatures.Tables[0].Rows.Count - 1][1] = ds.Tables[0].Rows[i]["FeatureName"].ToString();
                    }
                    else if (ds.Tables[0].Rows[i - 1]["FeatureTypeName"].ToString().Trim() == ds.Tables[0].Rows[i]["FeatureTypeName"].ToString().Trim())
                    {

                        dsNewFeatures.Tables[0].Rows[dsNewFeatures.Tables[0].Rows.Count - 1][1] = dsNewFeatures.Tables[0].Rows[dsNewFeatures.Tables[0].Rows.Count - 1][1] + ", " + ds.Tables[0].Rows[i]["FeatureName"].ToString();

                    }
                }

            }
        }
        return dsNewFeatures;
    }
    private void FillCarDetails(List<CarsInfo.UsedCarsInfo> objCarInfo, string sCarid)
    {
        if (objCarInfo.Count > 0)
        {
            //------p--------//

            Hmake.Value = objCarInfo[0].MakeID.ToString();
            Hmodel.Value = objCarInfo[0].MakeModelID.ToString();
            HZip.Value = objCarInfo[0].Zip.ToString();
            HPrice.Value = objCarInfo[0].Price.ToString();
            //------------end-------//

            if (objCarInfo[0].IsActive == false)
            {
                soldCar.Visible = true;

                if (objCarInfo[0].AdStatus == "Active")
                {
                    lblCarsoldStatus.Text = "This car is in Inactive status!";
                    mailsend.Visible = false;

                    //return;
                }
                else if (objCarInfo[0].AdStatus != "Active")
                {
                    soldcarid1.Visible = false;
                    lblCarsoldStatus.Text = "This car is in " + objCarInfo[0].AdStatus + " status!";
                    mailsend.Visible = false;
                    //return;
                }

                Session["zipId"] = objCarInfo[0].Zip;
                //yourZip.Value = objCarInfo[0].Zip;

                Title = "Buy Sell Used Cars " + (objCarInfo[0].YearOfMake.ToString() + ' ' + objCarInfo[0].Make + ' ' + objCarInfo[0].Model).ToString().ToUpper() + " in  " + objCarInfo[0].City.ToString().ToUpper() + ", " + objCarInfo[0].State.ToString().ToUpper();

                if (objCarInfo[0].Title != "Emp")
                {
                    //Title = "Buy " + lblTitle.Text.ToString() + " at UnitedCarExchange.com";
                    //lblTitle.Text = "Buy Sell Used " + EmptyCheck(objCarInfo[0].Title) + "in" + objCarInfo[0].City.ToString().ToUpper() + "," + objCarInfo[0].State.ToString().ToUpper();
                    lblTitle.Text = EmptyCheck(objCarInfo[0].Title);
                }
                else
                {
                    lblTitle.Text = GeneralFunc.WrapTextByMaxCharacters((objCarInfo[0].YearOfMake.ToString() + ' ' + objCarInfo[0].Make + ' ' + objCarInfo[0].Model).ToString().ToUpper(), 30);
                }
            }
            else
            {
                if (objCarInfo[0].AdStatus != "Active")
                {
                    soldCar.Visible = true;
                    sold.Visible = false;

                    lblCarsoldStatus.Text = "This car is in " + objCarInfo[0].AdStatus + " status!";
                }
                else
                {
                    soldCar.Visible = false;
                    sold.Visible = false;
                }

                Session["zipId"] = objCarInfo[0].Zip;

                Title = "Buy Sell Used Cars " + (objCarInfo[0].YearOfMake.ToString() + ' ' + objCarInfo[0].Make + ' ' + objCarInfo[0].Model).ToString().ToUpper() + " in  " + objCarInfo[0].City.ToString().ToUpper() + ", " + objCarInfo[0].State.ToString().ToUpper();

                if (objCarInfo[0].Title != "Emp")
                {
                    //Title = "Buy " + lblTitle.Text.ToString() + " at UnitedCarExchange.com";
                    //lblTitle.Text = "Buy Sell Used " + EmptyCheck(objCarInfo[0].Title) + "in" + objCarInfo[0].City.ToString().ToUpper() + "," + objCarInfo[0].State.ToString().ToUpper();
                    lblTitle.Text = EmptyCheck(objCarInfo[0].Title);
                }
                else
                {
                    lblTitle.Text = GeneralFunc.WrapTextByMaxCharacters((objCarInfo[0].YearOfMake.ToString() + ' ' + objCarInfo[0].Make + ' ' + objCarInfo[0].Model).ToString().ToUpper(), 30);
                }
            }

            Session["zipId"] = objCarInfo[0].Zip;

            Title = "Buy Sell Used Cars " + (objCarInfo[0].YearOfMake.ToString() + ' ' + objCarInfo[0].Make + ' ' + objCarInfo[0].Model).ToString().ToUpper() + " in  " + objCarInfo[0].City.ToString().ToUpper() + ", " + objCarInfo[0].State.ToString().ToUpper();

            if (objCarInfo[0].Title != "Emp")
            {
                //Title = "Buy " + lblTitle.Text.ToString() + " at UnitedCarExchange.com";
                //lblTitle.Text = "Buy Sell Used " + EmptyCheck(objCarInfo[0].Title) + "in" + objCarInfo[0].City.ToString().ToUpper() + "," + objCarInfo[0].State.ToString().ToUpper();
                lblTitle.Text = EmptyCheck(objCarInfo[0].Title);
                LabelSubtitle.Text = GeneralFunc.WrapTextByMaxCharacters((objCarInfo[0].YearOfMake.ToString() + ' ' + objCarInfo[0].Make + ' ' + objCarInfo[0].Model).ToString().ToUpper(), 30);
            }
            else
            {
                //Main Title
                lblTitle.Text = GeneralFunc.WrapTextByMaxCharacters((objCarInfo[0].YearOfMake.ToString() + ' ' + objCarInfo[0].Make + ' ' + objCarInfo[0].Model).ToString().ToUpper(), 30);
                LabelSubtitle.Text = GeneralFunc.WrapTextByMaxCharacters((objCarInfo[0].YearOfMake.ToString() + ' ' + objCarInfo[0].Make + ' ' + objCarInfo[0].Model).ToString().ToUpper(), 30);

                //try
                //{
                //    DbDataReader dr;
                //    string spNameString = string.Empty;
                //    Database dbDatabase = DatabaseFactory.CreateDatabase(Global.INSTANCE_NAME);
                //    spNameString = "[Usp_Caption]";
                //    DbCommand dbCommand = null;
                //    dbCommand = dbDatabase.GetStoredProcCommand(spNameString);

                //    dbDatabase.AddInParameter(dbCommand, "@CarID", DbType.Int64, sCarid);
                //    IDataReader iDR = dbDatabase.ExecuteReader(dbCommand);
                //    dr = (SqlDataReader)iDR;

                //    if (dr.Read())
                //    {
                //        LabelSubtitle.Text = dr["Caption"].ToString();

                //    }
                //    else
                //    {
                //        lblTitle.Text = GeneralFunc.WrapTextByMaxCharacters((objCarInfo[0].YearOfMake.ToString() + ' ' + objCarInfo[0].Make + ' ' + objCarInfo[0].Model).ToString().ToUpper(), 30);
                //    }
                //    dr.Close();
                //}
                //catch { }

            }

            if (objCarInfo[0].Price.ToString() != "0")
            {
                lblPrice1.Text = "-$" + (EmptyCheck(objCarInfo[0].Price.ToString()) == "" ? "0" : EmptyCheck(objCarInfo[0].Price.ToString()));

                lblPrice.Text = "$" + (EmptyCheck(objCarInfo[0].Price.ToString()) == "" ? "0" : EmptyCheck(objCarInfo[0].Price.ToString()));
            }

            string city = GeneralFunc.ToProper(EmptyCheck(objCarInfo[0].City));

            string address = EmptyCheck(objCarInfo[0].Address1.ToLower()).Trim();

            address = GeneralFunc.ToProper(address);

            string state;
            if (objCarInfo[0].State.ToLower() != "unspecified")
            {
                state = EmptyCheck(objCarInfo[0].State.ToLower()).Trim();
            }
            else
            {
                state = "";
            }

            hdnCarid.Value = objCarInfo[0].Carid.ToString();
            if (address != "" && address != " " && address != "  " && (city != "" || state != ""))
            {
                address = (address).Trim();
                address += "";
            }
            else
            {
                address = "";
            }

            HtmlMeta tag = new HtmlMeta();

            tag.Name = "keywords";
            //tag.Content = "Buy " + lblTitle.Text.ToString() + " at UnitedCarExchange.com";
            tag.Content = "Buy Used Cars, Sell Used Cars, Buy Used " + objCarInfo[0].Make + ' ' + objCarInfo[0].Model.ToString().ToUpper() + " Car, Sell "
                + objCarInfo[0].Make + ' ' + objCarInfo[0].Model.ToString().ToUpper()
                + " Car, Buy Cars in " + objCarInfo[0].City + ' ' + objCarInfo[0].State.ToString().ToUpper() +
                ", Sell Cars in " + objCarInfo[0].City + ' ' + objCarInfo[0].State.ToString().ToUpper() + "";
            Header.Controls.Add(tag);

            HtmlMeta tag1 = new HtmlMeta();
            tag1.Name = "description";
            //tag1.Content = EmptyCheck(objCarInfo[0].Description);
            tag1.Content = "Buy or Sell Used Cars " + objCarInfo[0].YearOfMake.ToString() + ' ' + objCarInfo[0].Make + ' ' + objCarInfo[0].Model.ToString().ToUpper() + " in " + objCarInfo[0].City.ToString().ToUpper() + "," + objCarInfo[0].State.ToString().ToUpper() + " for Price - " + objCarInfo[0].Price.ToString().ToUpper() + " Buy or Sell Used Cars at UnitedCarExchange.com";
            Header.Controls.Add(tag1);

            // Page.Controls.Add(header);

            if (city != "" && state != "")
            {
                city = (city).Trim();
                city += ", ";
            }
            else
            {
                city = "";
            }

            if (state == "UN" || state == "0")
            {
                state = "";
            }

            //address + ", " +
            if (Hadd.Value != "true") {
                yourZip.Value = EmptyCheck(objCarInfo[0].Zip.ToString());
            }
            lblSellerAddress.Text = EmptyCheck(city + "" + state.ToUpper() + "" + EmptyCheck(objCarInfo[0].Zip.ToString()) + "");
            lblSellerAddress2.Text = EmptyCheck(objCarInfo[0].Address2);
            if (EmptyCheck(objCarInfo[0].Phone.ToString()) != "")
            {
                lblSellerNo.Text = GeneralFunc.FormatUsTelephoneNo(Convert.ToInt64(EmptyCheck(objCarInfo[0].Phone)));
            }
            //lblSellerEmail.Value= EmptyCheck(objCarInfo[0].Email);

            Session["CustEmail"] = EmptyCheck(objCarInfo[0].Email);

            lblSellerType.Text = EmptyCheck(objCarInfo[0].SellerType);

            if (objCarInfo[0].Fueltype != "Unspecified")
            {
                lblFuelType.Text = EmptyCheck(objCarInfo[0].Fueltype);
            }

            lblSellerName.Text = EmptyCheck(objCarInfo[0].SellerName);

            zipcode.Value = EmptyCheck(objCarInfo[0].Zip.ToString());

            //lblSellerAddress.Text = EmptyCheck(objCarInfo[0].Address1);

            //lblAxle.Text = (EmptyCheck(objCarInfo[0].Axle.ToString()) == "" ? "0" : EmptyCheck(objCarInfo[0].Axle.ToString()));

            lblMake.Text = EmptyCheck(objCarInfo[0].Make);

            lblModel.Text = EmptyCheck(objCarInfo[0].Model);

            lblSubTitle.Text = EmptyCheck(objCarInfo[0].Make) + " " + EmptyCheck(objCarInfo[0].Model);

            lblYear.Text = EmptyCheck(objCarInfo[0].YearOfMake.ToString());

            if (objCarInfo[0].Mileage.ToString() != "0")
            {
                lblMileage.Text = EmptyCheck(objCarInfo[0].Mileage.ToString()) + " miles";

            }

            //SimialarCars(objCarInfo[0].MakeID.ToString(), objCarInfo[0].MakeModelID.ToString(), objCarInfo[0].Zipcode.ToString(), objCarInfo[0].Price.ToString());

            //For inline Adds Displaying data
            try
            {
                bool yearValid = false; bool Sellertype = false;
                String Year = DateTime.Now.Year.ToString();
                if (Convert.ToInt32(Year) >= Convert.ToInt32(objCarInfo[0].YearOfMake.ToString()) && (Convert.ToInt32(Year) - 8) <= Convert.ToInt32(objCarInfo[0].YearOfMake.ToString()))
                {
                    yearValid = true;
                }
                string Seller = objCarInfo[0].SellerType.ToString();
                if (Seller == "Private Seller")
                {
                    Sellertype = true;
                }
                if (Convert.ToInt32(objCarInfo[0].Price.ToString()) < 10000 && yearValid == true && Sellertype == true)
                {
                    LinkAdd1.Visible = true;
                    linkAdd2.Visible = false;
                    LinkAdd3.Visible = false;
                }
                else if (Convert.ToInt32(objCarInfo[0].Price.ToString()) > 10000 && yearValid == true && Sellertype == true)
                {
                    LinkAdd1.Visible = false;
                    linkAdd2.Visible = true;
                    LinkAdd3.Visible = true;
                }
                else
                {
                    LinkAdd1.Visible = false;
                    linkAdd2.Visible = false;
                    LinkAdd3.Visible = false;
                }

            }
            catch { }

            //lblAxle.Text = EmptyCheck(objCarInfo[0].Axle);

            //lblType.Text = EmptyCheck(objCarInfo[0].TypeName);

            //lblCategory.Text = EmptyCheck(objCarInfo[0].Category);
            if (objCarInfo[0].ExteriorColor != "Unspecified")
            {
                lblExteriorColor.Text = EmptyCheck(objCarInfo[0].ExteriorColor);
            }
            if (objCarInfo[0].NumberOfCylinder != "Unspecified")
            {
                lblEngine.Text = EmptyCheck(objCarInfo[0].NumberOfCylinder);
            }
            if (objCarInfo[0].InteriorColor != "Unspecified")
            {
                lblInteriorColor.Text = EmptyCheck(objCarInfo[0].InteriorColor);
            }
            if (objCarInfo[0].ConditionDescription != "Unspecified")
            {
                lblVehicleCondition.Text = EmptyCheck(objCarInfo[0].ConditionDescription);
            }

            lblVin.Text = EmptyCheck(objCarInfo[0].VIN);
            if (objCarInfo[0].NumberOfDoors != "Unspecified")
            {
                lblDoors.Text = EmptyCheck(objCarInfo[0].NumberOfDoors);
            }
            if (objCarInfo[0].Bodytype != "Unspecified")
            {
                lblBodyStyle.Text = EmptyCheck(objCarInfo[0].Bodytype);
            }
            if (objCarInfo[0].Transmission != "Unspecified")
            {
                lblTransMission.Text = EmptyCheck(objCarInfo[0].Transmission);
            }

            //lblRear.Text = (EmptyCheck(objCarInfo[0].Rear.ToString()) == "" ? "0" : EmptyCheck(objCarInfo[0].Rear.ToString()));

            lblDescription.Text = Server.HtmlEncode(EmptyCheck(objCarInfo[0].Description));
            if (objCarInfo[0].DriveTrain != "Unspecified")
            {
                lblDriveTrain.Text = EmptyCheck(objCarInfo[0].DriveTrain);
            }

            CarsBL.Transactions.NearZonesBL objNearZonesBL = new CarsBL.Transactions.NearZonesBL();

            DataSet dsCities = new DataSet();

            //if (Session["zipId"] != null)
            //{
            //    dsCities = objNearZonesBL.GetNearCities(Session["zipId"].ToString());

            //    if (dsCities.Tables[0].Rows.Count > 0)
            //    {
            //        for (int i = 0; i < dsCities.Tables[0].Rows.Count; i++)
            //        {
            //            if (i == 0)
            //            {
            //                lblNearbyzipcodes.Text = dsCities.Tables[0].Rows[i][1].ToString();
            //            }
            //            else
            //            {
            //                lblNearbyzipcodes.Text = lblNearbyzipcodes.Text + ',' + dsCities.Tables[0].Rows[i][1].ToString();
            //            }
            //        }

            //    }
            //}
            //if (Session["zipId"] != null)
            //{
            //    dsCities = objNearZonesBL.GetNearCities(Session["zipId"].ToString());

            //    if (dsCities.Tables[0].Rows.Count > 0)
            //    {
            //        for (int i = 0; i < dsCities.Tables[0].Rows.Count; i++)
            //        {
            //            Literal Li = new Literal();
            //            if (i == 0)
            //            {
            //                lblNearbyzipcodes.Text = dsCities.Tables[0].Rows[i][1].ToString();

            //            }
            //            else
            //            {
            //                lblNearbyzipcodes.Text = lblNearbyzipcodes.Text + ", " + dsCities.Tables[0].Rows[i][1].ToString();

            //            }

            //        }

            //    }
            //}

            //lblsellerName1.Text = objCarInfo[0].SellerName;
            lblSellarname2.Text = EmptyCheck(objCarInfo[0].SellerName);

            if (EmptyCheck(objCarInfo[0].Phone.ToString()) != "")
            {
                lblphone.Text = GeneralFunc.FormatUsTelephoneNo(Convert.ToInt64(EmptyCheck(objCarInfo[0].Phone)));
            }

            lblPrice3.Text = "$" + (EmptyCheck(objCarInfo[0].Price.ToString()) == "" ? "0" : EmptyCheck(objCarInfo[0].Price.ToString()));

            lblCartitle.Text = objCarInfo[0].YearOfMake.ToString() + ' ' + objCarInfo[0].Make.ToString().ToUpper() + ' ' + objCarInfo[0].Model.ToString().ToUpper();

            lblSellarAddress.Text = EmptyCheck(city + "" + state.ToUpper() + "" + EmptyCheck(objCarInfo[0].Zip.ToString()) + "");

            dsCities = objNearZonesBL.GetNearStates(Session["zipId"].ToString());

            //allegan, Michigan (MI); caledonia
            if (dsCities.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < dsCities.Tables[0].Rows.Count; i++)
                {
                    Literal Li = new Literal();
                    if (i == dsCities.Tables[0].Rows.Count - 1)
                    {
                        Li.Text = (dsCities.Tables[0].Rows[i][2].ToString()).Trim() + " " + ((dsCities.Tables[0].Rows[i][1].ToString()).Trim()) +"   " +"(" + (dsCities.Tables[0].Rows[i][3].ToString()) + "); ";
                    }
                    else
                    {
                       // Li.Text = (dsCities.Tables[0].Rows[i][2].ToString()).Trim() + "   " + ((dsCities.Tables[0].Rows[i][1].ToString()).Trim()) + "(" + (dsCities.Tables[0].Rows[i][3].ToString()) + "), ";

                        //---- starts 05-08-2013------------//
                        string s = dsCities.Tables[0].Rows[i][1].ToString();

                        s = System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(s.ToLower());

                        Li.Text = " "+(dsCities.Tables[0].Rows[i][2].ToString()) + "," + s + "  "+"(" + (dsCities.Tables[0].Rows[i][3].ToString()) + "); ";
                        //--------End-----------------------//
                        ///('ul.towns').append('<li class="st">'+$.trim(state[2])+', '+$.trim(state[1])+'('+$.trim(state[3])+');</li>');
                    }
                    ulTowns.Controls.Add(Li);
                }
            }
            GetCarPictures(sCarid);
            try
            {
                lblMileage.Text = lblMileage.Text + "mi";
            }
            catch { }
            ClientScript.RegisterStartupScript(this.GetType(), "KyAUIDFCS", "<script language='javascript' type='text/javascript'>slidershow();</script>");

            CarFeatures objCarFeatures = new CarFeatures();

            DataSet ds = GetCarFeatures(sCarid);

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    dlFeature.DataSource = ds.Tables[0];

                    dlFeature.DataBind();

                }

            }

        }
        else
        {
            Response.Redirect("errorpage.aspx");
        }
    }
Esempio n. 5
0
    /// <summary>
    /// New Modified shravan 0614 2012
    /// </summary>
    /// <param name="strMailFormat"></param>
    /// <param name="dtMultiSite"></param>
    /// <param name="CarsDetails"></param>
    public string SendMultiListMail(ref string strMailFormat, DataTable dtMultiSite, string Carid, string PackageName, string RegName, string UniqueID)
    {
        string strMail = string.Empty;

        List<CarsInfo.UsedCarsInfo> obUsedCarsInfo = new List<CarsInfo.UsedCarsInfo>();
        UsedCarsSearch obj = new UsedCarsSearch();
        obUsedCarsInfo = (List<CarsInfo.UsedCarsInfo>)obj.FindCarID(Carid);

        string SellerName = obUsedCarsInfo[0].SellerName;

        string Phone = obUsedCarsInfo[0].Phone;
        string Address = obUsedCarsInfo[0].Address1;
        string City = obUsedCarsInfo[0].City;
        string State = obUsedCarsInfo[0].State;
        int PriceAsk = Convert.ToInt32(obUsedCarsInfo[0].Price.ToString());
        string Price = string.Empty;
        if (PriceAsk != 0)
        {
            Price = string.Format("{0:C0}", PriceAsk);
        }
        else
        {
            Price = "";
        }
        int MileageGiven = Convert.ToInt32(obUsedCarsInfo[0].Mileage.ToString());
        System.Globalization.NumberFormatInfo nfi;
        nfi = new System.Globalization.NumberFormatInfo();
        nfi.CurrencySymbol = "";
        string Mileage = string.Empty;
        if (MileageGiven != 0)
        {
            Mileage = string.Format(nfi, "{0:C0}", MileageGiven);
        }
        else
        {
            Mileage = "";
        }

        if (Address == "Emp")
        {
            Address = "";
        }
        if (City == "Emp")
        {
            City = "";
        }

        if (RegName == "")
        {
            SellerName = "";
        }
        else
        {
            SellerName = RegName;
        }

        if (Phone == "Emp")
        {
            Phone = " ";
        }
        else
        {
            Phone = objGeneralFunc.filPhnm(obUsedCarsInfo[0].Phone.ToString());
        }

        string path = string.Empty;

        if (obUsedCarsInfo[0].PIC0 != "Emp")
        {
            path = obUsedCarsInfo[0].PICLOC0 + "/" + obUsedCarsInfo[0].PIC0;
            for (int k = 0; k < 3; k++)
            {
                path = path.Replace("\\", "/");
            }

            path = path.Replace("//", "/");
            path = path.Replace(" ", "%20");
        }
        else
        {
            string carMake = obUsedCarsInfo[0].Make;
            string carModel = obUsedCarsInfo[0].Model;
            carMake = carMake.Replace(' ', '-');
            carModel = carModel.Replace(' ', '-');
            carModel = carModel.Replace('/', '@');
            //if (carModel.IndexOf('/') > 0)
            //{
            //    carModel = "Other";
            //}
            var MakeModel = carMake + "_" + carModel;
            MakeModel = MakeModel.Replace(' ', '-');

            path = "images/MakeModelThumbs/" + MakeModel + ".jpg";
        }
        string sDescription = string.Empty;
        if (obUsedCarsInfo[0].Description == "Emp")
        {
            sDescription = "";
        }
        else
        {
            sDescription = obUsedCarsInfo[0].Description;

        }

        string makeForUrl = obUsedCarsInfo[0].Make;
        makeForUrl = makeForUrl.Replace(" ", "%20");
        string ModelForUrl = obUsedCarsInfo[0].Model;
        ModelForUrl = ModelForUrl.Replace(" ", "%20");
        ModelForUrl = ModelForUrl.Replace("&", "@");

        strMail += "<table width=\"100%\" bgcolor=\"#fff\" style=\"float:left;background-color:rgb(255,255,255);font-family:Arial,'sans serif'\">";
        strMail += "<tbody>";
        strMail += "<tr>";
        strMail += "<td align=\"center\"><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
        strMail += "<tbody>";
        strMail += "<tr>"; ;
        strMail += "<td colspan=\"3\">&nbsp;</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td colspan=\"2\" valign=\"top\" height=\"359\"><img src=\"http://smartz.unitedcarexchange.com/images/shadow-top-left.png\"></td>";
        strMail += "<td rowspan=\"2\"><table width=\"730\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
        strMail += "<tbody>";
        strMail += "<tr>";
        strMail += "<td bgcolor=\"#2d2d2d\" height=\"42\" valign=\"middle\"><table width=\"100%\" cellspacing=\"0\" valign=\"middle\" cellpadding=\"0\">";
        strMail += "<tbody>";
        strMail += "<tr>"; ;
        strMail += "<td colspan=\"4\" height=\"2\"></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td width=\"12\"></td>";
        strMail += "<td width=\"453\" style=\"color:#fff;font-size:12px;font-family:Arial,'sans serif'\"> Multi-Site Promotion Report for:&nbsp;";
        //Car Year Make Model text start
        strMail += "<strong>";
        strMail += obUsedCarsInfo[0].YearOfMake + " " + obUsedCarsInfo[0].Make + " " + obUsedCarsInfo[0].Model;
        strMail += "</strong></td>";
        strMail += "<td width=\"243\" align=\"right\" style=\"font-size:12px;color:rgb(255,197,190);padding-right:10px; font-weight:normal;\">";
        //Customer Name and Phone Number string
        ///strMail += "Cynthia Nusbaum (518-821-9009)";
        strMail += SellerName + " " + (Phone) + "<br />";
        //report date start
        strMail += "<span style=\"color:#fff;font-size:12px; font-weight:normal;\">Report Date:&nbsp; ";
        strMail += string.Format("{0:MM/dd/yyy}", System.DateTime.Now.ToString());

        strMail += "</span></td>";
        strMail += "</tr>";
        strMail += "    </tbody>";
        strMail += "      </table></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td bgcolor=\"#c32c2c\" height=\"6\"></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td height=\"239\" style=\"background:url(http://smartz.unitedcarexchange.com/images/newsletter.jpg) center no-repeat\"><table cellpadding=\"0\" cellspacing=\"0\">";
        strMail += "<tbody>";
        strMail += "<tr>";
        strMail += "<td height=\"156\"></td>";
        strMail += "<td></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td width=\"8\"></td>";
        strMail += "<td height=\"30\" style=\"text-shadow:rgb(102,102,102) 1px 1px;color:#fff;font-size:14px;font-weight:bold;font-family:Arial,'sans serif'\"><a href=\"http://unitedcarexchange.com/\" target=\"_blank\">";
        strMail += "<div style=\"width:214px;min-height:68px;border:none;outline:none; position:relative; top:-158px\"> </div>";
        strMail += "    </a></td>";
        strMail += "</tr>";
        strMail += "    </tbody>";
        strMail += "    </table></td>";
        strMail += "</tr>";
        strMail += "    </tbody>";
        strMail += "</table>";
        strMail += "<table width=\"730\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#ffffff\">";
        strMail += "<tbody>";
        strMail += "<tr>";
        strMail += "<td height=\"10\"></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td height=\"10\"></td>";

        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td>";

        strMail += "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
        strMail += "<tbody>";
        strMail += "<tr>";
        strMail += "<td width=\"30\">";
        strMail += "</td>";
        strMail += "<td style=\"color: rgb(51,51,51); font-size: 14px; line-height: 20px; font-family: Arial,'sans serif'\"";
        strMail += "valign=\"top\">";
        strMail += "<h3 style=\"font-family: HelveticaNeueBold,HelveticaNeue-Bold,'Helvetica Neue Bold',helvetica,arial,'sans serif';";
        strMail += "line-height: 25px; font-size: 22px; color: #CB3024; text-align: left; margin-bottom: 10px\">";
        strMail += "Key Listing Parameters</h3>";
        strMail += "<table style=\"margin: 0px; padding: 0px; font-size: 12px; color: #232323; width: 438px;";
        strMail += "background: #ccc;\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">";
        strMail += "<tbody>";
        strMail += "<tr>";
        strMail += "<td style=\"background: #fff; padding: 5px\" width=\"125\">";
        strMail += "<strong>Registrant Name</strong>";
        strMail += "</td>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += SellerName;
        strMail += "</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += "<strong>Email Address</strong>";
        strMail += "</td>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += obUsedCarsInfo[0].Email;
        strMail += "</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += "<strong>Phone</strong>";
        strMail += "</td>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += Phone;
        strMail += "</td>";
        strMail += "</tr>";
        //strMail += "<tr>";
        //strMail += "<td style=\"background: #fff; padding: 5px\">";
        //strMail += "<strong>Package Type</strong>";
        //strMail += "</td>";
        //strMail += "<td style=\"background: #fff; padding: 5px\">";
        //strMail += PackageName;
        //strMail += "</td>";
        //strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += "<strong>Make</strong>";
        strMail += "</td>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += obUsedCarsInfo[0].Make;
        strMail += "</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += "<strong>Model</strong>";
        strMail += "</td>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += obUsedCarsInfo[0].Model;
        strMail += "</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += "<strong>Year</strong>";
        strMail += "</td>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += obUsedCarsInfo[0].YearOfMake;
        strMail += "</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += "<strong>Mileage</strong>";
        strMail += "</td>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        if (Mileage != "")
        {
            strMail += Mileage + "ml";
        }
        else
        {
            strMail += Mileage;
        }
        strMail += "</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += "<strong>Asking Price</strong>";
        strMail += "</td>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += Price;
        strMail += "</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += "<strong>United Car Exchange Listing Link</strong>";
        strMail += "</td>";
        strMail += "<td style=\"background: #fff; padding: 5px\">";
        strMail += "<a href='http://unitedcarexchange.com/Buy-Sell-UsedCar/" + obUsedCarsInfo[0].YearOfMake + "-" + makeForUrl + "-" + ModelForUrl + "-" + UniqueID + "'" + " style=\"color: #CB3024\" target=\"_blank\">";
        strMail += " Click here</a>";
        strMail += "</td>";
        strMail += "</tr>";
        strMail += "</tbody>";
        strMail += "</table>";
        strMail += "</td>";
        strMail += "<td width=\"30\">";
        strMail += "</td>";
        strMail += "<td style=\"width: 200px;padding-top:50px;\" valign=\"top\">";
        //strMail += "<a target=\"_blank\" href='http://unitedcarexchange.com/SearchCarDetails.aspx?Make=" + obUsedCarsInfo[0].Make.ToString() + "&Model=" + obUsedCarsInfo[0].Model.ToString() + "&ZipCode=0&WithinZip=5&C=4zVbl2Mc" + obUsedCarsInfo[0].Carid.ToString() + "'";
        strMail += "<img src='http://unitedcarexchange.com/" + path + "'" + " style=\"margin-top: 4px\" border=\"0\" width=\"200\">";
        //strMail += "</a>";
        strMail += "  <br>";
        strMail += "</td>";
        strMail += "<td width=\"30\">";
        strMail += "</td>";
        strMail += "</tr>";
        strMail += "</tbody>";
        strMail += "</table>";

        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td height=\"10\"></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td  height=\"1\" style=\"border-top:1px dotted #C7C7C7\">&nbsp;</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td height=\"10\"></td>";
        strMail += "</tr>";
        if (dtMultiSite.Rows.Count > 0)
        {

            strMail += "<tr>";
            strMail += "<td><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
            strMail += "<tbody>";

            strMail += "<tr>";
            strMail += "<td width=\"30\"></td>";
            strMail += "<td valign=\"top\" style=\"color:rgb(51,51,51);font-size:14px;line-height:20px;font-family:Arial,'sans serif'\">";
            strMail += "<h3 style=\"font-family:HelveticaNeueBold,HelveticaNeue-Bold,'Helvetica Neue Bold',helvetica,arial,'sans serif';line-height:25px;font-size:22px;color:#CB3024;text-align:left;margin-bottom:10px\">Multi - Site Submitted URLs</h3>";

            strMail += "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" style=\"margin:0px;padding:0px;font-size:12px;width:668px;color:rgb(18,18,18);overflow:hidden; background:#ccc;\">";
            strMail += "<tbody>";
            strMail += "<tr>";
            strMail += "<td style=\"width:200px; background:#ccc; padding:5px\"><strong style=\"color:#333; text-decoration:none\">Site Name</strong></td>";
            strMail += "<td style=\"background:#ccc; padding:5px\"><strong style=\"color:#333; text-decoration:none\">Posted URL</strong></td>";
            strMail += "<td style=\"width:80px;background:#ccc; padding:5px\"><strong style=\"color:#333; text-decoration:none\">Post Date</strong></td>";
            //strMail += "<td style=\"width:80px;background:#ccc; padding:5px\"><strong style=\"color:#333; text-decoration:none\">Expiry Date</strong></td>";
            strMail += "</tr>";

            for (int i = 0; i < dtMultiSite.Rows.Count; i++)
            {
                strMail += "<tr>";
                strMail += "<td style=\"width:200px; background:#fff; padding:5px\"><strong style=\"color:#333; text-decoration:none\">";
                strMail += "<a href=\"#\" style=\"color:#232323\">" + objGeneralFunc.WrapTextByMaxCharacters(dtMultiSite.Rows[i]["SiteName"].ToString(), 30) + "</a></strong></td>";
                strMail += "<td style=\"background:#fff; padding:5px\"><a href='http://" + dtMultiSite.Rows[i]["URL"].ToString() + "'" + " target=\"_blank\" style=\"color:#CB3024\">";
                strMail += "" + objGeneralFunc.WrapTextByMaxCharacters(dtMultiSite.Rows[i]["URL"].ToString(), 40) + "</a></td>";
                strMail += "<td style=\"width:80px;background:#fff; padding:5px\">";
                DateTime dtPostDt = Convert.ToDateTime(dtMultiSite.Rows[i]["UrlPostDate"].ToString());
                string urlPostDate = string.Empty;
                string urlExpiryDate = string.Empty;
                urlPostDate = dtPostDt.ToString("MM/dd/yy");
                if (dtMultiSite.Rows[i]["ValidDays"].ToString() != "")
                {
                    int ValidDays = Convert.ToInt32(dtMultiSite.Rows[i]["ValidDays"].ToString());
                    DateTime dtValidTill = Convert.ToDateTime(dtPostDt.AddDays(ValidDays).ToString());
                    urlExpiryDate = dtValidTill.ToString("MM/dd/yy");
                }
                else
                {
                    urlExpiryDate = "Not Available";
                }
                strMail += urlPostDate + "</td>";
                //strMail += "<td style=\"width:80px;background:#fff; padding:5px\">";
                //strMail += urlExpiryDate + "</td>";
                strMail += "</tr>";
            }

            strMail += "    </tbody>";
            strMail += "    </table>";

            strMail += "    </td>";
            strMail += "<td width=\"30\"></td>";
            strMail += "</tr>";
            strMail += "    </tbody>";
            strMail += "    </table></td>";
            strMail += "</tr>";

            strMail += "<tr>";
            strMail += "<td height=\"18\"></td>";
            strMail += "</tr>";
            strMail += "<tr>";
            strMail += "<td  height=\"1\" style=\"border-top:1px dotted #C7C7C7\">&nbsp;</td>";
            strMail += "</tr>";
        }
        strMail += "<tr>";
        strMail += "<td><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
        strMail += "<tbody>";
        strMail += "<tr>";
        strMail += "<td width=\"30\"></td>";
        strMail += "<td valign=\"top\" style=\"color:#333; font-size:12px;\"><h3 style=\"font-family:HelveticaNeueBold,HelveticaNeue-Bold,'Helvetica Neue Bold',helvetica,arial,'sans serif';line-height:25px;font-size:22px;color:#CB3024;text-align:left;margin-bottom:10px\">";
        strMail += "UCE Listing Preview</h3>";
        strMail += "<table style=\"width: 100%; margin-top: 25px; font-size:12px; color:#333;\">";
        strMail += "<tbody>";
        strMail += "<tr>";
        strMail += "<td colspan=\"2\"><h2 style=\"font-size:15px; margin:0 0 2px 0; line-height:15px; padding:0\">";

        strMail += obUsedCarsInfo[0].YearOfMake + " " + obUsedCarsInfo[0].Make + " " + obUsedCarsInfo[0].Model;
        if (Price != "")
        {
            strMail += " - ";
        }
        strMail += "<span style=\"color:#ff9900\">" + Price + "</span></h2></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td style=\" width:50%; vertical-align: top; line-height:17px\"><strong>Phone: &nbsp;</strong>" + Phone + " <br>";
        strMail += "<strong>Email: &nbsp;</strong>" + obUsedCarsInfo[0].Email + " <br>";
        strMail += "</td>";
        strMail += "<td style=\"vertical-align: top; line-height:17px\"><span style=\"text-transform: capitalize; \">";
        strMail += "<strong>Car Location: </strong>";
        if (City != "")
        {
            if (State != "Unspecified")
            {
                strMail += City + ", ";
            }
            else
            {
                strMail += City + " ";
            }
        }
        if (State != "Unspecified")
        {
            strMail += State + " ";
        }
        strMail += obUsedCarsInfo[0].Zipcode;
        strMail += "</span><br />";
        strMail += "<strong>Seller Type: </strong>Private Seller<br>";
        strMail += "</td>";
        strMail += "</tr>";
        strMail += "    </tbody>";
        strMail += "    </table>";
        strMail += "    <br />";
        strMail += "<h2 style=\"font-size:15px; color:#ff9900;  margin:0 0 2px 0; line-height:15px; padding:0;\">";
        //Make Model
        strMail += "About This  " + obUsedCarsInfo[0].Make.ToString() + " " + obUsedCarsInfo[0].Model.ToString() + "</h2>";
        strMail += "<table style=\"width:99%; margin:0; font-size:12px; color:#333;\">";
        strMail += "<tbody>";
        strMail += "<tr>";
        strMail += "<td style=\"width:50%;vertical-align:top; line-height:17px\"><strong>Make: </strong>" + obUsedCarsInfo[0].Make.ToString() + "<br>";
        strMail += "<strong>Model: </strong> " + obUsedCarsInfo[0].Model.ToString() + "<br>";
        strMail += "<strong>Year: </strong> ";
        strMail += obUsedCarsInfo[0].YearOfMake.ToString() + "<br>";
        strMail += "<strong>Body Style: </strong> ";
        if (obUsedCarsInfo[0].Bodytype.ToString() != "Unspecified")
        {
            strMail += obUsedCarsInfo[0].Bodytype.ToString();
        }
        strMail += "<br><strong>Exterior Color: </strong>";
        if (obUsedCarsInfo[0].ExteriorColor.ToString() != "Unspecified")
        {
            strMail += obUsedCarsInfo[0].ExteriorColor.ToString();
        }
        strMail += "<br><strong>Interior Color: </strong>";
        if (obUsedCarsInfo[0].InteriorColor.ToString() != "Unspecified")
        {
            strMail += obUsedCarsInfo[0].InteriorColor.ToString();
        }
        strMail += "<br><strong>Doors: </strong>";
        if (obUsedCarsInfo[0].NumberOfDoors.ToString() != "Unspecified")
        {
            strMail += obUsedCarsInfo[0].NumberOfDoors.ToString();
        }
        strMail += "<br><strong>Vehicle Condition: </strong>";
        if (obUsedCarsInfo[0].ConditionDescription.ToString() != "Unspecified")
        {
            strMail += obUsedCarsInfo[0].ConditionDescription.ToString();
        }
        strMail += " <br></td><td valign=\"top\" style=\"line-height:17px\"><strong>Price: </strong>" + Price + "<br>";
        strMail += "<strong>Mileage: </strong>";
        if (Mileage != "")
        {
            strMail += Mileage + "ml";
        }
        strMail += "<br><strong>Fuel: </strong>";
        if (obUsedCarsInfo[0].Fueltype.ToString() != "Unspecified")
        {
            strMail += obUsedCarsInfo[0].Fueltype.ToString();
        }
        strMail += "<br><strong>Engine: </strong>";
        if (obUsedCarsInfo[0].NumberOfCylinder.ToString() != "Unspecified")
        {
            strMail += obUsedCarsInfo[0].NumberOfCylinder.ToString();
        }
        strMail += "<br><strong>Transmission: </strong>";
        if (obUsedCarsInfo[0].Transmission.ToString() != "Unspecified")
        {
            strMail += obUsedCarsInfo[0].Transmission.ToString();
        }
        strMail += "<br><strong>DriveTrain: </strong>";
        if (obUsedCarsInfo[0].DriveTrain.ToString() != "Unspecified")
        {
            strMail += obUsedCarsInfo[0].DriveTrain.ToString();
        }
        strMail += "<br><strong>VIN: </strong>";
        if (obUsedCarsInfo[0].VIN.ToString() != "Emp")
        {
            strMail += obUsedCarsInfo[0].VIN.ToString();
        }
        strMail += "<br></td></tr>";
        strMail += "    </tbody>";
        strMail += "      </table>";
        strMail += "        <p style=\"font-size:12px; padding:0; line-height:18px\">";
        strMail += "      <h2 style=\"font-size:15px; margin:0 0 2px 0; line-height:15px; padding:0; color:#ff9900\">Car Specifications</h2>";

        string lblComFeature = string.Empty;
        string lblSeatsFea = string.Empty;
        string lblSafetyFea = string.Empty;
        string lblSoundFea = string.Empty;
        string lblWindowsFea = string.Empty;
        string lblOtherFea = string.Empty;
        string lblNewFea = string.Empty;
        string lblSpecialsFea = string.Empty;

        CarFeatures objCarFeatures = new CarFeatures();

        DataSet CarsDetails = objCarFeatures.GetCarFeatures(Carid);

        if (CarsDetails.Tables[0].Rows.Count > 0)
        {

            for (int k = 0; k < CarsDetails.Tables[0].Rows.Count; k++)
            {
                if (CarsDetails.Tables[0].Rows[k]["FeatureTypeID"].ToString() == "1")
                {

                    if (CarsDetails.Tables[0].Rows[k]["FeatureTypeID"].ToString() == "1")
                    {
                        if (lblComFeature == "")
                        {
                            lblComFeature = CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                        }
                        else
                        {
                            lblComFeature = lblComFeature + ", " + CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                        }
                    }

                }
                if (CarsDetails.Tables[0].Rows[k]["FeatureTypeID"].ToString() == "2")
                {
                    if (lblSeatsFea == "")
                    {
                        lblSeatsFea = CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                    else
                    {
                        lblSeatsFea = lblSeatsFea + ", " + CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                }
                if (CarsDetails.Tables[0].Rows[k]["FeatureTypeID"].ToString() == "3")
                {
                    if (lblSafetyFea == "")
                    {
                        lblSafetyFea = CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                    else
                    {
                        lblSafetyFea = lblSafetyFea + ", " + CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                }
                if (CarsDetails.Tables[0].Rows[k]["FeatureTypeID"].ToString() == "4")
                {
                    if (lblSoundFea == "")
                    {
                        lblSoundFea = CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                    else
                    {
                        lblSoundFea = lblSoundFea + ", " + CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                }
                if (CarsDetails.Tables[0].Rows[k]["FeatureTypeID"].ToString() == "5")
                {
                    if (lblWindowsFea == "")
                    {
                        lblWindowsFea = CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                    else
                    {
                        lblWindowsFea = lblWindowsFea + ", " + CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                }
                if (CarsDetails.Tables[0].Rows[k]["FeatureTypeID"].ToString() == "6")
                {
                    if (lblOtherFea == "")
                    {
                        lblOtherFea = CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                    else
                    {
                        lblOtherFea = lblOtherFea + ", " + CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                }
                if (CarsDetails.Tables[0].Rows[k]["FeatureTypeID"].ToString() == "7")
                {
                    if (lblNewFea == "")
                    {
                        lblNewFea = CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                    else
                    {
                        lblNewFea = lblNewFea + ", " + CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                }
                if (CarsDetails.Tables[0].Rows[k]["FeatureTypeID"].ToString() == "8")
                {
                    if (lblSpecialsFea == "")
                    {
                        lblSpecialsFea = CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                    else
                    {
                        lblSpecialsFea = lblSpecialsFea + ", " + CarsDetails.Tables[0].Rows[k]["FeatureName"].ToString();
                    }
                }
            }
        }

        strMail += "      <p style=\"line-height:18px; padding:0; margin:0;\"><strong>Comfort: </strong>" + lblComFeature + "</p>";
        strMail += "      <p style=\"line-height:18px; padding:0; margin:0;\"><strong>Seats: </strong>" + lblSeatsFea + "</p>";
        strMail += "      <p style=\"line-height:18px; padding:0; margin:0;\"><strong>Safety: </strong>" + lblSafetyFea + "</p>";
        strMail += "      <p style=\"line-height:18px; padding:0; margin:0;\"><strong>Sound: </strong>" + lblSoundFea + "</p>";
        strMail += "      <p style=\"line-height:18px; padding:0; margin:0;\"><strong>Windows: </strong>" + lblWindowsFea + "</p>";
        strMail += "      <p style=\"line-height:18px; padding:0; margin:0;\"><strong>Other: </strong>" + lblOtherFea + "</p>";
        strMail += "      </p>";

        strMail += "      <p style=\" font-size:12px; padding:0\"> <strong style=\"font-size:15px; color:#ff9900\">Description: </strong>" + sDescription + "</p>";
        //strMail += "      <p style=\"font-size:11px; padding:0\"> <strong style=\" font-size: 15px; color:#ff9900\">Surrounding towns:&nbsp;</strong>Berlin, CONNECTICUT(CT); Bloomfield, CONNECTICUT(CT); Branford, CONNECTICUT(CT); Coventry, CONNECTICUT(CT); Danbury, CONNECTICUT(CT); Hamden, CONNECTICUT(CT); </p>";
        //strMail += "      <p style=\"font-size:11px; padding:0\"> <strong style=\" font-size:15px; color:#ff9900\">Near by zip codes: </strong>11701, &nbsp;06401, &nbsp;07712, &nbsp;01721, &nbsp;07716, &nbsp;01501, &nbsp;07001, &nbsp;01436, &nbsp;06063, &nbsp;11706, &nbsp;07002, &nbsp;11361, &nbsp;12508, &nbsp;10506, &nbsp;10507, &nbsp;11426, &nbsp;11710, &nbsp;07719, &nbsp;07621, &nbsp;02779, &nbsp;06037 </p></td>";
        strMail += "<td width=\"30\"></td>";
        strMail += "</tr>";
        strMail += "    </tbody>";
        strMail += "    </table></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td height=\"10\"></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td  height=\"1\" style=\"border-top:1px dotted #C7C7C7\">&nbsp;</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
        strMail += "<tbody>";
        strMail += "<tr>";
        strMail += "<td width=\"30\"></td>";
        strMail += "<td valign=\"top\" style=\"color:rgb(51,51,51);font-size:12px;line-height:20px;font-family:Arial,'sans serif'\"><h1 style=\"font-family:HelveticaNeueBold,HelveticaNeue-Bold,'Helvetica Neue Bold',helvetica,arial,'sans serif';color:rgb(32,31,31);font-size:22px;line-height:25px\"> About United Car Exchange</h1>";
        strMail += "<p><span style=\"color:#CB3024\">United Car Exchange</span>&nbsp;is the america's most trusted online buy &amp; sell used car agency. United car exchange helps in providing an online platform where car buyers and sellers can search, buy, sell and come together to talk about their used/new cars.</p>";
        strMail += "You can contact us any time at our customer contact no: <span style=\"color:#CB3024\">888-786-8307</span> </td>";
        strMail += "<td width=\"30\"></td>";
        strMail += "</tr>";
        strMail += "    </tbody>";
        strMail += "    </table></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td height=\"10\"></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td  height=\"1\" style=\"border-top:1px dotted #C7C7C7\">&nbsp;</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td align=\"center\" style=\"color:underline;font-size:12px;font-weight:normal;font-family:Arial,'sans serif'\"><a href=\"http://unitedcarexchange.com/Default.aspx\" style=\"color:#0000FF;text-decoration:underline\" target=\"_blank\">unitedcarexchange.com</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"http://unitedcarexchange.com/usedcars.aspx\" style=\"color:#0000FF;text-decoration:underline\" target=\"_blank\">Used Cars</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"http://unitedcarexchange.com/Packages.aspx\" style=\"color:#0000FF;text-decoration:underline\" target=\"_blank\">Sell A Car</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"http://unitedcarexchange.com/TermsandConditions.aspx\" style=\"color:#0000FF;text-decoration:underline\" target=\"_blank\">T&amp;C&nbsp;</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"http://unitedcarexchange.com/ContactUs.aspx\" style=\"color:#0000FF;text-decoration:underline\" target=\"_blank\">Contact Us</a></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td height=\"10\"></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td bgcolor=\"#efefef\" height=\"10\"></td>";
        strMail += "</tr>";
        strMail += "    </tbody>";
        strMail += "    </table></td>";
        strMail += "<td colspan=\"2\" valign=\"top\"><img src=\"http://smartz.unitedcarexchange.com/images/shadow-top-right.png\"  style=\"margin-top:1px\"></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td>&nbsp;</td>";
        strMail += "<td width=\"4\" background=\"http://smartz.unitedcarexchange.com/images/shadow-left.png\"></td>";
        strMail += "<td width=\"4\" background=\"http://smartz.unitedcarexchange.com/images/shadow-right.png\"></td>";
        strMail += "<td>&nbsp;</td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td colspan=\"2\"></td>";
        strMail += "<td><img src=\"http://smartz.unitedcarexchange.com/images/shadow-bottom.png\" ></td>";
        strMail += "<td colspan=\"2\"></td>";
        strMail += "</tr>";
        strMail += "    </tbody>";
        strMail += "</table></td>";
        strMail += "</tr>";
        strMail += "<tr>";
        strMail += "<td height=\"40\"></td>";
        strMail += "</tr>";
        strMail += "</tbody>";
        strMail += "</table>";
        return strMail;
    }