public object Get() { var sbCondition = new System.Text.StringBuilder(); sbCondition.AppendFormat("({0}) AND ", string.Format("{0}{1}{2}", "a.CompCode= '", (System.Web.HttpContext.Current.Session["sys_user"] as sys_user).CompCode, "'")); SerachCondition.TextBox(sbCondition, "PdtCode", "a.PdtCode", "varchar"); SerachCondition.TextBox(sbCondition, "PdtName", "a.PdtName", "varchar"); SerachCondition.SelectUser(sbCondition, "PdtCate", "a.PdtCate", "varchar"); SerachCondition.TextBox(sbCondition, "Spec", "a.Spec", "varchar"); SerachCondition.Dropdown(sbCondition, "BaseUnits", "a.BaseUnits", "varchar"); SerachCondition.TextBox(sbCondition, "RetailPrc", "a.RetailPrc", ""); if (sbCondition.Length > 4) { sbCondition.Length -= 4; } var pageReq = new PageRequest(); using (var db = new LUOLAI1401Context()) { return(pageReq.ToPageList <base_productInfoListModel>(db.Database, "a.id ,a.PdtCode ,a.PdtName ,b.CateName PdtCate_RefText ,a.PdtCate ,a.Spec ,c.Text BaseUnits_RefText ,a.BaseUnits ,a.RetailPrc ,a.TradPrc ,a.Description ,a.DelFlag ", "base_productInfo a LEFT JOIN base_productCate b ON a.PdtCate = b.CateName LEFT JOIN [Bcp.Sys].dbo.sys_code c ON a.BaseUnits = c.Value ", sbCondition.ToString(), "a.id", "desc")); } }