예제 #1
0
        /// <summary>
        /// 查询所有 合作快递公司
        /// </summary>
        /// <returns>
        /// 执行方法结果
        /// </returns>
        public JsonResult QuerySelectListItems()
        {
            var service = new ConfigDeliveryCorporationService();

            var list = service.QueryAllConfigDeliveryCorporations();
            if (list != null)
            {
                return Json(list, JsonRequestBehavior.AllowGet);
            }

            return this.Json(null);
        }
예제 #2
0
        /// <summary>
        /// 获取所有的合作快递公司信息
        /// </summary>
        public ActionResult QueryCorporation([DataSourceRequest] DataSourceRequest request)
        {
            var service = new ConfigDeliveryCorporationService();

            var list = service.QueryAllConfigDeliveryCorporations();
            if (list != null)
            {
                var modelList = new List<ConfigDeliveryCorporationModel>();

                foreach (var config in list)
                {
                    modelList.Add(
                        DataTransfer.Transfer<ConfigDeliveryCorporationModel>(
                            config,
                            typeof(Config_Delivery_Corporation)));
                }

                return Json(modelList.ToDataSourceResult(request));
            }

            return this.View();
        }