Пример #1
0
        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)));
        }
Пример #2
0
        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));
        }