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]*", "");
            }
        }
예제 #3
0
        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;
        }
예제 #4
0
 public string Eliminar(string IdAlquiler)
 {
     try
     {
         var DAO = new AlquilerDAO();
         DAO.Eliminar(IdAlquiler);
         return("exitoso");
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
예제 #5
0
        public AlquilerDOM Obtener(string IdEstacimionamiento)
        {
            var DAO = new AlquilerDAO();

            return(DAO.Obtener(IdEstacimionamiento));
        }
예제 #6
0
        public AlquilerDOM Modificar(AlquilerDOM Parametro)
        {
            var DAO = new AlquilerDAO();

            return(DAO.Modificar(Parametro));
        }
예제 #7
0
        public List <AlquilerDOM> Listar()
        {
            var DAO = new AlquilerDAO();

            return(DAO.Listar());
        }
예제 #8
0
        public AlquilerDOM Crear(AlquilerDOM Parametro)
        {
            var DAO = new AlquilerDAO();

            return(DAO.Crear(Parametro));
        }
예제 #9
0
        private void button1_Click(object sender, EventArgs e)
        {
            AlquilerDAO alq = new AlquilerDAO();

            alq.Select(txtConsulta.Text, dataGridView1);
        }
예제 #10
0
        public List <AlquilerDOM> AlquilerDuenio(string IdUsuario)
        {
            var DAO = new AlquilerDAO();

            return(DAO.AlquilerDuenio(IdUsuario));
        }
예제 #11
0
 public AlquilerBO()
 {
     adao = new AlquilerDAO();
 }