private void timer_Tick(object sender, EventArgs e)
        {
            TimeClass timeobject = new TimeClass();

            hourlabelstrip.Text = timeobject.clockshape();
            datelabelstrip.Text = timeobject.dateshape();


            AgendaClass ev = new AgendaClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());

            string hora       = DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString();
            string fechal     = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString();;
            string fechashort = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString();



            string orden = "SELECT DESCRIPCION, HORA, PRIORIDAD FROM " + UserAccessForm.getusername() + "_events_table WHERE (HORA='" + hora + "' AND ( FECHA='" + fechal + "' or `FECHA DE RECORDATORIO`='" + fechashort + "'))AND ACTIVO='SI';";

            if (ev.getnametarea(orden))
            {
                DireccionGestor.setsombrestatic(ev.getname());
                DireccionGestor.setotrostatic(ev.gettime());
                DireccionGestor.setprioridadstatic(ev.getprioridad());
                DireccionGestor.setestadostatic(true);

                SystemSounds.Hand.Play();
                MessageBox.Show("SON LAS " + ev.gettime() + " ES HORA DE " + ev.getname());
            }
            cuenta++;
            if (cuenta == 5000)
            {
                cuenta = 0;
                backbuttonstrip.PerformClick();
            }
        }
Exemple #2
0
        private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try {
                AgendaClass show         = new AgendaClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
                string      userDataName = UserAccessForm.getusername() + "_events_table";
                string      dato         = this.dataGridView1.CurrentCell.Value.ToString();
                comboeventoname.Text = dato;
                string orden = "select * from " + userDataName + " where `DESCRIPCION` = '" + comboeventoname.Text + "' ORDER BY PRIORIDAD ASC;";
                show.fillboxes(comboeventoname, fechabox, activobox, timebox, orden);

                if (activobox.Text == "NO")
                {
                    quitarbutton.Enabled = false;
                }
                else
                {
                    quitarbutton.Enabled = true;
                }

                if (comboeventoname.Text != "")
                {
                    editbutton.Enabled = true;
                }
                else
                {
                    editbutton.Enabled = false;
                }

                DireccionGestor.setsombrestatic(comboeventoname.Text);
                DireccionGestor.setotrostatic(fechabox.Value.Day.ToString() + "/" + fechabox.Value.Month.ToString() + "/" + fechabox.Value.Year.ToString());
            }
            catch (NullReferenceException pafh) { pafh.ToString(); }
        }
Exemple #3
0
 private void editbutton_Click(object sender, EventArgs e)
 {
     if (comboeventoname.Text == "")
     {
         MessageBox.Show("DEBE SELECCIONAR UNA TAREA PARA EDITAR");
     }
     else
     {
         DireccionGestor.setsombrestatic(comboeventoname.Text);
         DireccionGestor.setotrostatic(fechabox.Value.Day.ToString() + "/" + fechabox.Value.Month.ToString() + "/" + fechabox.Value.Year.ToString());
         DireccionGestor.setorigen("modificar");
         agendaAdd agendaobject = new agendaAdd();
         agendaobject.WindowState = FormWindowState.Normal;
         agendaobject.Show();
     }
 }
        private void editbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("editor");

            DireccionGestor.setsombrestatic(namelabel.Text);
            DireccionGestor.setotrostatic(joblabel.Text);
            string        userDataName = UserAccessForm.getusername() + "_employee_table";
            EmployeeClass student      = new EmployeeClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
            string        orden        = "SELECT * FROM " + userDataName + " WHERE `NOMBRE COMPLETO`= '" + namelabel.Text + "' and EDAD = '" + agelabel.Text + "';";

            DireccionGestor.setorigen("editor");
            DireccionGestor.setordensql(orden);
            EmployeeForm studentaddobject = new EmployeeForm();

            studentaddobject.WindowState = FormWindowState.Maximized;
            studentaddobject.Show();
            this.Close();
        }
        private void editbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setsombrestatic(namelabel.Text);

            DireccionGestor.setotrostatic(gradelabel.Text);
            string        userDataName = UserAccessForm.getusername() + "_student_table";
            StudentsClass student      = new StudentsClass();
            string        orden        = "select * from " + userDataName + " where `NOMBRE COMPLETO` = '" + namelabel.Text + "' and CURSO= '" + gradelabel.Text + "';";

            DireccionGestor.setorigen("editor");
            DireccionGestor.setordensql(orden);

            StudentForm studentaddobject = new StudentForm();

            studentaddobject.WindowState = FormWindowState.Maximized;
            studentaddobject.Show();
            this.Close();
        }
        private void editbutton_Click(object sender, EventArgs e)
        {
            if (cargobox.Text == "" || edadbox.Text == "" || comboname.Text == "")
            {
                MessageBox.Show("Hay datos importantes faltantes.");

                if (cargobox.Text == "")
                {
                    cargobox.BackColor = Color.Red;
                }
                if (edadbox.Text == "")
                {
                    edadbox.BackColor = Color.Red;
                }
                if (comboname.Text == "")
                {
                    comboname.BackColor = Color.Red;
                }
            }
            else
            {
                DireccionGestor.setsombrestatic(comboname.Text);
                DireccionGestor.setedadstatic(int.Parse(edadbox.Text));
                DireccionGestor.setotrostatic(cargobox.Text);
                string        userDataName = UserAccessForm.getusername() + "_employee_table";
                EmployeeClass student      = new EmployeeClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
                string        orden        = "SELECT * FROM " + userDataName + " WHERE `NOMBRE COMPLETO`= '" + comboname.Text + "' and EDAD = '" + edadbox.Text + "' and ID='" + EmployeeClass.getids() + "';";

                DireccionGestor.setorigen("editor");
                DireccionGestor.setordensql(orden);


                if (student.fillcombos(comboname, edadbox, cargobox, orden) == true)
                {
                    EmployeeForm studentaddobject = new EmployeeForm();
                    studentaddobject.WindowState = FormWindowState.Maximized;
                    studentaddobject.Show();
                    this.Close();
                }
            }
        }
Exemple #7
0
 private void datainicio_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (nombre != "")
     {
         quitarbutton.Enabled = true;
     }
     else
     {
         quitarbutton.Enabled = false;
     }
     try {
         AgendaClass show         = new AgendaClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
         string      userDataName = UserAccessForm.getusername() + "_events_table";
         string      dato         = this.datainicio.CurrentCell.Value.ToString();
         nombre = dato;
         string orden = "select * from " + userDataName + " where `DESCRIPCION` = '" + nombre + "' ORDER BY PRIORIDAD ASC;";
         show.getname(nombre, fecha, prioridad, orden);
         DireccionGestor.setsombrestatic(nombre);
         DireccionGestor.setotrostatic(fecha);
     } catch (NullReferenceException pafh) { pafh.ToString(); }
 }
        private void editbutton_Click(object sender, EventArgs e)
        {
            if (gradebox.Text == "" || edadbox.Text == "" || namebox.Text == "")
            {
                MessageBox.Show("Hay datos importantes faltantes.");

                if (gradebox.Text == "")
                {
                    gradebox.BackColor = Color.Red;
                }
                if (edadbox.Text == "")
                {
                    edadbox.BackColor = Color.Red;
                }
                if (namebox.Text == "")
                {
                    namebox.BackColor = Color.Red;
                }
            }
            else
            {
                DireccionGestor.setsombrestatic(namebox.Text);
                DireccionGestor.setedadstatic(int.Parse(edadbox.Text));
                DireccionGestor.setotrostatic(gradebox.Text);
                string        userDataName = UserAccessForm.getusername() + "_student_table";
                StudentsClass student      = new StudentsClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
                string        orden        = "select * from " + userDataName + " where `NOMBRE COMPLETO` = '" + namebox.Text + "' and EDAD = '" + edadbox.Text + "' and CURSO= '" + gradebox.Text + "';";
                if (student.fillcombos(namebox, edadbox, gradebox, orden) == true)
                {
                    DireccionGestor.setorigen("editor");
                    DireccionGestor.setordensql(orden);

                    StudentForm studentaddobject = new StudentForm();
                    studentaddobject.WindowState = FormWindowState.Maximized;
                    studentaddobject.Show();
                    this.Close();
                }
            }
        }