Example #1
0
        private void Frm_PersonalAdd_Load(object sender, EventArgs e)
        {


            ECargo ocargo = new ECargo();
            cmb_cargo.DataSource = ocargo.ListarCargo();
            cmb_cargo.DisplayMember = "descripcion";
            cmb_cargo.ValueMember = "cod_cargo";

            if (!opers.Codigo.Equals(string.Empty))
            {
                txt_codigo.Text = opers.Codigo;
                txt_paterno.Text = opers.Paterno;
                txt_materno.Text = opers.Materno;
                txt_nombres.Text = opers.Nombre;
                txt_dni.Text = opers.Dni;
                txt_direccion.Text = opers.Direccion;
                txt_telefono.Text = opers.Telefono;
                txt_email.Text = opers.Email;
                cmb_cargo.SelectedValue = opers.Idcargo;
            }
            else
            {

                txt_codigo.Text = EPersonal.GETCODIGO();
                txt_paterno.Focus();
            }
            
        }
Example #2
0
 private void Frm_Personal_Load(object sender, EventArgs e)
 {
     this.ListarAll();
     ECargo ocargo = new ECargo();
     cmb_cargo.DataSource = ocargo.ListarCargo();
     cmb_cargo.DisplayMember = "descripcion";
     cmb_cargo.ValueMember = "cod_cargo";
 }