public string get_sales(string id) { string str = ""; try { Tea.Model.article model = new Tea.BLL.article().GetModel(int.Parse(id)); if (model.sell_price > 0 && model.sell_price < model.market_price) { str = "<a><img src=\"/images/ico-yh.gif\" alt=\"優惠中\" /></a>"; } DataSet d_s_s = Tea.DBUtility.DbHelperSQL.Query("select id from shop_goods where parent_id=" + id + " and yu_lock>0"); if (d_s_s.Tables[0].Rows.Count > 0) { str = "<a><img src=\"/images/ico-yh.gif\" alt=\"優惠中\" /></a>"; } if (model.brand_id == 2) { str = str + "<a><img src=\"/images/ico-yg1.gif\" alt=\"預購\" /></a>"; } } catch (Exception eee) { } return(str); }