public StaffAndStudentType(IncidentAddEdit incidentAddEdit) : base(incidentAddEdit) { //_incidentAddEdit.rbStaffAndStudent.Checked = true; _incidentAddEdit.cmbStudent.Enabled = true; _incidentAddEdit.cmbStaff.Enabled = true; _incidentAddEdit.txtPersonFullName.Text = string.Empty; }
private void dataGridView1_RowHeaderMouseDoubleClick_1(object sender, DataGridViewCellMouseEventArgs e) { if (!_mdiForm.Jarvis.CurrentUser.UserHasPermissionForAction("Incident", "Edit")) { return; } int index = e.RowIndex; int incidenId = (int)dgIncidents.Rows[e.RowIndex].Cells[0].Value; Incident incident = _allIncidents.Find(x => x.IncidentId == incidenId); if (incident != null) { //if (Application.OpenForms["StudentAddEdit"] as StudentAddEdit != null) //{ // StudentAddEdit frm1 = (StudentAddEdit)Application.OpenForms["StudentAddEdit"]; // frm1.Close(); //} IncidentAddEdit frm = new IncidentAddEdit(incident, _mdiForm.Jarvis); //frm.MdiParent = _mdiForm; //frm.Dock = DockStyle.Fill; //frm.FormBorderStyle = FormBorderStyle.None; frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { //_sorted = false; LoadList(); SetDataSource(false); } } }
public StaffType(IncidentAddEdit incidentAddEdit) : base(incidentAddEdit) { //_incidentAddEdit.rbStaff.Checked = true; _incidentAddEdit.cmbStudent.SelectedIndex = -1; _incidentAddEdit.cmbStudent.Enabled = false; _incidentAddEdit.cmbStaff.Enabled = true; _incidentAddEdit.txtPersonFullName.Text = string.Empty; }
public IncidentTypeBase(IncidentAddEdit incidentAddEdit) { _incidentAddEdit = incidentAddEdit; _incidentAddEdit.txtPersonFullName.Enabled = false; //_incidentAddEdit.rbOther.Checked = false; //_incidentAddEdit.rbStaffAndStudent.Checked = false; //_incidentAddEdit.rbStaff.Checked = false; //_incidentAddEdit.rbStudent.Checked = false; }
public OtherType(IncidentAddEdit incidentAddEdit) : base(incidentAddEdit) { //_incidentAddEdit.rbOther.Checked = true; _incidentAddEdit.cmbStudent.SelectedIndex = -1; _incidentAddEdit.cmbStaff.SelectedIndex = -1; _incidentAddEdit.cmbStudent.Enabled = false; _incidentAddEdit.cmbStaff.Enabled = false; _incidentAddEdit.txtPersonFullName.Enabled = true; _incidentAddEdit.txtPersonFullName.Focus(); }
private void addNewStudentToolStripMenuItem_Click(object sender, EventArgs e) { if (!_mdiForm.Jarvis.CurrentUser.UserHasPermissionForAction("Incident", "Add")) { return; } IncidentAddEdit frm = new IncidentAddEdit(new Incident(), _mdiForm.Jarvis); frm.headerLabel.Text = "Add New Incident"; frm.Text = "Add New Incident"; //frm.MdiParent = this; //frm.Dock = DockStyle.Fill; //frm.FormBorderStyle = FormBorderStyle.None; frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { LoadList(); SetDataSource(false); } }