private void formHomePage_Load(object sender, EventArgs e)
        {
            btnIslemiTamamla.Visible = false;
            btnScan.Visible          = false;
            Populater.Fill(cbFacultyMembers, DataFillingService.GatherDoctors);
            Populater.Fill(cbSurgery, DataFillingService.GatherSections);
            Populater.Fill(cbState, DataFillingService.GatherState);
            Populater.Fill(cbPatientExaminationEpicrisis, DataFillingService.GatherPatientExaminationEpicrisis);
            Populater.Fill(cbExaminationAndReports, DataFillingService.GatherExaminationAndReports);
            Populater.Fill(cbCriminalAndMedicalBoard, DataFillingService.GatherCriminalAndMedicalBoard);

            EventHandler reportsHandler = (o, args) =>
            {
                var cb = (ComboBox)o;
                if (!cb.Focused)
                {
                    return;
                }
                lblReports.Text   = GetSelectedText(cb);
                _isReportSelected = true;
            };

            cbCriminalAndMedicalBoard.SelectedIndexChanged     += reportsHandler;
            cbPatientExaminationEpicrisis.SelectedIndexChanged += reportsHandler;
            cbExaminationAndReports.SelectedIndexChanged       += reportsHandler;
            cbState.SelectedIndexChanged +=
                (o, args) => { SetControlTextDependsOnCb(lblPatientStatus, (ComboBox)o, ref _isStateSelected); };
            cbSurgery.SelectedIndexChanged +=
                (o, args) => { SetControlTextDependsOnCb(lblSection, (ComboBox)o, ref _isSectionSelected); };
            cbFacultyMembers.SelectedIndexChanged +=
                (o, args) => { SetControlTextDependsOnCb(lblFacultyMember, (ComboBox)o, ref _isMemberSelected); };
        }
Beispiel #2
0
        /// <summary>
        /// Using static Mapper, uses <see cref="Populater"/>/<see cref="RandomValueProvider"/>
        /// to create a new <typeparamref name="TSource"/> instance,
        /// maps it to a new <typeparamref name="TDestination"/> instance, and
        /// calls <see cref="MapTester{TSource, TDestination}.AssertMappedValues(TSource, TDestination)"/>.
        /// </summary>
        /// <typeparam name="TSource">The type of the source.</typeparam>
        /// <typeparam name="TDestination">The type of the destination.</typeparam>
        /// <param name="mapTester">The <see cref="MapTester{TSource, TDestination}"/>.</param>
        /// <param name="randomValueProvider">(Optional) <see cref="RandomValueProvider"/> override.</param>
        /// <returns>The mapped <typeparamref name="TDestination"/> instance.</returns>
        public static TDestination AssertAutoMappedRandomValues <TSource, TDestination>(
            this MapTester <TSource, TDestination> mapTester, RandomValueProvider randomValueProvider = null)
        {
            var source = new Populater().CreateAndPopulate <TSource>(randomValueProvider ?? new RandomValueProvider());

            return(mapTester.AssertAutoMappedValues(source));
        }
 private void Bolum_Load(object sender, EventArgs e)
 {
     Populater.Fill(lbBolum, DataFillingService.GatherSections);
 }
 private void txtPatientDiagnosed_TextChanged(object sender, EventArgs e)
 {
     Populater.Fill(cbDiagnoses, () => DataFillingService.GatherDiagnoses(txtPatientDiagnose.Text));
 }
Beispiel #5
0
 private void OgretimUyesi_Load(object sender, EventArgs e)
 {
     Populater.Fill(lbOgretimUyesi, DataFillingService.GatherDoctors);
 }