예제 #1
0
        private void DataListado_DoubleClick(object sender, EventArgs e)
        {
            Ingresar_Empleado form = Ingresar_Empleado.GetInstancia();
            Image             par15;

            string par1, par2, par3, par4, par5, par6, par7, par8, par9, par10, par11, par12, par13, par14, par16, par17, par18, par19, par20, par21;

            par1  = Convert.ToString(this.dataListado.CurrentRow.Cells["Código"].Value);
            par2  = Convert.ToString(this.dataListado.CurrentRow.Cells["Dpi"].Value);
            par3  = Convert.ToString(this.dataListado.CurrentRow.Cells["Primer Nombre"].Value);
            par4  = Convert.ToString(this.dataListado.CurrentRow.Cells["Segundo Nombre"].Value);
            par5  = Convert.ToString(this.dataListado.CurrentRow.Cells["Tercer Nombre"].Value);
            par6  = Convert.ToString(this.dataListado.CurrentRow.Cells["Primer Apellido"].Value);
            par7  = Convert.ToString(this.dataListado.CurrentRow.Cells["Segundo Apellido"].Value);
            par8  = Convert.ToString(this.dataListado.CurrentRow.Cells["Tercer Apellido"].Value);
            par9  = Convert.ToString(this.dataListado.CurrentRow.Cells["Fecha de Nacimiento"].Value);
            par10 = Convert.ToString(this.dataListado.CurrentRow.Cells["Sexo"].Value);
            par11 = Convert.ToString(this.dataListado.CurrentRow.Cells["Dirección"].Value);
            par12 = Convert.ToString(this.dataListado.CurrentRow.Cells["Id_Municipio"].Value);
            par13 = Convert.ToString(this.dataListado.CurrentRow.Cells["Teléfono"].Value);
            par14 = Convert.ToString(this.dataListado.CurrentRow.Cells["ID_PUESTO"].Value);

            byte[] imagenBuffer       = (byte[])this.dataListado.CurrentRow.Cells["Foto"].Value;
            System.IO.MemoryStream ms = new System.IO.MemoryStream(imagenBuffer);

            par15 = Image.FromStream(ms);
            par16 = Convert.ToString(this.dataListado.CurrentRow.Cells["Correo"].Value);


            par17 = Convert.ToString(this.dataListado.CurrentRow.Cells["Estado"].Value);
            par18 = Convert.ToString(this.dataListado.CurrentRow.Cells["Fecha de Ingreso"].Value);
            form.SetEmpleado(par1, par2, par3, par4, par5, par6, par7, par8, par9, par10, par11, par12, par13, par14, par15, par16, par17, par18);
            this.Hide();
        }
 public static Ingresar_Empleado GetInstancia()
 {
     if (_Instancia == null)
     {
         _Instancia = new Ingresar_Empleado();
     }
     return(_Instancia);
 }
예제 #3
0
        private void Btn_Crear_Click(object sender, EventArgs e)
        {
            Ingresar_Empleado ventanaEmpleado = Ingresar_Empleado.GetInstancia();

            ventanaEmpleado.Show();
        }
 private void Ingresar_Empleado_FormClosing(object sender, FormClosingEventArgs e)
 {
     _Instancia = null;
 }