void categoryGrid_RowCommand(object sender, GridViewCommandEventArgs e) { CategoryTableAdapter categoryAdapter = new CategoryTableAdapter(); int categoryId = Int32.Parse(e.CommandArgument.ToString()); if (e.CommandName == "up") { categoryAdapter.MoveUp(categoryId); } else if (e.CommandName == "down") { categoryAdapter.MoveDown(categoryId); } }