Esempio n. 1
0
        //TODO: Add 'AllowTest' properties to frmEvent and set them here
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmEvent = new frmEventDlg();
            frmEvent.Mode = "Add";
            frmEvent.CourseId = _courseid;
            frmEvent.EventID = eventid[3];
            frmEvent.AllowExtraClasses = IsRecurringSeries;
            frmEvent.AllowTestInitial = !HasTestInitialEvent;
            frmEvent.AllowTestMid = !HasTestMidtermEvent;
            frmEvent.AllowTestFinal = !HasTestFinalEvent;

            if (frmEvent.ShowDialog() == DialogResult.OK)
            {
                saved = true;
                LoadData();
                LoadOtherEvents();
            }
            frmEvent.Close();
            frmEvent.Dispose();
            frmEvent = null;
        }
Esempio n. 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (gvwEvents.SelectedRowsCount == 0)
            {
                return;
            }
            frmEvent = new frmEventDlg(int.Parse(gvwEvents.GetRowCellValue(gvwEvents.FocusedRowHandle, gcolEventID).ToString()), int.Parse(gvwEvents.GetRowCellValue(gvwEvents.FocusedRowHandle, gcolCaldendarEventID).ToString()));
            frmEvent.Mode = "Edit";
            frmEvent.ProgramId = _programid;
            frmEvent.AllowExtraClasses = false;

            //Re-load the Test events as well as the original Program data
            if (frmEvent.ShowDialog() == DialogResult.OK)
            {
                LoadData();
                LoadTestEvents();
            }
            frmEvent.Close();
            frmEvent.Dispose();
            frmEvent = null;
        }
Esempio n. 3
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (gvwEvents.SelectedRowsCount == 0)
            {
                return;
            }
            frmEvent = new frmEventDlg(int.Parse(gvwEvents.GetRowCellValue(gvwEvents.FocusedRowHandle, gcolEventID).ToString()), int.Parse(gvwEvents.GetRowCellValue(gvwEvents.FocusedRowHandle, gcolCaldendarEventID).ToString()));
            frmEvent.Mode = "Edit";
            frmEvent.CourseId = _courseid;
            frmEvent.AllowExtraClasses = IsRecurringSeries;
            //frmEvent.AllowTestInitial = !HasTestInitialEvent;
            //frmEvent.AllowTestMid = !HasTestMidtermEvent;
            //frmEvent.AllowTestFinal = !HasTestFinalEvent;

            if (frmEvent.ShowDialog() == DialogResult.OK)
            {
                saved = true;
                LoadData();
                LoadOtherEvents();
            }
            frmEvent.Close();
            frmEvent.Dispose();
            frmEvent = null;
        }
Esempio n. 4
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmEvent = new frmEventDlg();
            frmEvent.Mode = "Add";
            frmEvent.ProgramId = _programid;
            frmEvent.AllowExtraClasses = false;
            frmEvent.AllowTestInitial = !HasTestInitialEvent;
            frmEvent.AllowTestMid = !HasTestMidtermEvent;
            frmEvent.AllowTestFinal = !HasTestFinalEvent;

            if (frmEvent.ShowDialog() == DialogResult.OK)
            {
                LoadData();
                LoadTestEvents();
            }
            frmEvent.Close();
            frmEvent.Dispose();
            frmEvent = null;
        }