本文整理汇总了C#中BLL.article.get_order_buy_good方法的典型用法代码示例。如果您正苦于以下问题:C# BLL.article.get_order_buy_good方法的具体用法?C# BLL.article.get_order_buy_good怎么用?C# BLL.article.get_order_buy_good使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.article
的用法示例。
在下文中一共展示了BLL.article.get_order_buy_good方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowPage
//.........这里部分代码省略.........
}
}
}
//标签
BLL.tag_good bll_tag_good = new BLL.tag_good();
DataTable dt_tag_good = bll_tag_good.GetList("good_id=" + id).Tables[0];
dt_tag.Columns.Add("title");
foreach (DataRow dr in dt_tag_good.Rows)
{
Model.tag model_tag = new BLL.tag().GetModel(Convert.ToInt32(dr["tag_id"]));
if (model_tag != null)
{
DataRow new_dr = dt_tag.NewRow();
new_dr["title"] = model_tag.title;
dt_tag.Rows.Add(new_dr);
}
}
//推荐搭配
dt_red = bll_meal.GetMealByGood(id, "tuijiandapei").Tables[0];
dt_red.TableName = "dt_red";
if (dt_red != null && dt_red.Rows.Count > 0)
{
DataTable old_dt_red_good = bll_meal_good.GetList("meal_id=" + dt_red.Rows[0]["id"].ToString()).Tables[0];
dt_red_good = new DataTable();
dt_red_good.Columns.Add("meal_id");
dt_red_good.Columns.Add("good_standard_price");
dt_red_good.Columns.Add("title");
dt_red_good.Columns.Add("all_title");
dt_red_good.Columns.Add("good_id");
dt_red_good.Columns.Add("img_url");
dt_red_good.Columns.Add("price");
string str_red_good_ids = ",";
if (old_dt_red_good != null && old_dt_red_good.Rows.Count > 0)
{
foreach (DataRow dr in old_dt_red_good.Rows)
{
if (str_red_good_ids.IndexOf("," + dr["good_id"].ToString() + "_" + dr["standard_price_id"].ToString() + ",") > -1)
{
continue;
}
str_red_good_ids += dr["good_id"].ToString() + "_" + dr["standard_price_id"].ToString() + ",";
Model.article modelt = bll.GetModel(Convert.ToInt32(dr["good_id"]));
if (modelt != null)
{
Model.standard_price model_standard_price = bll_standard_price.GetModel(Convert.ToDecimal(dr["standard_price_id"]));
string str_standard_price = "";
string str_unit = "";
if (model_standard_price != null)
{
for (int i = 0; i < model_standard_price.standards.Split(',').Length; i++)
{
if (!string.IsNullOrEmpty(model_standard_price.standards.Split(',')[i]))
{
str_standard_price += model_standard_price.standards.Split(',')[i];
if (i < model_standard_price.standard_values.Split(',').Length)
{
str_standard_price += ":" + model_standard_price.standard_values.Split(',')[i];
}
}
}
}
Model.unit model_unit = bll_unit.GetModel(Convert.ToDecimal(dr["unit_id"]));
if (model_unit != null)
{
str_unit += "单位:" + model_unit.title + (string.IsNullOrEmpty(model_unit.content) ? "" : model_unit.content);
}
DataRow new_dr = dt_red_good.NewRow();
new_dr["meal_id"] = dr["meal_id"];
new_dr["title"] = Utils.CutString(modelt.title, 10);
new_dr["good_standard_price"] = dr["good_id"].ToString() + dr["standard_price_id"].ToString();
new_dr["all_title"] = modelt.title + " " + str_standard_price + str_unit;
new_dr["img_url"] = modelt.img_url;
new_dr["price"] = dr["sell_price"];
new_dr["good_id"] = dr["good_id"];
dt_red_good.Rows.Add(new_dr);
}
}
dt_red_good.TableName = "dt_red_good";
}
}
//类别相关
if (model_category != null)
{
if (new BLL.article_category().GetModel(model_category.parent_id) != null)
{
parent_category_title = new BLL.article_category().GetModel(model_category.parent_id).title;
dt_category = new BLL.article_category().GetList(model_category.parent_id, "goods");
}
dt_other_goods = bll.get_order_buy_good(5, model_category.id).Tables[0];
}
}