コード例 #1
0
        protected void btnAuthorSubmit_Click(object sender, EventArgs e)
        {
            string commandText = "INSERT INTO Authors VALUES ('" + txtLastName.Text + "', '" + txtFirstName.Text
                                 + "', '" + txtGender.Text + "', '" + txtBirthDate.Text + "')";

            SQLquery.RunQuery(commandText);
        }
コード例 #2
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string commandText = "INSERT INTO Publishers VALUES ('" + txtPublisherName.Text + "', '" + txtAddress.Text
                                 + "', '" + txtCity.Text + "', '" + txtPostalCode.Text + "', '" + txtCountry.Text + "', '"
                                 + txtPhone.Text + "')";

            SQLquery.RunQuery(commandText);
        }
コード例 #3
0
        protected void btnBookSubmit_Click(object sender, EventArgs e)
        {
            string commandText = "INSERT INTO Books VALUES ('" + txtTitle.Text + "', "
                                 + ddlAuthor.SelectedValue + ", " + txtPrice.Text + ", '" + txtPublishDate.Text
                                 + "', " + ddlPublisher.SelectedValue + ", " + ddlGenre.SelectedValue + ", "
                                 + txtWordCount.Text + ")";

            SQLquery.RunQuery(commandText);
        }