/// <summary> /// 获取一个设置值 /// </summary> /// <param name="key"></param> /// <returns></returns> public static string Get(string key) { Lebi_DT_Config conf = B_Lebi_DT_Config.GetModel("DT_id = " + ShopPage.GetDT() + " and Name='" + key + "'"); if (conf == null) { return(""); } return(conf.Value); }
public decimal ProductPrice_Market(Lebi_Product pro) { //<-{获取分销价格 int DT_id = ShopPage.GetDT(); if (DT_id > 0) { Lebi_DT_Product DT_product = B_Lebi_DT_Product.GetModel("DT_id = " + DT_id + " and Product_id = " + pro.id); if (DT_product != null) { return(DT_product.Price_Market); } } //}-> return(pro.Price_Market); }
/// <summary> /// 设置一个设置值 /// </summary> /// <param name="key"></param> /// <param name="value"></param> public static void Set(string key, string value) { Lebi_DT_Config conf = B_Lebi_DT_Config.GetModel("DT_id = " + ShopPage.GetDT() + " and Name='" + key + "'"); if (conf == null) { conf = new Lebi_DT_Config(); conf.Name = key; conf.Value = value; B_Lebi_DT_Config.Add(conf); } else { conf.Value = value; B_Lebi_DT_Config.Update(conf); } }