internal void Populate(PersonaBE persona, Fwk.Bases.EntityUpdateEnum state) { Persona = persona; State = state; _AnteriorFechaNacimiento = persona.FechaNacimiento; txtApellido.Text = Persona.Apellido; txtNombres.Text = Persona.Nombre; txtDocumento.Text = Persona.NroDocumento; cmbTipoDoc.EditValue = Persona.TipoDocumento; if (Persona.Foto != null) { this.pictureEdit1.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Stretch; pictureEdit1.Image = Fwk.HelperFunctions.TypeFunctions.ConvertByteArrayToImage(Persona.Foto); } if (Persona.Foto == null) { this.pictureEdit1.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Clip; } if (Persona.Sexo.Equals((Int16)Sexo.Masculino)) { rndSexoM.Checked = true; if (Persona.Foto == null) { pictureEdit1.Image = Health.Front.Properties.Resources.User_M; } } else { rndSexoF.Checked = true; if (Persona.Foto == null) { pictureEdit1.Image = Health.Front.Properties.Resources.User_F; } } int index = 0; if (State == Fwk.Bases.EntityUpdateEnum.NEW) { dtFechaNac.EditValue = DateTime.Now; index = cmbTipoDoc.Properties.GetDataSourceRowIndex("IdParametro", "610"); cmbTipoDoc.ItemIndex = index; } else { dtFechaNac.EditValue = Persona.FechaNacimiento; index = cmbEstadoCivil.Properties.GetDataSourceRowIndex("IdParametro", Persona.IdEstadocivil); cmbEstadoCivil.ItemIndex = index; index = cmbTipoDoc.Properties.GetDataSourceRowIndex("IdParametro", Persona.TipoDocumento); cmbTipoDoc.ItemIndex = index; btnBuscar.Visible = false; } //bool admin_person_abm = FormBase.CheckRule("admin_person_edit_info"); //cmbEstadoCivil.Enabled = admin_person_abm; //cmbTipoDoc.Enabled = admin_person_abm; //txtNombres.Enabled = admin_person_abm; //txtApellido.Enabled = admin_person_abm; //txtDocumento.Enabled = admin_person_abm; //rndSexoF.Enabled = admin_person_abm; //rndSexoM.Enabled = admin_person_abm; //pictureEdit1.Enabled = admin_person_abm; //btnBuscar.Enabled = admin_person_abm; //dtFechaNac.Enabled = admin_person_abm; }
public frmProfesionalCard(Fwk.Bases.EntityUpdateEnum state, int idProfesional) { InitializeComponent(); this.State = state; this._IdProfesional = idProfesional; }
public FrmABMPatient(Fwk.Bases.EntityUpdateEnum state) { InitializeComponent(); this.State = state; }
internal void Populate(PersonaBE persona, Fwk.Bases.EntityUpdateEnum state) { Persona = persona; State = state; _AnteriorFechaNacimiento = persona.FechaNacimiento; txtApellido.Text = Persona.Apellido; txtNombres.Text = Persona.Nombre; txtDocumento.Text = Persona.NroDocumento; cmbTipoDoc.EditValue = Persona.TipoDocumento; if (Persona.Foto != null) { this.pictureEdit1.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Stretch; pictureEdit1.Image = Fwk.HelperFunctions.TypeFunctions.ConvertByteArrayToImage(Persona.Foto); } if (Persona.Foto == null) this.pictureEdit1.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Clip; if (Persona.Sexo.Equals((Int16)Sexo.Masculino)) { rndSexoM.Checked = true; if (Persona.Foto == null) pictureEdit1.Image = Health.Front.Properties.Resources.User_M; } else { rndSexoF.Checked = true; if (Persona.Foto == null) pictureEdit1.Image = Health.Front.Properties.Resources.User_F; } int index = 0; if (State == Fwk.Bases.EntityUpdateEnum.NEW) { dtFechaNac.EditValue = DateTime.Now; index = cmbTipoDoc.Properties.GetDataSourceRowIndex("IdParametro", "610"); cmbTipoDoc.ItemIndex = index; } else { dtFechaNac.EditValue = Persona.FechaNacimiento; index = cmbEstadoCivil.Properties.GetDataSourceRowIndex("IdParametro", Persona.IdEstadocivil); cmbEstadoCivil.ItemIndex = index; index = cmbTipoDoc.Properties.GetDataSourceRowIndex("IdParametro", Persona.TipoDocumento); cmbTipoDoc.ItemIndex = index; btnBuscar.Visible = false; } //bool admin_person_abm = FormBase.CheckRule("admin_person_edit_info"); //cmbEstadoCivil.Enabled = admin_person_abm; //cmbTipoDoc.Enabled = admin_person_abm; //txtNombres.Enabled = admin_person_abm; //txtApellido.Enabled = admin_person_abm; //txtDocumento.Enabled = admin_person_abm; //rndSexoF.Enabled = admin_person_abm; //rndSexoM.Enabled = admin_person_abm; //pictureEdit1.Enabled = admin_person_abm; //btnBuscar.Enabled = admin_person_abm; //dtFechaNac.Enabled = admin_person_abm; }