예제 #1
0
        public FormAfiliado(int tipoAfiliadoADarDeAlta, FormAfiliado titular)
        {
            InitializeComponent();
            //maskedNombre.AsciiOnly = true;
            tipoAfiliado = tipoAfiliadoADarDeAlta;
            FuncionesCargarComboBox.cargarSexos(sexo);
            FuncionesCargarComboBox.cargarTipoDocumentos(tipoDocumento);
            FuncionesCargarComboBox.cargarPlanesMedicos(planMedico);
            FuncionesCargarComboBox.cargarEstadosCiviles(estadoCivil);

            if (tipoAfiliado != 1)
            {
                if (tipoAfiliado == 2)
                {
                    Text = "Formulario de carga de Conyugue";
                    estadoCivil.Enabled = false;
                    estadoCivil.SelectedValue = titular.estadoCivil.SelectedValue;
                    agregarConyugue.Visible = false;
                }
                else
                {
                    Text = "Formulario de carga de Familiar a cargo";
                }
                agregarConyugue.Visible = false;
                agregarFamiliares.Visible = false;
                planMedico.Enabled = false;
            }
            else
            {
                Text = "Formulario de carga de Afiliado";
                otrosFamiliares = new List<FormAfiliado>();
            }
        }
예제 #2
0
        public FormAfiliado(DataGridViewRow tomodify)
        {
            InitializeComponent();
            selected = tomodify;

            FuncionesCargarComboBox.cargarSexos(sexo);
            FuncionesCargarComboBox.cargarTipoDocumentos(tipoDocumento);
            FuncionesCargarComboBox.cargarPlanesMedicos(planMedico);
            FuncionesCargarComboBox.cargarEstadosCiviles(estadoCivil);

            Text = "Formulario de modificación de Afiliado";

            maskedNombre.Text = selected.Cells["NOMBRE"].Value.ToString();
            maskedApellido.Text = selected.Cells["APELLIDO"].Value.ToString();
            documento.Text = selected.Cells["DOCUMENTO"].Value.ToString();
            maskedDireccion.Text = selected.Cells["DIRECCION"].Value.ToString();
            maskedTelefono.Text = selected.Cells["TELEFONO"].Value.ToString();
            mail.Text = selected.Cells["MAIL"].Value.ToString();
            sexo.SelectedValue = (selected.Cells["ID_SEXO"].Value) is DBNull ? 0 : selected.Cells["ID_SEXO"].Value;
            tipoDocumento.SelectedValue = (selected.Cells["ID_TIPO_DOCUMENTO"].Value is DBNull) ? 0 : selected.Cells["ID_TIPO_DOCUMENTO"].Value;
            fechaNacimiento.Value = (DateTime)selected.Cells["FECHA_NACIMIENTO"].Value;
            estadoCivil.SelectedValue = (selected.Cells["ID_ESTADO_CIVIL"].Value) is DBNull ? 0 : selected.Cells["ID_ESTADO_CIVIL"].Value;
            planMedico.SelectedValue = (selected.Cells["ID_PLAN_MEDICO"].Value is DBNull) ? 0 : selected.Cells["ID_PLAN_MEDICO"].Value;


            maskedNombre.Enabled = false;
            maskedApellido.Enabled = false;
            tipoDocumento.Enabled = false;
            documento.Enabled = false;
            fechaNacimiento.Enabled = false;
            agregarConyugue.Enabled = false;
            agregarFamiliares.Enabled = false;
        }
예제 #3
0
        private void loadComboboxPlanMedico(ComboBox planMedico)
        {
            string currentPlan = planMedico.Text;

            FuncionesCargarComboBox.cargarPlanesMedicos(planMedico);
            planMedico.Text = currentPlan;
        }