コード例 #1
0
 public postEvent UpdateEventFeedBack(postEvent Model, string email)
 {
     using (SqlConnection connection3 = new SqlConnection(GlobalConf.CnnString("MyDatabaseDeneme")))
     {
         connection3.Open();
         string query = "INSERT INTO tblReview(reviewerId, review, reviewedEventId)values((select id from tblPerson where email = '" + email + "'),'" + Model.Review + "', " + Model.EventID + ")";
         using (SqlCommand cmd = new SqlCommand(query, connection3))
         {
             cmd.ExecuteNonQuery();
         }
     }
     return(Model);
 }
コード例 #2
0
ファイル: FeedBack.cs プロジェクト: elazabmohamed/theEvent
        private void BAddReview_Click(object sender, EventArgs e)
        {
            postEvent model = new postEvent();

            model.EventName = dataGridView1.ToString();
            model.Review    = tbFeedBack.Text;
            model.EventID   = (int)dataGridView1.CurrentCell.Value;

            foreach (IDataConnection db in GlobalConf.Connections)
            {
                db.UpdateEventFeedBack(model, LogLabel.Text);
            }
            FillDataGridView();
        }