Пример #1
0
        public ActionResult Add(string application)
        {
            PackageAddModel model = new PackageAddModel();

            model.Application = application;
            return(this.View("Add", model));
        }
Пример #2
0
		public ActionResult AddSubmit(PackageAddModel model) {
			if(model.File != null && model.File.ContentLength > 0) {
				Logger.Info(this, "Received package upload " + model.File.FileName);
				Core.Package package = BytePackage.Create(model.File.InputStream.ReadAllBytes(), model.File.FileName);
				Persistence.Application fileSystemApplication = this._repository.GetApplication(model.Application);
				this._repository.CreatePackage(fileSystemApplication, package);
			}
			return this.RedirectToAction("List", new { application = model.Application });
		}
Пример #3
0
 public ActionResult AddSubmit(PackageAddModel model)
 {
     if (model.File != null && model.File.ContentLength > 0)
     {
         Logger.Info(this, "Received package upload " + model.File.FileName);
         Core.Package            package = BytePackage.Create(model.File.InputStream.ReadAllBytes(), model.File.FileName);
         Persistence.Application fileSystemApplication = this._repository.GetApplication(model.Application);
         this._repository.CreatePackage(fileSystemApplication, package);
     }
     return(this.RedirectToAction("List", new { application = model.Application }));
 }
Пример #4
0
		public ActionResult Add(string application) {
			PackageAddModel model = new PackageAddModel();
			model.Application = application;
			return this.View("Add", model);
		}