Example #1
0
 private void setLoadingImages()
 {
     RadPageView1.SelectedPage = pgeBasic;
     PicBody.ShowLoadingGif();
     picFace.ShowLoadingGif();
     RadPageView1.SelectedPage = pgeOthers;
     picObirthCertificate.ShowLoadingGif();
     picOFamilyCardPhoto.ShowLoadingGif();
     RadPageView1.SelectedPage = pgeHealth;
     picHReportPhoto.ShowLoadingGif();
     RadPageView1.SelectedPage = pgeEducation;
     picSStarter.ShowLoadingGif();
     PicSstudyCerti.ShowLoadingGif();
     RadPageView1.SelectedPage = pgeBasic;
 }
Example #2
0
        private void SetValues()
        {
            setImageControlsHanlder(false);
            if (_CurrentOrphan == null)
            {
                return;
            }
            orphanBindingSource.DataSource = _CurrentOrphan;
            RadPageView1.SelectedPage      = pgeBasic;
            var ageString = _TranslateService.DateToString(_CurrentOrphan.Birthday);

            txtOAge.Text = ageString;
            PicBody.SetImageByBytes(_CurrentOrphan.FullPhotoData);
            picFace.SetImageByBytes(_CurrentOrphan.FacePhotoData);
            RadPageView1.SelectedPage = pgeOthers;
            picObirthCertificate.SetImageByBytes(_CurrentOrphan.BirthCertificatePhotoData);
            picOFamilyCardPhoto.SetImageByBytes(_CurrentOrphan.FamilyCardPagePhotoData);
            //Health
            RadPageView1.SelectedPage = pgeHealth;
            if (_CurrentOrphan.HealthId.HasValue)
            {
                EnabledDisHealthControls(true);
                txtHDoctorName.Text = _CurrentOrphan.HealthStatus.SupervisorDoctor;
                if (_CurrentOrphan.HealthStatus.Medicine != null)
                {
                    txtHMedicen.Text  = _CurrentOrphan.HealthStatus.Medicine.Replace(";", "+");
                    txtHMedicen.Text += "+";
                }
                if (_CurrentOrphan.HealthStatus.SicknessName != null)
                {
                    txtHSicknessName.Text  = _CurrentOrphan.HealthStatus.SicknessName.Replace(";", "+");
                    txtHSicknessName.Text += "+";
                }
                txtHNote.Text = _CurrentOrphan.HealthStatus.Note;
                if (_CurrentOrphan.HealthStatus.Cost.HasValue)
                {
                    numHCost.Value = (decimal)_CurrentOrphan.HealthStatus.Cost.Value;
                }
                picHReportPhoto.SetImageByBytes(_CurrentOrphan.HealthStatus.ReporteFileData);
            }
            else
            {
                EnabledDisHealthControls(false);
            }
            //Education
            RadPageView1.SelectedPage = pgeEducation;
            if (_CurrentOrphan.EducationId.HasValue)
            {
                if (_CurrentOrphan.Education.Stage.Contains(Properties.Resources.EducationNonStudyKeyword))
                {
                    EnabledDisEducationControls(false);
                }
                else
                {
                    EnabledDisEducationControls(true);
                    txtSNote.Text       = _CurrentOrphan.Education.Note;
                    txtSschoolNAme.Text = _CurrentOrphan.Education.School;
                    if (_CurrentOrphan.Education.DegreesRate.HasValue)
                    {
                        numSDegreesRate.Value = (decimal)_CurrentOrphan.Education.DegreesRate.Value;
                    }
                    if (_CurrentOrphan.Education.MonthlyCost.HasValue)
                    {
                        numSMonthlyCost.Value = (decimal)(_CurrentOrphan.Education.MonthlyCost.Value);
                    }
                    picSStarter.SetImageByBytes(_CurrentOrphan.Education.CertificatePhotoFront);
                    PicSstudyCerti.SetImageByBytes(_CurrentOrphan.Education.CertificatePhotoBack);
                }
                txtSStudyStage.Text = _CurrentOrphan.Education.Stage;
                txtSReason.Text     = _CurrentOrphan.Education.Reasons;
            }
            else
            {
                EnabledDisEducationControls(false);
            }
            RadPageView1.SelectedPage = pgeBasic;

            _CertificatePhotoChanged  = false;
            _CertificatePhoto2Changed = false;
            _HealthPhotoChanged       = false;
            picFace.HideLoadingGif();
            PicBody.HideLoadingGif();
            picObirthCertificate.HideLoadingGif();
            picOFamilyCardPhoto.HideLoadingGif();
            picHReportPhoto.HideLoadingGif();
            picSStarter.HideLoadingGif();
            PicSstudyCerti.HideLoadingGif();
            setImageControlsHanlder(true);
        }