public List <DBA.Model.Goods> SearchProject2(Conris.DBA.ViewModel.GoodsSearch model) { if (model == null) { return(null); } StringBuilder sb = new StringBuilder(" (GoodsKC>Max or GoodsKC<Min)"); if (!string.IsNullOrEmpty(model.GoodsName)) { sb.Append(" And GoodsName like '%" + model.GoodsName + "%'"); } if (!string.IsNullOrEmpty(model.GoodsCBS)) { sb.Append(" And GoodsCBS like '%" + model.GoodsCBS + "%'"); } if (!string.IsNullOrEmpty(model.ISBN)) { sb.Append(" And ISBN like '%" + model.ISBN + "%'"); } if (!string.IsNullOrEmpty(model.GoodsZZ)) { sb.Append(" And GoodsZZ like '%" + model.GoodsZZ + "%'"); } if (!string.IsNullOrEmpty(model.CategoryID)) { sb.Append(" And CategoryID = '" + model.CategoryID + "'"); } sb.Append(" Order by ID Desc"); return(GetModelList(sb.ToString())); }
public PartialViewResult GoodsSearch(Conris.DBA.ViewModel.GoodsSearch model) { List <SelectListItem> select1 = new List <SelectListItem>(); select1.Add(new SelectListItem { Text = "请选择", Value = "" }); List <DBA.Model.Category> list = depbll.GetModelList(" Str1='1'"); for (int i = 0; i < list.Count; i++) { select1.Add(new SelectListItem { Text = list[i].CategoryName, Value = list[i].ID.ToString() }); } ; ViewData["CategoryID"] = new SelectList(select1, "Value", "Text", ""); return(PartialView(model)); }
public ActionResult GoodsManage(Conris.DBA.ViewModel.GoodsSearch model) { return(View(model)); }
public PartialViewResult YGoodsList(Conris.DBA.ViewModel.GoodsSearch model) { return(PartialView(bll.SearchProject2(model))); }