Ejemplo n.º 1
0
        public void Init()
        {
            if (ServiceCalls.IsInDesignMode())
            {
                return;
            }


            InitializeComboBoxDatasource(TipoAlergia.AnimalAllergy);
            InitializeComboBoxDatasource(TipoAlergia.ChemicalAllergy);
            InitializeComboBoxDatasource(TipoAlergia.FoodAllergy);
            InitializeComboBoxDatasource(TipoAlergia.InsectAllergy);
            InitializeComboBoxDatasource(TipoAlergia.MedicamentsAllergy);
            //InitializeComboBoxDatasource(TipoAlergia.MiteAllergy);
            InitializeComboBoxDatasource(TipoAlergia.PollenAllergy);
            //InitializeComboBoxDatasource(TipoAlergia.SunAllergy);

            _PatientAllergy = frmPatientAtencion.GetInstance(this)._PatientAllergy;
            if (_PatientAllergy.AllergyId == -1)
            {
                _PatientAllergy             = new PatientAllergyBE();
                _PatientAllergy.PatientId   = ServiceCalls.CurrentPatient.PatientId;
                _PatientAllergy.EntityState = Fwk.Bases.EntityState.Added;
            }
            else
            {
                _PatientAllergy.EntityState = Fwk.Bases.EntityState.Unchanged;
            }

            _PatientAllergy_Aux = _PatientAllergy.Clone <PatientAllergyBE>();
            PopulateControls();
        }
Ejemplo n.º 2
0
        public override void Populate(object filter)
        {
            PatientBE patient = (PatientBE)filter;

            if (ServiceCalls.IsInDesignMode())
            {
                return;
            }

            cmbTipoDoc.Properties.DataSource = ServiceCalls.SearchParametroByParams((int)TipoParametroEnum.TipoDocumento, null);

            cmbTipoDoc.Refresh();

            txtNombres.Text      = patient.Persona.ApellidoNombre;
            txtDocumento.Text    = patient.Persona.NroDocumento;
            cmbTipoDoc.EditValue = patient.Persona.TipoDocumento;
            if (patient.Persona.Foto != null)
            {
                this.pictureEdit1.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Stretch;
                pictureEdit1.Image = Fwk.HelperFunctions.TypeFunctions.ConvertByteArrayToImage(patient.Persona.Foto);
            }

            if (patient.Persona.Foto == null)
            {
                this.pictureEdit1.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Clip;
            }
            if (patient.Persona.Sexo.Equals((Int16)Sexo.Masculino))
            {
                rndSexoM.Checked = true;
                if (patient.Persona.Foto == null)
                {
                    pictureEdit1.Image = Health.Front.Base.Properties.Resource.User_M;
                }
            }
            else
            {
                rndSexoF.Checked = true;
                if (patient.Persona.Foto == null)
                {
                    pictureEdit1.Image = Health.Front.Base.Properties.Resource.User_F;
                }
            }


            int index = 0;

            //txtDocumento.Enabled = false;
            //cmbTipoDoc.Enabled = false;
            dtFechaNac.EditValue = patient.Persona.FechaNacimiento;


            index = cmbTipoDoc.Properties.GetDataSourceRowIndex("IdParametro", patient.Persona.TipoDocumento);
            cmbTipoDoc.ItemIndex = index;
        }
Ejemplo n.º 3
0
        internal void Init()
        {
            if (ServiceCalls.IsInDesignMode())
            {
                return;
            }
            EstadoCivilList.AddRange(ServiceCalls.EstadoCivilList.Where <ParametroBE>(p => p.IdParametro != (int)CommonValuesEnum.TodosComboBoxValue));
            cmbEstadoCivil.Properties.DataSource = EstadoCivilList;

            cmbTipoDoc.Properties.DataSource = ServiceCalls.SearchParametroByParams((int)TipoParametroEnum.TipoDocumento, null);

            cmbEstadoCivil.Refresh();
            cmbTipoDoc.Refresh();
        }