/** * @desc Constructor for editing an existing class instance. * Loading from class instance list to refresh class instance list after saving new class instance * @params [int] id_class: identifies the class instance to return * @params [frm_class__instance_list] frmClInstList: by taking this parameter there will be a reference * to the class instance list so it can be refreshed after saving the new class instance * @return [none] No directly returned data. */ public frm_class_instance_arrange(int id_class_booked, frm_class_instance_list frmClInstList) { InitializeComponent(); this.Text = "Edit Class Instance"; this.frmClassInstanceList = frmClInstList; // Load in the class instance details clClassInstance = new ClassInstance(id_class_booked); // Check if it was found if (clClassInstance.Id_class_instance == -1) MessageBox.Show("The class instance could not be found"); // If the class instance was found else { // Display class instance details on form vLoadBookedList(); txt_endtime.Text = clClassInstance.EndTime; txt_startdate.Text = clClassInstance.DateStart; txt_starttime.Text = clClassInstance.StartTime; // Let booking items and new members to enroll and so on button_equipmentbooking.Enabled = true; button_viewattendants.Enabled = true; button_enrollmembers.Enabled = true; button_remove.Enabled = true; button_saveOpen.Enabled = false; } }
/** * @desc Default constructor for creating new class instance from main menu. * This is for loading from main menu, * @params [none] No input parameter. * @return [none] No directly returned data. */ public frm_class_instance_arrange() { InitializeComponent(); clClassInstance = new ClassInstance(); // A class instance that doesn't exist yet, shouldn't enroll members, book items and so on button_equipmentbooking.Enabled = false; button_viewattendants.Enabled = false; button_enrollmembers.Enabled = false; button_remove.Enabled = false; frmClassInstanceList = null; }
/** * @desc Constructor for creating member list for adding new attendant * to a class instance or to view members who are currently attending * This is for loading from a class_instance_arrange. * @params [ClassInstance] clClassInstance: This is for reference to the parent class. * @params [bool] viewAttendants: This decides if viewing or adding attendants. * @return [none] No directly returned data. */ public frm_member_list(ClassInstance clClassInstance, bool viewAttendants) { InitializeComponent(); this.clClassInstance = clClassInstance; this.viewAttendants = viewAttendants; vLoadMemberList(); }
/** * @desc Default constructor for creating member list from main menu. * This is for loading from main menu, * @params [none] No input parameter. * @return [none] No directly returned data. */ public frm_member_list() { InitializeComponent(); this.clClassInstance = new ClassInstance(); vLoadMemberList(); }