コード例 #1
0
    protected void btnSubmitFeed_Click(object sender, EventArgs e)
    {
        feedbackEntity feedbackEntityObj = new feedbackEntity();

        feedbackEntityObj.feedName_     = txtFeedName.Text.Trim();
        feedbackEntityObj.feedEmail_    = txtFeedEmail.Text.Trim();
        feedbackEntityObj.feedMobile_   = Convert.ToDecimal(txtFeedMobile.Text.Trim());
        feedbackEntityObj.feedFeedback_ = txtFeedFeedback.Text.Trim();

        addFeedbackBAL addFeedbackBALObj = new addFeedbackBAL();

        addFeedbackBALObj.addFeedbackBALF(feedbackEntityObj);
    }
コード例 #2
0
        public void addFeedbackDALF(feedbackEntity feedbackEntityObj)
        {
            string CS = ConfigurationManager.ConnectionStrings["PTS_DatabaseConnectionString1"].ConnectionString;

            using (SqlConnection conObj = new SqlConnection(CS))
            {
                SqlCommand cmdObj = new SqlCommand("addFeedback", conObj);
                cmdObj.CommandType = CommandType.StoredProcedure;

                cmdObj.Parameters.AddWithValue("@feedName", feedbackEntityObj.feedName_);
                cmdObj.Parameters.AddWithValue("@feedEmail", feedbackEntityObj.feedEmail_);
                cmdObj.Parameters.AddWithValue("@feedMobile", feedbackEntityObj.feedMobile_);
                cmdObj.Parameters.AddWithValue("@feedFeedback", feedbackEntityObj.feedFeedback_);

                conObj.Open();
                cmdObj.ExecuteNonQuery();
            }
        }
コード例 #3
0
        public void addFeedbackBALF(feedbackEntity feedbackEntityObj)
        {
            addFeedbackDAL addFeedbackDALObj = new addFeedbackDAL();

            addFeedbackDALObj.addFeedbackDALF(feedbackEntityObj);
        }