// GET: App public ActionResult Index(int pageindex = 1, int appId = 0, string kword = "") { long totalItem; var dto = AppSettingBusiness.GetAppSettings(appId, pageindex, 20, kword, out totalItem); var app = AppBusiness.GetAppById(appId); if (app != null) { ViewData["Evn"] = AppBusiness.GetAppById(appId).Environment; ViewData["ProjectName"] = AppBusiness.GetAppById(appId).AppId; } else { ViewData["Evn"] = "无法识别"; ViewData["ProjectName"] = "无法识别"; } return(View(new PagedList <AppSettingDto>(dto, pageindex, 20, (int)totalItem))); }
public JsonResult GetAppById(int id) { var appdto = AppBusiness.GetAppById(id); appdto.Envs = new List <ConfigEnvironment>(); appdto.Envs.Add(new ConfigEnvironment() { Name = "DEV", Desc = "DEV(开发环境)" }); appdto.Envs.Add(new ConfigEnvironment() { Name = "ALPHA", Desc = "ALPHA(测试环境)" }); appdto.Envs.Add(new ConfigEnvironment() { Name = "PROD", Desc = "PROD(正式环境)" }); return(Json(new ResponseResult(ResultEnum.IsSuccess.成功, "获取成功", appdto))); //return Json(AppBusiness.GetAppById(id), JsonRequestBehavior.AllowGet); }
// GET: App public ActionResult Index(int pageindex = 1, string kword = "", int appId = 0) { long totalItem; int pageSize = 15; var pageList = AppSettingBusiness.GetAppSettings(appId, pageindex, pageSize, kword, out totalItem).ToPagedList(pageindex, pageSize, totalItem); var app = AppBusiness.GetAppById(appId); ViewBag.appid = appId; if (app != null) { ViewData["Evn"] = app.Environment; ViewData["ProjectName"] = app.AppId; } else { ViewData["Evn"] = "无法识别"; ViewData["ProjectName"] = "无法识别"; } return(View(pageList)); }
public JsonResult GetAppById(int id) { return(Json(AppBusiness.GetAppById(id), JsonRequestBehavior.AllowGet)); }
public JsonResult GetAppById(int id) { return(Json(new ResponseResult(ResultEnum.IsSuccess.成功, "获取成功", AppBusiness.GetAppById(id)), JsonRequestBehavior.AllowGet)); //return Json(AppBusiness.GetAppById(id), JsonRequestBehavior.AllowGet); }