Пример #1
0
        public void SearchSuppliers()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchSupplierArgs args = new SearchSupplierArgs();

                    args.OrderBy = "[Created] Desc";
                    if (!string.IsNullOrEmpty(parm.Category))
                    {
                        args.Category = parm.Category;
                    }
                    if (!string.IsNullOrEmpty(parm.SupplierCode))
                    {
                        args.SupplierCode = parm.SupplierCode;
                    }

                    if (!string.IsNullOrEmpty(parm.SupplierName))
                    {
                        args.SupplierName = parm.SupplierName;
                    }

                    if (!string.IsNullOrEmpty(parm.Mobile))
                    {
                        args.Mobile = parm.Mobile;
                    }

                    if (!string.IsNullOrEmpty(parm.Province))
                    {
                        args.Province = parm.Province;
                    }

                    if (!string.IsNullOrEmpty(parm.City))
                    {
                        args.City = parm.City;
                    }
                    if (!string.IsNullOrEmpty(parm.Address))
                    {
                        args.Address = parm.Address;
                    }
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;
                    SearchResult sr = p.Client.SearchSupplier(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                //WriteError(ex.Message, ex);
                throw ex;
            }
        }
Пример #2
0
 public SearchResult SearchSupplier(Sender sender, SearchSupplierArgs args)
 {
     try
     {
         using (ObjectProxy op = new ObjectProxy())
         {
             return(op.SearchSupplier(args));
         }
     }
     catch (Exception ex)
     {
         PLogger.LogError(ex);
         throw ex;
     }
 }