Exemplo n.º 1
0
 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");
     }
 }
Exemplo n.º 2
0
        /// <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);
        }