/// <summary> /// 得到一个对象实体 by SQLpara /// </summary> public Lebi_Language_Code GetModel(SQLPara para) { StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 * from [Lebi_Language_Code] "); if (para.Where != "") { strSql.Append(" where " + para.Where + ""); } Lebi_Language_Code model = new Lebi_Language_Code(); DataSet ds = SqlUtils.SqlUtilsInstance.TextExecuteDataset(strSql.ToString(), para.Para); if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["id"].ToString() != "") { model.id = int.Parse(ds.Tables[0].Rows[0]["id"].ToString()); } model.Name = ds.Tables[0].Rows[0]["Name"].ToString(); model.Code = ds.Tables[0].Rows[0]["Code"].ToString(); return(model); } else { return(null); } }
public AdminBase() { if (("," + SYS.PluginUsed + ",").Contains(",Lebi.ERP,")) { IsEditStock = false; } config = ShopCache.GetBaseConfig(); site = new Site(); CurrentLanguage = Language.AdminCurrentLanguage(); CurrentAdminLanguage = Language.AdminCurrentLanguage(); DefaultCurrency = Language.DefaultCurrency(); //page = RequestTool.RequestInt("page", 1); langs = Language.AdminLanguages(); if (CurrentAdminGroup == null) { CurrentAdminGroup = new Lebi_Admin_Group(); } if (site.SiteCount > 1) { //if (Shop.LebiAPI.Service.Instanse.Check("domain3admin")) //{ domain3admin = true; //} } }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Lebi_Language_Code model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [Lebi_Language_Code]("); strSql.Append("Name,Code)"); strSql.Append(" values ("); strSql.Append("@Name,@Code)"); strSql.Append(";select @@IDENTITY"); SqlParameter[] parameters = { new SqlParameter("@Name", model.Name), new SqlParameter("@Code", model.Code) }; object obj = SqlUtils.SqlUtilsInstance.TextExecuteNonQuery(strSql.ToString(), parameters); if (obj == null) { return(1); } else { return(Convert.ToInt32(obj)); } }
/// <summary> /// 得到一个对象实体 by id /// </summary> public Lebi_Language_Code GetModel(int id) { StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 * from [Lebi_Language_Code] "); strSql.Append(" where id=@id"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int, 4) }; parameters[0].Value = id; Lebi_Language_Code model = new Lebi_Language_Code(); DataSet ds = SqlUtils.SqlUtilsInstance.TextExecuteDataset(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["id"].ToString() != "") { model.id = int.Parse(ds.Tables[0].Rows[0]["id"].ToString()); } model.Name = ds.Tables[0].Rows[0]["Name"].ToString(); model.Code = ds.Tables[0].Rows[0]["Code"].ToString(); return(model); } else { return(null); } }
/// <summary> /// 返回默认语言 /// </summary> /// <returns></returns> public static Lebi_Language_Code AdminDefaultLanguage() { Lebi_Language_Code lang = AdminLanguages().FirstOrDefault(); if (lang == null) { lang = new Lebi_Language_Code(); } return(lang); }
/// <summary> /// 返回默认语言 /// </summary> /// <returns></returns> public static Lebi_Language_Code DefaultLanguage() { Lebi_Site site = ShopCache.GetMainSite(); Lebi_Language_Code lang = B_Lebi_Language_Code.GetList("Code in (select Code from [Lebi_Language] where Site_id=" + site.id + ")", "Code asc").FirstOrDefault(); if (lang == null) { lang = new Lebi_Language_Code(); } return(lang); }
/// <summary> /// 绑定对象表单 /// </summary> public Lebi_Language_Code BindForm(Lebi_Language_Code model) { if (HttpContext.Current.Request["Name"] != null) { model.Name = Shop.Tools.RequestTool.RequestString("Name"); } if (HttpContext.Current.Request["Code"] != null) { model.Code = Shop.Tools.RequestTool.RequestString("Code"); } return(model); }
protected void Page_Load(object sender, EventArgs e) { CurrentLanguage = Language.CurrentLanguage(); string action = Shop.Tools.RequestTool.RequestString("__Action"); Type type = this.GetType(); MethodInfo methodInfo = type.GetMethod(action); if (methodInfo != null) { methodInfo.Invoke(this, null); } }
/// <summary> /// 对象实体绑定数据 /// </summary> public Lebi_Language_Code ReaderBind(IDataReader dataReader) { Lebi_Language_Code model = new Lebi_Language_Code(); object ojb; ojb = dataReader["id"]; if (ojb != null && ojb != DBNull.Value) { model.id = (int)ojb; } model.Name = dataReader["Name"].ToString(); model.Code = dataReader["Code"].ToString(); return(model); }
public static Lebi_Language_Code AdminGetLanguage(string lang) { Lebi_Language_Code model = null; if (lang != "") { model = B_Lebi_Language_Code.GetModel("Code='" + lang + "'"); } if (model == null) { model = AdminDefaultLanguage(); } return(model); }
public static string LanguageCheckbox(string InputName, string Code, Lebi_Language_Code lang) { List <Lebi_Language_Code> models = Languages(); string str = ""; foreach (Lebi_Language_Code model in models) { string sel = ""; if (Code.IndexOf(model.Code) > -1) { sel = "checked"; } str += "<label><input type=\"checkbox\" name=\"" + InputName + "\" id=\"" + InputName + "\" shop=\"true\" value=\"" + model.Code + "\" " + sel + ">" + Language.Tag(model.Name, lang.Code) + " </label>"; } return(str); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(Lebi_Language_Code model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update [Lebi_Language_Code] set "); strSql.Append("[Name]=@Name,"); strSql.Append("[Code]=@Code"); strSql.Append(" where id=" + model.id); OleDbParameter[] parameters = { new OleDbParameter("@Name", model.Name), new OleDbParameter("@Code", model.Code) }; AccessUtils.Instance.TextExecuteNonQuery(strSql.ToString(), parameters); }
/// <summary> /// 根据语言代码返回一个语言的实体 /// </summary> /// <param name="lang"></param> /// <returns></returns> public static Lebi_Language_Code GetLanguage(string lang) { Lebi_Language_Code model = null; if (lang != "") { model = B_Lebi_Language_Code.GetModel("Code=lbsql{'" + lang + "'}"); } //if (model == null) // model = B_Lebi_Language.GetList("Code='" + RequestTool.GetConfigKey("DefaultLanguage") + "'", "").FirstOrDefault(); if (model == null) { model = DefaultLanguage(); } return(model); }
public SupplierBase() { site = new Site_Supplier(); CurrentLanguage = Language.CurrentLanguage(); DefaultCurrency = B_Lebi_Currency.GetModel("IsDefault=1"); if (DefaultCurrency == null) { DefaultCurrency = B_Lebi_Currency.GetList("", "Sort desc").FirstOrDefault(); } CurrentCurrency = DefaultCurrency; site = new Site_Supplier(); langs = Language.Languages(); reqPage = RequestTool.GetRequestUrl().ToLower(); }
protected void Page_Load(object sender, EventArgs e) { pid = RequestTool.RequestInt("pid", 0); tid = RequestTool.RequestInt("tid", 0); randnum = RequestTool.RequestInt("randnum", 0); mutiadd_property = RequestTool.RequestInt("mutiadd_property", 0); //1批量添加规格 0否 if (pid == 0 || (pid > 0 && randnum > 0)) { if (!EX_Admin.Power("product_add", "添加商品")) { WindowNoPower(); } } else { if (!EX_Admin.Power("product_edit", "编辑商品")) { WindowNoPower(); } } if (pid > 0 && randnum > 0) { modelp = B_Lebi_Product.GetModel(randnum); } else { modelp = B_Lebi_Product.GetModel(pid); } if (modelp == null) { modelp = new Lebi_Product(); modelp.ProPertyMain = RequestTool.RequestInt("ProPertyMain", 0); modelp.ProPerty131 = RequestTool.RequestString("ProPerty131"); } modelLan = Language.DefaultLanguage(); string where = ""; if (pid == 0 || (pid > 0 && randnum > 0)) { where = "Product_id=" + randnum + " and Product_id!=0"; } else { where = "Product_id=" + pid + " and Product_id!=0"; } models = B_Lebi_Product.GetList(where, ""); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Lebi_Language_Code model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [Lebi_Language_Code]("); strSql.Append("[Name],[Code])"); strSql.Append(" values ("); strSql.Append("@Name,@Code)"); OleDbParameter[] parameters = { new OleDbParameter("@Name", model.Name), new OleDbParameter("@Code", model.Code) }; AccessUtils.Instance.TextExecuteNonQuery(strSql.ToString(), parameters); return(1); }
protected void Page_Load(object sender, EventArgs e) { pid = RequestTool.RequestInt("pid", 0); tid = RequestTool.RequestInt("tid", 0); randnum = RequestTool.RequestInt("randnum", 0); if (pid == 0 || (pid > 0 && randnum > 0)) { if (!Power("supplier_product_add", "添加商品")) { WindowNoPower(); } } else { if (!Power("supplier_product_edit", "编辑商品")) { WindowNoPower(); } } if (pid > 0 && randnum > 0) { modelp = B_Lebi_Product.GetModel("(IsDel!=1 or IsDel is null) and Supplier_id = " + CurrentSupplier.id + " and id = " + randnum); } else { modelp = B_Lebi_Product.GetModel("(IsDel!=1 or IsDel is null) and Supplier_id = " + CurrentSupplier.id + " and id = " + pid); } if (modelp == null) { modelp = new Lebi_Product(); modelp.ProPertyMain = RequestTool.RequestInt("ProPertyMain", 0); modelp.ProPerty131 = RequestTool.RequestString("ProPerty131"); } modelLan = Language.DefaultLanguage(); string where = "(IsDel!=1 or IsDel is null)"; if (pid == 0 || (pid > 0 && randnum > 0)) { where += " and Supplier_id = " + CurrentSupplier.id + " and Product_id=" + randnum + " and Product_id!=0"; } else { where += " and Product_id=" + pid + " and Product_id!=0"; } models = B_Lebi_Product.GetList(where, ""); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(Lebi_Language_Code model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update [Lebi_Language_Code] set "); strSql.Append("Name= @Name,"); strSql.Append("Code= @Code"); strSql.Append(" where id=@id"); SqlParameter[] parameters = { new SqlParameter("@id", SqlDbType.Int, 4), new SqlParameter("@Name", SqlDbType.NVarChar, 200), new SqlParameter("@Code", SqlDbType.NVarChar, 50) }; parameters[0].Value = model.id; parameters[1].Value = model.Name; parameters[2].Value = model.Code; SqlUtils.SqlUtilsInstance.TextExecuteNonQuery(strSql.ToString(), parameters); }
public static string LanguageCheckbox(string InputName, string Code, Lebi_Language_Code lang) { List <Lebi_Language_Code> models = Languages(); string str = ""; foreach (Lebi_Language_Code model in models) { string sel = ""; if (Code.IndexOf(model.Code) > -1) { sel = "checked"; } if (!string.IsNullOrEmpty(RequestTool.GetConfigKey("SystemAdmin").Trim())) { str += "<label class=\"custom-control custom-checkbox m-r-20\"><input type=\"checkbox\" id=\"" + InputName + "" + model.id + "\" name=\"" + InputName + "\" value=\"" + model.Code + "\" class=\"custom-control-input\" shop=\"true\" " + sel + "><span class=\"custom-control-label\">" + Language.Tag(model.Name, lang.Code) + "</span></label>"; } else { str += "<input type=\"checkbox\" name=\"" + InputName + "\" id=\"" + InputName + "" + model.id + "\" shop=\"true\" value=\"" + model.Code + "\" " + sel + "><label for=\"" + InputName + "" + model.id + "\">" + Language.Tag(model.Name, lang.Code) + "</label>"; } } return(str); }
protected void Page_Load(object sender, EventArgs e) { id = RequestTool.RequestInt("id", 0); modelp = B_Lebi_Product.GetModel("Supplier_id = " + CurrentSupplier.id + " and id = " + id); if (modelp == null) { modelp = new Lebi_Product(); modelp.ProPertyMain = RequestTool.RequestInt("ProPertyMain", 0); modelp.ProPerty131 = RequestTool.RequestString("ProPerty131"); } if (!Power("supplier_product_edit", "编辑商品")) { WindowNoPower(); } string property = EX_Product.ProductType_ProPertystr(modelp.Pro_Type_id); if (property != "") { try { ggs = B_Lebi_ProPerty.GetList("Type_id_ProPertyType=131 and id in (lbsql{" + property + "})", "Sort desc"); } catch (System.Data.SqlClient.SqlException) { ggs = new List <Lebi_ProPerty>(); } } if (ggs == null) { ggs = new List <Lebi_ProPerty>(); } modelLan = Language.DefaultLanguage(); string where = ""; where = "Product_id=" + id + " and Product_id!=0 and (IsDel!=1 or IsDel is null)"; models = B_Lebi_Product.GetList(where, ""); }
public static string GetURL(string code, string ParaStr, string url, Lebi_Language_Code langcode) { Lebi_Site site = new Lebi_Site(); if (ShopPage.IsAPP() || ShopPage.IsWechat() || ShopPage.IsWap()) { site = B_Lebi_Site.GetModel("IsMobile = 1 order by Sort asc"); if (site == null) { site = B_Lebi_Site.GetModel("IsMobile = 0 order by Sort asc"); } } else { site = B_Lebi_Site.GetModel("IsMobile = 0 order by Sort asc"); if (site == null) { site = B_Lebi_Site.GetModel("IsMobile = 1 order by Sort asc"); } } Lebi_Language lang = B_Lebi_Language.GetModel("Site_id = " + site.id + " and Code = '" + langcode.Code + "'"); return(GetURL(code, ParaStr, url, lang)); }
/// <summary> /// 订单下载,获得一个订单的详细信息 /// </summary> public void mGetOrder() { string OrderNO = RequestTool.RequestString("OrderNO"); Lebi_Order model = B_Lebi_Order.GetModel("Code=lbsql{'" + OrderNO + "'}"); Lebi_Language_Code lang = Language.DefaultLanguage(); if (model == null) { Response.Write("无此单号"); return; } List <Lebi_Order_Product> pros = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", ""); StringBuilder sb = new System.Text.StringBuilder(); sb.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); sb.Append("<Order>\r\n"); sb.Append("<Ver>2.0</Ver>\r\n"); //OrderNO 订单号 sb.Append("<OrderNO>" + model.Code + "</OrderNO>\r\n"); //DateTime 成交日期 sb.Append("<DateTime>" + model.Time_Add.ToString("yyyy-MM-dd HH:mm:ss") + "</DateTime>\r\n"); //BuyerID 买家用户名 sb.Append("<BuyerID>" + FormatXMLStr(model.User_UserName) + "</BuyerID>\r\n"); //BuyerName 买家姓名 sb.Append("<BuyerName>" + FormatXMLStr(model.T_Name) + "</BuyerName>\r\n"); //Country 国家 sb.Append("<Country>" + FormatXMLStr(EX_Area.GetAreaNameNoPath(model.T_Area_id, 4)) + "</Country>\r\n"); //Province 省/州 sb.Append("<Province>" + FormatXMLStr(EX_Area.GetAreaNameNoPath(model.T_Area_id, 3)) + "</Province>\r\n"); //City 市/县 sb.Append("<City>" + FormatXMLStr(EX_Area.GetAreaNameNoPath(model.T_Area_id, 2)) + "</City>\r\n"); //Town 区/镇 sb.Append("<Town>" + FormatXMLStr(EX_Area.GetAreaNameNoPath(model.T_Area_id, 1)) + "</Town>\r\n"); //Adr 地址 sb.Append("<Adr>" + FormatXMLStr(model.T_Address) + "</Adr>\r\n"); //Zip 邮编 sb.Append("<Zip>" + FormatXMLStr(model.T_Postalcode) + "</Zip>\r\n"); //Email Email sb.Append("<Email>" + FormatXMLStr(model.T_Email) + "</Email>\r\n"); //Phone 联系电话 sb.Append("<Phone>" + FormatXMLStr(model.T_MobilePhone) + "</Phone>\r\n"); //Total 货款总额 sb.Append("<Total>" + model.Money_Product + "</Total>\r\n"); //Postage 货运费用 sb.Append("<Postage>" + model.Money_Transport + "</Postage>\r\n"); //PayAccount 支付方式 sb.Append("<PayAccount>" + FormatXMLStr(Language.Content(model.Pay, lang.Code)) + "</PayAccount>\r\n"); //PayID 支付编号 sb.Append("<PayID></PayID>\r\n"); //LogisticsName 发货方式 sb.Append("<LogisticsName>" + FormatXMLStr(model.Transport_Name) + "</LogisticsName>\r\n"); //Chargetype 结算方式 sb.Append("<Chargetype>" + FormatXMLStr(Language.Content(model.OnlinePay, lang.Code)) + "</Chargetype>\r\n"); //CustomerRemark 客户备注 //发票信息 sb.Append("<CustomerRemark>" + FormatXMLStr(model.Remark_User) + "</CustomerRemark>\r\n"); //Remark 客服备注 sb.Append("<Remark>" + FormatXMLStr(model.Remark_Admin) + "</Remark>\r\n"); foreach (Lebi_Order_Product pro in pros) { Lebi_Product p = B_Lebi_Product.GetModel(pro.Product_id); if (p == null) { continue; } sb.Append(" <Item>\r\n"); //GoodsID 库存编码 sb.Append(" <GoodsID>" + FormatXMLStr(pro.Product_Number) + "</GoodsID>\r\n"); //GoodsName 货品名称 sb.Append(" <GoodsName>" + FormatXMLStr(Language.Content(pro.Product_Name, lang.Code)) + "</GoodsName>\r\n"); //GoodsSpec 货品规格 //sb.Append(" <GoodsSpec>" + FormatXMLStr(EX_Product.ProPertyNameStr(p.ProPerty131, lang)) + "</GoodsSpec>\r\n"); sb.Append(" <GoodsSpec></GoodsSpec>\r\n");//书生定制 //Count 数量 sb.Append(" <Count>" + pro.Count + "</Count>\r\n"); //Price 单价 sb.Append(" <Price>" + pro.Price + "</Price>\r\n"); sb.Append(" </Item>\r\n"); } sb.Append("</Order>\r\n"); Log.Add(sb.ToString(), "网店管家下载订单", ""); Response.Write(sb.ToString()); }
/// <summary> /// 订单发货通知-不更新库存 /// </summary> public void mSndGoods() { //OrderID 订单编号 //OrderNO 原始订单编号 //CustomerID 客户网名 //SndStyle 发货方式 //BillID 货运单号 //SndDate 发货时间 string OrderID = RequestTool.RequestString("OrderID"); string OrderNO = RequestTool.RequestString("OrderNO"); string CustomerID = RequestTool.RequestString("CustomerID"); string SndStyle = RequestTool.RequestString("SndStyle"); string BillID = RequestTool.RequestString("BillID"); string SndDate = RequestTool.RequestString("SndDate"); Lebi_Order model = B_Lebi_Order.GetModel("Code=lbsql{'" + OrderNO + "'}"); Lebi_Language_Code lang = Language.DefaultLanguage(); string res = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"; if (model == null) { res += "<rsp><result>0</result><cause>无此单号</cause></rsp>"; Response.Write(res); return; } Lebi_Transport tran = B_Lebi_Transport.GetModel("[Name]=lbsql{'" + SndStyle + "'}"); if (tran == null) { tran = new Lebi_Transport(); } Lebi_Transport_Order torder = new Lebi_Transport_Order(); torder.Code = BillID; torder.Order_id = model.id; torder.T_Address = model.T_Address; torder.T_Email = model.T_Email; torder.T_MobilePhone = model.T_MobilePhone; torder.T_Name = model.T_Name; torder.T_Phone = model.T_Phone; torder.Transport_Code = tran == null ? model.Transport_Code : tran.Code; torder.Transport_id = tran == null ? model.Transport_id : tran.id; torder.Transport_Name = tran == null ? model.Transport_Name : tran.Name; torder.User_id = model.User_id; List <TransportProduct> tps = new List <TransportProduct>(); TransportProduct tp; List <Lebi_Order_Product> pros = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", ""); bool isfahuo_all = true; foreach (Lebi_Order_Product pro in pros) { tp = new TransportProduct(); tp.Count = pro.Count; tp.ImageBig = pro.ImageBig; tp.ImageMedium = pro.ImageMedium; tp.ImageOriginal = pro.ImageOriginal; tp.ImageSmall = pro.ImageSmall; tp.Product_Number = pro.Product_Number; tp.Product_id = pro.Product_id; tp.Product_Name = pro.Product_Name; tps.Add(tp); pro.Count_Shipped = pro.Count; B_Lebi_Order_Product.Update(pro); //更新库存 Lebi_Product product = B_Lebi_Product.GetModel(pro.Product_id); EX_Product.ProductStock_Change(product, (0 - pro.Count), 302, model); } JavaScriptSerializer jss = new JavaScriptSerializer(); torder.Product = jss.Serialize(tps); torder.Type_id_TransportOrderStatus = 220;//默认状态:在途 B_Lebi_Transport_Order.Add(torder); model.IsShipped = 1; model.IsShipped_All = isfahuo_all ? 1 : 0; model.Time_Shipped = System.DateTime.Now;; B_Lebi_Order.Update(model); Log.Add("订单发货-网站管家", "Order", model.id.ToString()); //发送邮件 if (ShopCache.GetBaseConfig().MailSign.ToLower().Contains("dingdanfahuo")) { Lebi_User user = B_Lebi_User.GetModel(model.User_id); Email.SendEmail_ordershipping(user, model, torder); } res += "<rsp><result>1</result></rsp>"; Response.Write(res); Log.Add("订单编号:" + OrderNO + "--" + res, "网店管家同步发货", ""); }
public static string Tag(string str, Lebi_Language_Code lang) { return(Tag(str, lang.Code)); }
public static string Content(string con, Lebi_Language_Code lang) { return(Content(con, lang.Code)); }
public static string Tag(string str) { Lebi_Language_Code lang = CurrentLanguage(); return(Tag(str, lang.Code)); }
/// <summary> /// 安全方式绑定表单数据 /// </summary> public static Lebi_Language_Code SafeBindForm(Lebi_Language_Code model) { return(D_Lebi_Language_Code.Instance.SafeBindForm(model)); }
/// <summary> /// 增加一条数据 /// </summary> public static int Add(Lebi_Language_Code model) { return(D_Lebi_Language_Code.Instance.Add(model)); }
/// <summary> /// 更新一条数据 /// </summary> public static void Update(Lebi_Language_Code model) { D_Lebi_Language_Code.Instance.Update(model); }
protected void Page_Load(object sender, EventArgs e) { pid = RequestTool.RequestInt("pid", 0); tid = RequestTool.RequestInt("tid", 0); randnum = RequestTool.RequestInt("randnum", 0); if (pid == 0 || (pid > 0 && randnum > 0)) { if (!Power("supplier_product_add", "添加商品")) { WindowNoPower(); } } else { if (!Power("supplier_product_edit", "编辑商品")) { WindowNoPower(); } } if (pid > 0 && randnum > 0) { modelp = B_Lebi_Product.GetModel(randnum); } else { modelp = B_Lebi_Product.GetModel(pid); } if (modelp == null) { modelp = new Lebi_Product(); modelp.ProPertyMain = RequestTool.RequestInt("ProPertyMain", 0); modelp.ProPerty131 = RequestTool.RequestString("ProPerty131"); } if (tid == 0) { tid = modelp.Pro_Type_id; } string property = EX_Product.ProductType_ProPertystr(tid, CurrentSupplier.id); if (property != "") { try { ggs = B_Lebi_ProPerty.GetList("Type_id_ProPertyType=131 and id in (" + property + ")", "Sort desc"); } catch (System.Data.SqlClient.SqlException) { ggs = new List <Lebi_ProPerty>(); } } if (ggs == null) { ggs = new List <Lebi_ProPerty>(); } modelLan = Language.DefaultLanguage(); string where = "Product_id!=0 and (IsDel!=1 or IsDel is null)"; if (pid == 0 || (pid > 0 && randnum > 0)) { where += " and Supplier_id = " + CurrentSupplier.id + " and Product_id=" + randnum + ""; } else { where += " and Supplier_id = " + CurrentSupplier.id + " and Product_id=" + pid + ""; } models = B_Lebi_Product.GetList(where, ""); }