コード例 #1
0
    // Create a new department
    protected void createDepartment_Click(object sender, EventArgs e)
    {
        // Execute the insert command
        bool success = CatalogBLO.AddDepartment(newName.Text, newDescription.Text);

        // Display status message
        statusLabel.Text = success ? "Insert successful" : "Insert failed";
        // Reload the grid
        BindGrid();
    }