예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     // show attendance form
     if (Role == "Checker")
     {
         MessageBox.Show("Access Denied", "Message", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
     else
     {
         panel_Holder.Controls.Clear();
         var attendance = new frm_Attendance();
         attendance.TopLevel = false;
         panel_Holder.Controls.Add(attendance);
         attendance.Dock = DockStyle.Fill;
         attendance.Show();
     }
 }
예제 #2
0
 public void loadAttendance()
 {
     xoaToanBoFormCon();
     try
     {
         if (Application.OpenForms["frm_Attendance"] == null)
         {
             GUI.frm_Attendance frmAttendance = new frm_Attendance(frm_mainform);
             frmAttendance.Show();
         }
         else
         {
             Application.OpenForms["frm_Attendance"].Activate();
         }
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
     }
 }