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"); }
public void CreateApplication(Application app) { db.InsertObject (app); }
public ActionResult NewApplication() { CurrentUserModel.CheckIsSiteAdmin (); Application app = new Application (); app.Id = -1; return View ("EditApplication", app); }
public void UpdateApplication(Application app) { db.UpdateObject (app); }