コード例 #1
0
ファイル: CommonController.cs プロジェクト: sanlonezhang/ql
        public ActionResult AjaxQueryManufacturerList()
        {
            ManufacturerQueryFilter qFilter = BuildQueryFilterEntity <ManufacturerQueryFilter>();
            var result = CommonService.QueryManufacturerList(qFilter);

            return(AjaxGridJson(result));
        }
コード例 #2
0
ファイル: CommonDA.cs プロジェクト: sanlonezhang/ql
        public static QueryResult <ManufacturerInfo> QueryManufacturerList(ManufacturerQueryFilter queryFilter)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("QueryManufacturer");

            if (string.IsNullOrEmpty(queryFilter.ManufacturerNameLocal))
            {
                dc.SetParameterValue("@ManufacturerName", "");
            }
            else
            {
                dc.SetParameterValue("@ManufacturerName", "%" + queryFilter.ManufacturerNameLocal.Trim() + "%");
            }

            dc.SetParameterValue("@Status", queryFilter.Status == null ? -999 : (int)queryFilter.Status);
            dc.SetParameterValue("@CompanyCode", "8601");

            dc.SetParameterValue("@SortField", queryFilter.SortFields);
            dc.SetParameterValue("@PageSize", queryFilter.PageSize);
            dc.SetParameterValue("@PageCurrent", queryFilter.PageIndex);

            List <ManufacturerInfo> resultList = dc.ExecuteEntityList <ManufacturerInfo>();;
            int totalCount = (int)dc.GetParameterValue("@TotalCount");

            return(new QueryResult <ManufacturerInfo>()
            {
                PageInfo = new PageInfo()
                {
                    PageIndex = queryFilter.PageIndex,
                    PageSize = queryFilter.PageSize,
                    TotalCount = totalCount,
                    SortBy = queryFilter.SortFields
                },
                ResultList = resultList
            });
        }
コード例 #3
0
        /// <summary>
        /// 查询生产商
        /// </summary>
        /// <returns></returns>
        public virtual DataTable QueryManufacturer(ManufacturerQueryFilter queryCriteria, out int totalCount)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("QueryManufacturer");

            if (string.IsNullOrEmpty(queryCriteria.ManufacturerNameLocal))
            {
                dc.SetParameterValue("@ManufacturerName", "");
            }
            else
            {
                dc.SetParameterValue("@ManufacturerName", "%" + queryCriteria.ManufacturerNameLocal.Trim() + "%");
            }

            dc.SetParameterValue("@Status", queryCriteria.Status == null ? -999 : (int)queryCriteria.Status);
            dc.SetParameterValue("@CompanyCode", "8601");

            dc.SetParameterValue("@SortField", queryCriteria.PagingInfo.SortBy);
            dc.SetParameterValue("@PageSize", queryCriteria.PagingInfo.PageSize);
            dc.SetParameterValue("@PageCurrent", queryCriteria.PagingInfo.PageIndex);

            var source = dc.ExecuteDataTable(5, typeof(ManufacturerStatus));;

            totalCount = (int)dc.GetParameterValue("@TotalCount");
            return(source);
        }
コード例 #4
0
        public QueryResult QueryManufacturerCategory(ManufacturerQueryFilter queryCriteria)
        {
            int totalCount;
            var entity = ObjectFactory <IManufacturerQueryDA> .Instance.GetManufacturerCategoryBySysNo(queryCriteria, out totalCount);

            return(new QueryResult()
            {
                Data = entity, TotalCount = totalCount
            });
        }
コード例 #5
0
        public UCManufacturerQuery()
        {
            InitializeComponent();

            BindComboBoxData();

            serviceFacade    = new VendorManufacturerFacade(CurrentPage);
            queryVM          = new VendorManufacturerQueryVM();
            queryFilter      = new ManufacturerQueryFilter();
            this.DataContext = queryVM;
        }
コード例 #6
0
        /// <summary>
        /// 获取品牌旗舰店首页类别
        /// </summary>
        /// <param name="manufacturerSysNo"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        public DataTable GetManufacturerCategoryBySysNo(ManufacturerQueryFilter queryCriteria, out int totalCount)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("GetBrandShipCategoriesByManufacturerSysNo");

            dc.SetParameterValue("@ManufacturerSysNo", queryCriteria.ManufacturerID);
            dc.SetParameterValue("@SortBy", queryCriteria.PagingInfo.SortBy);
            dc.SetParameterValue("@PageSize", queryCriteria.PagingInfo.PageSize);
            dc.SetParameterValue("@PageCurrent", queryCriteria.PagingInfo.PageIndex);
            var source = dc.ExecuteDataTable();

            totalCount = (int)dc.GetParameterValue("@TotalCount");
            return(source);
        }
コード例 #7
0
        public QueryResult QueryManufacturer(ManufacturerQueryFilter request)
        {
            if (request == null)
            {
                throw new BizException(ResouceManager.GetMessageString("IM.Category", "CategoryCondtionInvalid"));
            }
            int totalCount;
            var dataTable = ObjectFactory <IManufacturerQueryDA> .Instance.QueryManufacturer(request, out totalCount);

            return(new QueryResult()
            {
                Data = dataTable,
                TotalCount = totalCount
            });
        }
コード例 #8
0
        public void QueryManufacturerCategory(string manufacturerSysNo, int pageSize, int pageIndex, string sortField, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            ManufacturerQueryFilter filter = new ManufacturerQueryFilter();

            filter.PagingInfo = new PagingInfo
            {
                PageSize  = pageSize,
                PageIndex = pageIndex,
                SortBy    = sortField
            };
            filter.ManufacturerID = manufacturerSysNo.ToString();
            string relativeUrl = "/IMService/Manufacturer/QueryManufacturerCategory";

            restClient.QueryDynamicData(relativeUrl, filter, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                callback(obj, args);
            });
        }
コード例 #9
0
ファイル: CommonService.cs プロジェクト: sanlonezhang/ql
 public static QueryResult <ManufacturerInfo> QueryManufacturerList(ManufacturerQueryFilter queryFilter)
 {
     return(CommonDA.QueryManufacturerList(queryFilter));
 }
コード例 #10
0
        public void QueryManufacturers(ManufacturerQueryFilter request, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            string relativeUrl = "/IMService/Manufacturer/QueryManufacturer";

            restClient.QueryDynamicData(relativeUrl, request, callback);
        }
コード例 #11
0
 public UCManufacturerPicker()
 {
     InitializeComponent();
     queryFilter  = new ManufacturerQueryFilter();
     this.Loaded += new RoutedEventHandler(UCManufacturerPicker_Loaded);
 }