protected void ButtonAdd_OnClick(object sender, EventArgs e) { if (IsValid) { Permission p = new Permission(); DataBindingManagerPermission.DataSource = p; DataBindingManagerPermission.PullData(); Permissions.Insert(p); Response.Redirect("Permissions.aspx"); } }
/// <summary> /// Inserts a new Permission into the database. /// </summary> /// <param name="p"> /// A <see cref="Permission"/> /// </param> public static void Insert(Permission p) { p.ID = Guid.NewGuid(); DataStore ds = DataStoreServices.GetDataStore("Xenosynth"); ds.Insert(p); }