public SearchResult SearchMaterialQuotePrice(Sender sender, SearchMaterialQuotePriceArgs args) { try { using (ObjectProxy op = new ObjectProxy()) { return(op.SearchMaterialQuotePrice(args)); } } catch (Exception ex) { PLogger.LogError(ex); throw ex; } }
public void SearchMaterialPrice() { try { using (ProxyBE p = new ProxyBE()) { SearchMaterialQuotePriceArgs args = new SearchMaterialQuotePriceArgs(); args.OrderBy = "MaterialCode"; args.RowNumberFrom = pagingParm.RowNumberFrom; args.RowNumberTo = pagingParm.RowNumberTo; if (!string.IsNullOrEmpty(Request["Category"])) { args.Categorys = new List <string>(); args.Categorys.Add(Request["Category"].ToString()); } if (!string.IsNullOrEmpty(Request["SubCategory"])) { args.SubCategorys = new List <string>(); args.SubCategorys.Add(Request["SubCategory"].ToString()); } if (!string.IsNullOrEmpty(Request["MaterialName"])) { args.MaterialName = Request["MaterialName"].ToString(); } if (!string.IsNullOrEmpty(Request["Style"])) { args.Style = Request["Style"].ToString(); } if (!string.IsNullOrEmpty(Request["Color"])) { args.Color = Request["Color"].ToString(); } SearchResult sr = p.Client.SearchMaterialQuotePrice(SenderUser, args); Response.Write(JSONHelper.Dataset2Json(sr.DataSet)); } } catch (Exception ex) { WriteError(ex.Message, ex); } }