public ActionResult CreatePackage(FormCollection collection) { List <Int64> checked_file_ids = CreateFilesList(collection); if (checked_file_ids.Count == 0) { return(RedirectToAction("Index", "File")); } return(View(PackageHelper.CreateModel(checked_file_ids))); }
public ActionResult Edit(Int64 id) { var package_srv = CompositionRoot.Resolve <IPackageService>(); var package = package_srv.GetPackageById(id); if (package == null) { throw new Exception(string.Format("Не найден пакет с идентификатором {0}", id)); } PackageModel model = PackageHelper.CreateModel(package); return(View(model)); }