Пример #1
0
 private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
 {
     //continue from here, reconfigure the datetime into database, create welcome page after successful checkin, create checkin via admin panel, do searching function, try catch all button event
     //if condition database connection open to all functions, runtime checking internet and db connection to both panels, edit UI with sponsor, release, testing.
     try
     {
         pr.checkin(pr, ses);
         success = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Пример #2
0
 private void btnCheckin_Click(object sender, EventArgs e)
 {
     try
     {
         Peserta pr = new Peserta();
         pr.pesertaID = ad.getIDpesByEmail(dataGridView1.SelectedRows[0].Cells[3].Value.ToString());
         foreach (Session item in ad.getSession())
         {
             if (item.name == comboSession.SelectedItem.ToString())
             {
                 pr.checkin(pr, item); break;
             }
         }
         MessageBox.Show("Success!");
         dataGridView1.SelectedRows[0].Cells[0].Value           = DateTime.Now.ToString("HH:mm:ss");
         dataGridView1.SelectedRows[0].Cells[1].Value           = "Checkedin";
         dataGridView1.SelectedRows[0].Cells[1].Style.BackColor = System.Drawing.Color.Green;
         dataGridView1.SelectedRows[0].Cells[1].Style.ForeColor = System.Drawing.Color.White;
     }
     catch (Exception ex)
     {
         MessageBox.Show("[ERROR] " + ex.Message);
     }
 }