private void button6_Click(object sender, EventArgs e) { String status = cmb_status.Text; String code_block = txt_source1.Text; BugHistory bg = new BugHistory() { bug_id = Tbl_data_error_id, user_id = id, status = status, code_block = code_block }; BugHistoryDAO bug = new BugHistoryDAO(); int done = bug.Insert(bg); if (done != 0) { MessageBox.Show("Updated"); } }
private void tbl_data_history_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) { MessageBox.Show("You Cannot Select This Row"); } else { String value = Tbl_data_history.Rows[e.RowIndex].Cells[0].Value.ToString(); int bug_id1 = int.Parse(value); BugHistory bg = new BugHistory() { id = bug_id1 }; BugHistoryDAO bug = new BugHistoryDAO(); String code = bug.GetCodeBlock(bg); fast1.Text = code; } }