public JsonResult Delete(Guid userID)
 {
     var users = new UsersDB();
     users.DeleteUser(userID);
     return Json("ok");
 }
Example #2
0
        /// <summary>
        /// deletex
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.Web.UI.WebControls.GridViewDeleteEventArgs"/> instance containing the event data.</param>
        protected void allUsers_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            GridView usersGrid = (GridView) sender;
            GridViewRow row = usersGrid.Rows[e.RowIndex];
            Guid _userID = new Guid(((Appleseed.Framework.Web.UI.WebControls.LinkButton) row.FindControl("DeleteBtn")).CommandArgument);

            // TODO: Fix this
            UsersDB users = new UsersDB();
            users.DeleteUser(_userID);

            OnDelete();
        }