public ActionResult Detail(int deployId) { DeployRecordBusiness b = new DeployRecordBusiness(); var o = b.GetDeployRecord(deployId); ViewBag.DeployId = deployId; return View(o); }
public ActionResult Create(int packageId) { DeployRecordBusiness b = new DeployRecordBusiness(); var o = b.AddDeployRecord(packageId); if (o != null) return RedirectToAction("Detail", new { deployId = o.DeployId }); return View(); }
public JsonResult GetNewDeployedPackageUUId(bool verified) { DeployRecordBusiness b = new DeployRecordBusiness(); Package p = b.GetNewDeployedPackage(verified); return Json(new { status = 0, result = new { uuid = p == null ? "" : p.Fingerprint } }, JsonRequestBehavior.AllowGet); }
public ActionResult Index() { DeployRecordBusiness b = new DeployRecordBusiness(); var list = b.GetDeployedRecordList(); return View(list); }
// // GET: /Package/ public ActionResult Index(int pageIndex = 1, int pageSize = 10) { PackageBusiness b = new PackageBusiness(); var list = b.GetPackageList(); var count = b.GetPackageCount(); DeployRecordBusiness drb = new DeployRecordBusiness(); var packageIdAndDeployedCountPairs = drb.GetDeployCountForPackage(list.Select(p => p.PackageId)); List<PackageModel> results = new List<PackageModel>(); list.ForEach(p => { var q = ObjectCopier.Copy<PackageModel>(p); q.ExtraInfo = "暂未发布"; if (packageIdAndDeployedCountPairs.ContainsKey(p.PackageId)) q.ExtraInfo = string.Format("已发布{0}次", packageIdAndDeployedCountPairs[p.PackageId]); results.Add(q); }); return View(results); }