private void btnGuardar_Click(object sender, EventArgs e) { AlquilerDAO rec = new AlquilerDAO(); alquiler.Fecha = Fecha.Value.ToString("yyyy-MM-dd"); alquiler.Nombre = txtNombre.Text; alquiler.Lugar = txtLugar.Text; alquiler.Telefono = Convert.ToInt32(txtTelefono.Text); alquiler.Mesas = Convert.ToInt32(txtMesa.Text); alquiler.Sillas = Convert.ToInt32(txtSilla.Text); alquiler.Manteles = Convert.ToInt32(txtMantel.Text); alquiler.Lasos = Convert.ToInt32(txtLasos.Text); alquiler.Cobertores = Convert.ToInt32(txtCobertores.Text); alquiler.SobreMantel = Convert.ToInt32(txtSobreM.Text); alquiler.SillasVerdes = Convert.ToInt32(txtSillaV.Text); alquiler.SillasBlancas = Convert.ToInt32(txtSillaB.Text); alquiler.Total = Convert.ToInt32(lblmsj.Text); rec.Modificar(alquiler); busqueda ventanaPrincipal = new busqueda() { }; ventanaPrincipal.Show(this); this.Hide(); }
private void EditarAlquiler_Load(object sender, EventArgs e) { AlquilerDAO rec = new AlquilerDAO(); alquiler = rec.SelectId(Id); try { lblMensaje.Text = ""; if (alquiler.Id > 0) { Fecha.Text = alquiler.Fecha; txtNombre.Text = alquiler.Nombre; txtLugar.Text = alquiler.Lugar; txtTelefono.Text = alquiler.Telefono.ToString(); txtMesa.Text = alquiler.Mesas.ToString(); txtSilla.Text = alquiler.Sillas.ToString(); txtMantel.Text = alquiler.Manteles.ToString(); txtLasos.Text = alquiler.Lasos.ToString(); txtCobertores.Text = alquiler.Cobertores.ToString(); txtSobreM.Text = alquiler.SobreMantel.ToString(); txtSillaV.Text = alquiler.SillasVerdes.ToString(); txtSillaB.Text = alquiler.SillasBlancas.ToString(); } } catch (Exception ex) { lblMensaje.Text = ex.Message.Replace("[0-9]*", ""); } }
private void btnEliminar_Click(object sender, EventArgs e) { AlquilerDAO rec = new AlquilerDAO(); rec.BorrarAlquiler(a); rec.Select("todo", dataGridView1); btnActualizar.Enabled = false; btnEliminar.Enabled = false; }
public string Eliminar(string IdAlquiler) { try { var DAO = new AlquilerDAO(); DAO.Eliminar(IdAlquiler); return("exitoso"); } catch (Exception ex) { return(ex.Message); } }
public AlquilerDOM Obtener(string IdEstacimionamiento) { var DAO = new AlquilerDAO(); return(DAO.Obtener(IdEstacimionamiento)); }
public AlquilerDOM Modificar(AlquilerDOM Parametro) { var DAO = new AlquilerDAO(); return(DAO.Modificar(Parametro)); }
public List <AlquilerDOM> Listar() { var DAO = new AlquilerDAO(); return(DAO.Listar()); }
public AlquilerDOM Crear(AlquilerDOM Parametro) { var DAO = new AlquilerDAO(); return(DAO.Crear(Parametro)); }
private void button1_Click(object sender, EventArgs e) { AlquilerDAO alq = new AlquilerDAO(); alq.Select(txtConsulta.Text, dataGridView1); }
public List <AlquilerDOM> AlquilerDuenio(string IdUsuario) { var DAO = new AlquilerDAO(); return(DAO.AlquilerDuenio(IdUsuario)); }
public AlquilerBO() { adao = new AlquilerDAO(); }