/** * Method wrapps data from the form into user model * * @return user model */ private UserModel getUserModelFromDataForm() { SurgeryInfo surgery = new SurgeryInfo(); UserModel user = new UserModel(); user.setFirstName(firstName.Text); user.setLastName(lastName.Text); user.setLogin(login.Text); user.setPassword(password.Text); user.setPhoneNumber(phoneNumber.Text); if (String.IsNullOrEmpty(phoneNumber.Text) || phoneNumber.Text.Equals(DISABLED_FIELD)) { user.setPhoneNumber("NULL"); } user.setNiN(NiN.Text); if (String.IsNullOrEmpty(NiN.Text) || NiN.Text.Equals(DISABLED_FIELD)) { user.setNiN("NULL"); } user.setAddress(address.Text); user.setEmailAddress(emailAddress.Text); user.setUserType(this.getValueFromDropDown(userTypes, surgery.defaultUserType)); user.setConfirmation(this.getValueFromDropDown(confirmationMethodsDropDown, surgery.defaultConfirmationMethod)); user.setDOBd(dobPicker.Value); return(user); }
/** Constructor adjusts the information */ public surgeryInfoBox() { InitializeComponent(); SurgeryInfo surgery = new SurgeryInfo(); surgeryName.Text += surgery.getSurgeryName(); firstLineOfAddressLabel.Text += surgery.getFirstLineOfAddress(); secondLineOfAddressLabel.Text += surgery.getSecondLineOfAddress(); surgeryPhoneNumberLabel.Text += surgery.getPhoneNumber(); }
/** * Contructor is responsible for creating the object, initializing fields and calling on methods generating schedule * * @param parent class implementing AppointmentBoxI interface * @param date */ public SingleScheduleDayWindow(AppointmentBoxI parent, string date) { InitializeComponent(); controller = new ScheduleController(date); surgeryInfo = new SurgeryInfo(); this.parent = parent; this.date = date; dateInfoLabel.Text = date; generateTimeTableHeader(); generateTimeTableSlots(); timetable.CellClick += new DataGridViewCellEventHandler(dataGridView2_CellClick); }
/** * Constructor assigns parameters to fields * * @param parent parent window * @param date * @param time * @param doctorsName name of the staff member * @param staffScheudleId */ public BookingWindow(SingleScheduleDayWindow parent, string date, string time, string doctorsName, int staffScheduleId) { InitializeComponent(); SurgeryInfo surgeryInfo = new SurgeryInfo(); this.date = date; dateBooking.Text = this.date; timeOfBooking.Text = time; doctorsNameLabel.Text = doctorsName; surgeryAddress1Line.Text = surgeryInfo.getFirstLineOfAddress(); surgeryAddressSecondLine.Text = surgeryInfo.getSecondLineOfAddress(); surgeryPhoneNumberLabel.Text = surgeryInfo.getPhoneNumber(); this.parent = parent; this.staffScheduleId = staffScheduleId; this.doctorsName = doctorsName; if (ApplicationState.userType.Equals("admin")) { patientListBox.Visible = true; fillInListOfAllPatients(); } manageUserConfirmationSettings(); this.CenterToScreen(); }