Example #1
0
        public ActionResult GetCodeItemsByBaseCodeId(int id)
        {
            var codeitems = _baseCodeService.GetCodeItemsByBaseCodeId(id);

            if (Request.IsAjaxRequest())
            {
                return(Json((codeitems == null?null:codeitems.Select(n => new { BaseCodeCodeType = (n.BaseCode == null ? "" : n.BaseCode.CodeType), Id = n.Id, Code = n.Code, Text = n.Text, BaseCodeId = n.BaseCodeId })), JsonRequestBehavior.AllowGet));
            }
            return(View(codeitems));
        }
        public ActionResult GetCodeItemsByBaseCodeId(int id)
        {
            var codeitems = _baseCodeService.GetCodeItemsByBaseCodeId(id);

            if (Request.IsAjaxRequest())
            {
                return(Json(codeitems.Select(n => new { BaseCodeCodeType = n.BaseCode.CodeType, n.Id, n.Code, n.Text, n.BaseCodeId }), JsonRequestBehavior.AllowGet));
            }
            return(View(codeitems));
        }