Exemplo n.º 1
0
        private void btnImport_Click(object sender, EventArgs e)
        {
            OpenFileDialog file = new OpenFileDialog();
            string         Path = null;

            if (file.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Path = file.FileName;
                if (ControlAdmin.TabPages[ControlAdmin.SelectedIndex] == TabList_student)
                {
                    BUS_Admin.ImportStudent(Path, dt_student);
                }
                else if (ControlAdmin.TabPages[ControlAdmin.SelectedIndex] == TabList_teacher)
                {
                    BUS_Admin.ImportTeacher(Path, dt_teacher);
                }
                else
                {
                    return;
                }
            }
        }