Esempio n. 1
0
        public ActionResult Index()
        {
            var breedarea   = _areaService.GetAreaGridList(1, 1000);
            var varietyList = _varietyService.GetVarietyList();

            ViewBag.BreedArea   = new SelectList(breedarea.rows, "AreaID", "AreaName");
            ViewBag.VarietyList = new SelectList(varietyList, "VarietyName", "VarietyName");
            return(View());
        }
        /// <summary>
        ///获取数据列表
        /// </summary>
        /// <param name="page"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        public JsonResult GetList(int page, int rows)
        {
            var data = new GridList <BreedAreaDto>();

            try
            {
                data = _areaService.GetAreaGridList(page, rows);
            }
            catch (Exception)
            {
            }

            return(Json(data));
        }