示例#1
0
 public void abrirParaNuevo()
 {
     this.cargarCombos();
     empleado = new EmpleadoEntity();
     empleado.IdPersona = 0;
     this.mostrarDatosEnForm();
     this.txtLegajo.Enabled = true;
     this.btnGrabar.Enabled = false;
     this.ShowDialog();
 }
示例#2
0
 public void abrirParaModificar(int idEmpleado)
 {
     this.cargarCombos();
     empleado = consEmple.getEmpleado(idEmpleado);
     this.cargarGrillas();
     this.mostrarDatosEnForm();
     this.txtLegajo.Enabled = false;
     this.btnGrabar.Enabled = false;
     this.ShowDialog();
 }
示例#3
0
        public void abrirParaConsultar(int idEmpleado)
        {
            this.cargarCombos();
            empleado = consEmple.getEmpleado(idEmpleado);
            this.cargarGrillas();
            this.mostrarDatosEnForm();
            this.btnGrabar.Enabled = false;
            this.gbBanco.Enabled = false;
            this.gbCategoria.Enabled = false;
            this.gbFechas.Enabled = false;
            this.gbIdentificacion.Enabled = false;
            this.gbOtrosCampos.Enabled = false;
            this.gbPersona.Enabled = false;
            this.gbSalario.Enabled = false;

            this.ShowDialog();
        }
示例#4
0
 /// <summary>
 /// Graba Empleado (inserta/actualiza)
 /// </summary>
 /// <param name="empleado"></param>
 /// <returns></returns>
 public int grabar(EmpleadoEntity empleado)
 {
     using (var empleadoData = new EmpleadoData())
     {
         return empleadoData.insert(empleado);
     }
 }
示例#5
0
 public void actualizarFechas(EmpleadoEntity empleado)
 {
     using (var empleadoData = new EmpleadoData())
     {
         empleadoData.cargarFechas(empleado);
     }
 }