private void importRollCallToolStripMenuItem_Click(object sender, EventArgs e) { if (!Jarvis.CurrentUser.UserHasPermissionForAction("RollCall", "Add")) { return; } ImportResidentRollCall irc = new ImportResidentRollCall(Jarvis); irc.ShowDialog(); if (irc.DialogResult == DialogResult.OK) { } }
//private void button1_Click(object sender, EventArgs e) //{ // int index = dgRollCall.CurrentCell.RowIndex; // int personId = (int)dgRollCall.Rows[index].Cells[0].Value; // Person person = _filteredStudentList.Find(x => x.PersonId == personId); // if (person != null) // { // try // { // ReportViewer frm = new ReportViewer((Student)person); // frm.ShowDialog(); // //Student student = (Student)person; // ////IndividualStudentReport instrpt = new IndividualStudentReport(_mdiForm.Jarvis, student); // //StudentExcelReport studentReport = new StudentExcelReport(student, _mdiForm.Jarvis); // //_mdiForm.Jarvis.IncreaseFielIncrement(); // ////MessageBox.Show("Student file created", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); // } // catch (Exception ex) // { // MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); // } // //StudentReportViewer frm = new StudentReportViewer(student); // //frm.ShowDialog(); // } //} private void addNewStudentToolStripMenuItem_Click(object sender, EventArgs e) { if (!_mdiForm.Jarvis.CurrentUser.UserHasPermissionForAction("Student", "Add")) { return; } ImportResidentRollCall frm = new ImportResidentRollCall(_mdiForm.Jarvis); frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { SetComboBoxDefaults(); LoadRollCallList(); } }