Ejemplo n.º 1
0
        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);
            }
        }