예제 #1
0
 public ActionResult UpdateApplication(Application app)
 {
     UserModel m = CurrentUserModel;
     m.CheckIsSiteAdmin ();
     if (app.Id != -1) {
         Application capp = CurrentServiceModel.GetApplication (app.Id);
         capp.Name = app.Name;
         capp.Subdomain = app.Subdomain;
         capp.Platforms = app.Platforms;
         CurrentServiceModel.UpdateApplication (capp);
     }
     else {
         app.Description = "<p>This is the home page of the add-in repository for " + app.Name + "</p><p>Click on the 'Edit Page' link to change the content of this welcome page</p>";
         CurrentServiceModel.CreateApplication (app);
     }
     return RedirectToAction ("Index");
 }
예제 #2
0
 public void CreateApplication(Application app)
 {
     db.InsertObject (app);
 }
예제 #3
0
 public ActionResult NewApplication()
 {
     CurrentUserModel.CheckIsSiteAdmin ();
     Application app = new Application ();
     app.Id = -1;
     return View ("EditApplication", app);
 }
예제 #4
0
 public void UpdateApplication(Application app)
 {
     db.UpdateObject (app);
 }