Exemple #1
0
    private bool SelectRecord_ProductProfile(int intProductID, int intProfileID)
    {
        bool blnFlag = false;

        try
        {
            using (BOC_Classifieds_Orders bocProductProfile = new BOC_Classifieds_Orders())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();

                eocPropertyBean.Classifieds_ProductProfile_ProductID = intProductID;
                eocPropertyBean.Classifieds_UserProfile_ProfileID    = intProfileID;

                dtProductProfile = bocProductProfile.SelectRecord_ProductProfile_Classifieds(eocPropertyBean);

                if (dtProductProfile.Rows.Count > 0)
                {
                    blnFlag = true;

                    string strAlternatePrice = dtProductProfile.Rows[0]["AlternatePriceOffer"].ToString();
                    string strCurrency       = dtProductProfile.Rows[0]["Currency"].ToString();

                    //lblPricingOffer.Text = String.Format("{0:#,###}", dtProductProfile.Rows[0]["SalePrice"]);

                    if (strAlternatePrice == "-1")
                    {
                        lblPricingOffer.Text = "Price (Not Available)";
                    }
                    else if (strAlternatePrice == "1")
                    {
                        lblPricingOffer.Text = "Best Offer (" + strCurrency + " " + String.Format("{0:#,###}", dtProductProfile.Rows[0]["SalePrice"]) + ")";
                    }
                    else if (strAlternatePrice == "2")
                    {
                        lblPricingOffer.Text = "Please Contact";
                    }
                    else if (strAlternatePrice == "3")
                    {
                        lblPricingOffer.Text = "Exchange";
                    }
                    else if (strAlternatePrice == "4")
                    {
                        lblPricingOffer.Text = "Free";
                    }
                    else if (strAlternatePrice == "5")
                    {
                        lblPricingOffer.Text = "Fixed (" + strCurrency + " " + String.Format("{0:#,###}", dtProductProfile.Rows[0]["SalePrice"]) + ")";
                    }
                    else if (strAlternatePrice == "6")
                    {
                        lblPricingOffer.Text = "Negotiable (" + strCurrency + " " + String.Format("{0:#,###}", dtProductProfile.Rows[0]["SalePrice"]) + ")";
                    }
                    else
                    {
                        lblPricingOffer.Text = "Price (" + strCurrency + " " + String.Format("{0:#,###}", dtProductProfile.Rows[0]["SalePrice"]) + ")";
                    }
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }

        return(blnFlag);
    }