private void ConfirmBtn_Click(object sender, EventArgs e) { using (querey.connection = querey.NewConn) { using (querey.command = querey.NewComm) { querey.command.CommandText = "INSERT INTO TeacherRequest (StudentId, TeacherId) VALUES (@student, @teacher);"; querey.AddParameter("@student", _student.Id); querey.AddParameter("@teacher", teacherId); querey.command.ExecuteNonQuery(); } } new Email(teacherEmail, "Connection request", "Hello " + teacherName + ",\n\n" + _student.FirstName + "has sent a request to use your sets. Please log on to accept or decline this request."); TeachNameTxt.Text = ""; ConfirmBtn.Enabled = false; KeyIn.Clear(); new MessageForm("Request sent.").Show(); new GDrive().UploadDatabase(); }
void OnKeyIn(Keys k, bool Shift, bool Alt, bool Ctrl) { KeyIn?.Invoke(this, k, Shift, Alt, Ctrl); }