Example #1
0
        public bool guardarCosto(Costo costo)
        {
            String consulta = "exec guardarCosto '" + costo.getNombre() +
                              "'," + costo.getMonto() + ";";

            return(ejecutar(consulta));
        }
Example #2
0
        public bool modificarCosto(Costo cos)
        {
            String consulta = "exec editarCosto '" + costo.getNombre() +
                              "'," + costo.getMonto() + ";";

            return(ejecutar(consulta));
        }
 private void txtNombre_KeyPress_1(object sender, KeyPressEventArgs e)
 {
     if ((int)e.KeyChar == (int)Keys.Enter)
     {
         String nombre = txtNombre.Text;
         if (nombre.Length != 0)
         {
             Costo c = ctlCos.SolicitudBuscarCosto(nombre);
             if (c != null)
             {
                 txtCosto.Text = c.getMonto().ToString();
                 aux           = c.getId();
                 //habilitarCampos();
                 //btnGuardar.Enabled = false;
                 //btnEditar.Enabled = true;
                 //btnEliminar.Enabled = true;
             }
             else
             {
                 MessageBox.Show("El costo no existe, por favor adicionalo");
                 //habilitarCampos();
                 //btnGuardar.Enabled = true;
                 //btnEditar.Enabled = false;
                 //btnEliminar.Enabled = false;
             }
         }
     }
 }