using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace StacjaProb { public partial class reportAfterTestForm : Form { public reportAfterTestForm() { InitializeComponent(); } private void reportAfterTestForm_Load(object sender, EventArgs e) { //vGlobal.tst_global_id = 94; checkBoxNaProtokole.Checked = true; if (vGlobal.app_participants_id > 0) textBoxKlient.Text = vGlobal.app_participants_name; inProwadzacy.Text = vGlobal.tst_login_name; inNrProby.Text = vGlobal.tst_global_id.ToString(); inStanowiskoNr.Text = mySqlFunctions.sqlStringValue("select TPL_NAME from tst_tests left join tst_test_places on TST_TPL_ID=TPL_ID where TST_ID=" + vGlobal.tst_global_id, "TPL_NAME"); } private void buttonZapiszZamknij_Click(object sender, EventArgs e) { if (checkBoxNaProtokole.Checked) mySqlFunctions.Insert("INSERT INTO tst_test_notif SET TNF_TST_ID=" + vGlobal.tst_global_id + ",TNF_CUSTOMER='" + textBoxKlient.Text + "',TNF_COMMISION='" + textBoxZlecenie.Text + "',TNF_DESC='" + richTextBoxUwagi.Text + "',TNF_ON_REPORT='1'"); else mySqlFunctions.Insert("INSERT INTO tst_test_notif SET TNF_TST_ID=" + vGlobal.tst_global_id + ",TNF_CUSTOMER='" + textBoxKlient.Text + "',TNF_COMMISION='" + textBoxZlecenie.Text + "',TNF_DESC='" + richTextBoxUwagi.Text + "',TNF_ON_REPORT='0'"); this.Close(); } private void buttonZapiszPokaz_Click(object sender, EventArgs e) { fullTestReportForm.spm_test_id = vGlobal.tst_global_id; if (checkBoxNaProtokole.Checked) mySqlFunctions.Insert("INSERT INTO tst_test_notif SET TNF_TST_ID=" + vGlobal.tst_global_id + ",TNF_CUSTOMER='" + textBoxKlient.Text + "',TNF_COMMISION='" + textBoxZlecenie.Text + "',TNF_DESC='" + richTextBoxUwagi.Text + "',TNF_ON_REPORT='1'"); else mySqlFunctions.Insert("INSERT INTO tst_test_notif SET TNF_TST_ID=" + vGlobal.tst_global_id + ",TNF_CUSTOMER='" + textBoxKlient.Text + "',TNF_COMMISION='" + textBoxZlecenie.Text + "',TNF_DESC='" + richTextBoxUwagi.Text + "',TNF_ON_REPORT='0'"); fullTestReportForm ftrf_form = new fullTestReportForm(); ftrf_form.ShowDialog(); this.Close(); } } }