Exemplo n.º 1
0
    /// <summary>
    /// 查询商品使用的促销方式 by szj 2016-04-13
    /// </summary>
    /// <param name="proID">促销ID</param>
    public static string ProType(object proID)
    {
        string TheLabel = string.Empty;

        if (proID.ToString() != "")
        {
            DataTable dt = new Hi.BLL.BD_Promotion().ProType(proID.ToString());

            if (dt != null && dt.Rows.Count > 0)
            {
                TheLabel = "<div class=\"sale-box\"><i class=\"sale\">促销</i><div class=\"sale-txt\"><i class=\"arrow\"></i>";
                if (dt.Rows[0]["Type"].ToString() == "0")
                {
                    TheLabel += "特价商品";
                }
                else if (dt.Rows[0]["Type"].ToString() == "1")
                {
                    if (dt.Rows[0]["Protype"].ToString() == "3")
                    {
                        TheLabel += "满" + OrderInfoType.GetNum(dt.Rows[0]["DisCount"].ToString().ToDecimal(0)) + "件" + ",获赠商品(" + OrderInfoType.GetNum(dt.Rows[0]["GoodsPrice"].ToString().ToDecimal(0)) + ")个";
                    }
                    else
                    {
                        TheLabel += "在原订货价基础上已打(" + Convert.ToInt32(dt.Rows[0]["DisCount"]) + ")%折";
                    }
                }
                TheLabel += " </div></div>";
            }
        }

        return(TheLabel);
    }