private void dgPrestaciones_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     presentacion = new Presentacion();
     presentacion = listapresentacion.ElementAt<Presentacion>(dgPrestaciones.CurrentRow.Index);
 }
Example #2
0
 public bool guardarPresentacion(Presentacion presentacion)
 {
     try
     {
         ConexionBD.getSession().Save(presentacion);
         ConexionBD.getSession().Flush();
         return true;
     }
     catch { return false; }
 }
 private void btnImprimir_Click(object sender, EventArgs e)
 {
     presentacion = new Presentacion();
     presentacion = listapresentacion.ElementAt<Presentacion>(dgPrestaciones.CurrentRow.Index);
     listado = new ListadoPrestacionesAPresentar(getConsulta(), presentacion.Desde, presentacion.Hasta, planElegido);
     listado.ShowDialog();
 }
 public bool Guardar()
 {
     bool b_ok = false;
     presentacion = new Presentacion();
     presentacion.Ano = int.Parse(txtAno.Text);
     presentacion.Cantidad = int.Parse(txtCantidad.Text);
     presentacion.Desde = dtpFechaDesde.Value;
     presentacion.Hasta = dtpFechaHasta.Value;
     presentacion.Fecha = dpFecha.Value;
     presentacion.Mes = int.Parse(txtMes.Text);
     presentacion.Numero = int.Parse(txtNro.Text);
     presentacion.Plan = planElegido;
     presentacion.Quincena = int.Parse(txtQuincena.Text);
     presentacion.Total = double.Parse(txtTotal.Text);
     GuardarDetalles();
     presentacion.Detalle = listapresentaciondet;
     b_ok = gestorTurno.guardarPresentacion(presentacion);
     return b_ok;
 }