Beispiel #1
0
 private void StaffReceiveProblems_Load(object sender, EventArgs e)
 {
     ProblemReportDataBaseControl.Load();
     lblReceiveProblem.Text = "";
     for (int i = 0; i < ProblemReportDataBaseControl.dataTable.Rows.Count; i++)
     {
         lblReceiveProblem.Text += "ProblemReportID: " + ProblemReportDataBaseControl.problemReportIDs[i] + Environment.NewLine;
         lblReceiveProblem.Text += "Title: " + ProblemReportDataBaseControl.titles[i] + Environment.NewLine;
         lblReceiveProblem.Text += "Detail: " + ProblemReportDataBaseControl.details[i] + Environment.NewLine + Environment.NewLine;
     }
 }
Beispiel #2
0
        private void btnSend_Click(object sender, EventArgs e)
        {
            if (txtTitle.Text == "")
            {
                MessageBox.Show("Title can not be empty.");
                return;
            }

            if (txtDetail.Text == "")
            {
                MessageBox.Show("Detail can not be empty.");
                return;
            }

            ProblemReportDataBaseControl.title  = txtTitle.Text;
            ProblemReportDataBaseControl.detail = txtDetail.Text;

            ProblemReportDataBaseControl.Insert();
            SystemDataBaseControl.Updata_ProblemReportNum_PlusOne();

            MessageBox.Show("Send Problem Report success.");
            txtTitle.Text  = "";
            txtDetail.Text = "";
        }