コード例 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (TextBox1.Text.Equals(string.Empty))
     {
         label4.Visible = true;
     }
     else
     {
         tablerows.EditarTablero(tablero.id, TextBox1.Text);
         form.Visible = false;
         this.Visible = false;
         Tablero t = new Tablero(usuario.id, tablero.id);
         t.Show();
     }
 }
コード例 #2
0
ファイル: Perfil.cs プロジェクト: FranciscoQuijadaCruz/Chello
        public void MostrarActividad(object sender, EventArgs e, string id)
        {
            ModalMostrarActividad f2  = new ModalMostrarActividad();
            DialogResult          res = f2.ShowDialog();

            if (res == DialogResult.OK)
            {
                ModuloWS.modulo   modulo  = modulows.SeleccionarModulo(actividadws.SeleccionarActividad(Convert.ToInt32(id)).idModulo);
                TableroWS.tablero tablero = tablerows.SeleccionarTablero(modulows.SeleccionarModulo(actividadws.SeleccionarActividad(Convert.ToInt32(id)).idModulo).idTablero);
                Tablero           t       = new Tablero(usuario.id, tablero.id);
                t.Show();
                Actividad a = new Actividad(Convert.ToInt32(id), usuario.id, t);
                a.Show();
                this.Visible = false;
            }
        }
コード例 #3
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            if (!txtEmail.Text.Equals(string.Empty))
            {
                if (ValidarEmail(txtEmail.Text))
                {
                    if (usuariows.comprobarExistenciaEmail(txtEmail.Text))
                    {
                        int id = tablerousuariows.SeleccionarIdPorTableroYUsuario(idTablero, usuariows.SeleccionUsuarioPorEmail(txtEmail.Text));

                        if (id <= 0)
                        {
                            tablerousuariows.CrearTableroUsuario(idTablero, usuariows.SeleccionUsuarioPorEmail(txtEmail.Text), "USER");
                            this.Visible = false;
                            form.Visible = false;
                            Tablero t = new Tablero(idUsuario, idTablero);
                            t.Show();
                        }
                        else
                        {
                            label4.Text    = "Esta usuario ya forma parte del tablero.";
                            label4.Visible = true;
                        }
                    }
                    else
                    {
                        label4.Text    = "Esta direccion de email no coincide con ningún usuario.";
                        label4.Visible = true;
                    }
                }
                else
                {
                    label4.Text    = "Direccion de correo no válida.";
                    label4.Visible = true;
                }
            }
            else
            {
                label4.Text    = "Favor de no dejar campos vacíos.";
                label4.Visible = true;
            }
        }
コード例 #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            ModalEliminarActividad f2  = new ModalEliminarActividad();
            DialogResult           res = f2.ShowDialog();

            if (res == DialogResult.OK)
            {
                ModuloWS.modulo   modulo  = modulows.SeleccionarModulo(actividadws.SeleccionarActividad(actividad.id).idModulo);
                TableroWS.tablero tablero = tablerows.SeleccionarTablero(modulows.SeleccionarModulo(actividadws.SeleccionarActividad(actividad.id).idModulo).idTablero);
                actividadws.EliminarActividadVirtual(actividad.id);
                modificacionws.CrearModificacion("Eliminacion de actividad " + actividad.estado +
                                                 " de modulo " + modulo.nombre +
                                                 " en tablero " + tablero.titulo,
                                                 DateTime.Now.ToString(), tablero.id, idUser);

                this.Visible = false;
                form.Visible = false;
                Tablero t = new Tablero(idUser, tablero.id);
                t.Show();
            }
        }
コード例 #5
0
        private void btnAceptarTablero_Click(object sender, EventArgs e)
        {
            //PREPARA MENSAJE
            string aviso   = "Aviso";
            string mensaje = "";

            //VALIDAR TXTNOMBRETABLERO
            if (string.IsNullOrEmpty(txtNombreTablero.Text))
            {
                //VACIO
                mensaje = "Por favor ingresa un nombre";
                MessageBox.Show(mensaje, aviso,
                                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else
            {
                try
                {
                    //ASIGNAR TIULO AL TABLERO
                    tablero.titulo = txtNombreTablero.Text;
                    //AGREGAR AL WEB SERVICES
                    tablero.id = tablerows.AgregarTablero(tablero.titulo);
                    if (tablero.id != 0)
                    {
                        mensaje = "Se agregó el tablero";
                        MessageBox.Show(mensaje, aviso,
                                        MessageBoxButtons.OK, MessageBoxIcon.Information);

                        //MODIFICACION VALORES
                        String   descripcion = "Se creó en tablero ";
                        DateTime fecha_s     = new DateTime();
                        String   fecha       = Convert.ToString(fecha_s);

                        tableroUsuariows.CrearTableroUsuario(tablero.id, usuario.id, "ADMIN");
                        modificacionws.CrearModificacion(descripcion, fecha, tablero.id, usuario.id);

                        //this.relacionTableroUsuario(tablero.id, usuario.id);//METODO ENTIDAD REL TABLERO_USUARIO
                        //this.modificacionUsuario();//METODO PARA CREAR MODIFICACION
                        Tablero t = new Tablero(usuario.id, tablerows.AgregarTablero(tablero.titulo));
                        t.Show();
                        this.Visible  = false;
                        index.Visible = false;
                    }
                    else
                    {
                        mensaje = "ERROR. No se agrego el tablero ";
                        MessageBox.Show(mensaje, aviso,
                                        MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
                catch (Exception)
                {
                    mensaje = "ERROR. No se agrego el tablero";
                    MessageBox.Show(mensaje, aviso,
                                    MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                finally
                {
                    //LIMPIAR
                    txtNombreTablero.Text = "";
                }
            }
        }