コード例 #1
0
        private void editbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("editor");
            AddSubject ad = new AddSubject();

            ad.WindowState = FormWindowState.Normal;
            ad.Show();
        }
コード例 #2
0
        private void editbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("inicio");
            AgendaEvents agendaobject = new AgendaEvents();

            agendaobject.WindowState = FormWindowState.Normal;
            agendaobject.Show();
        }
コード例 #3
0
        private void agregarbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("buscador");
            addContact add = new addContact();

            add.WindowState = FormWindowState.Normal;
            add.Show();
            this.Close();
        }
コード例 #4
0
        private void addbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("buscador");
            EmployeeForm studentaddobject = new EmployeeForm();

            studentaddobject.WindowState = FormWindowState.Maximized;
            studentaddobject.Show();
            this.Close();
        }
コード例 #5
0
        private void agregarbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("buscador");
            agendaAdd agendaobject = new agendaAdd();

            agendaobject.WindowState = FormWindowState.Normal;
            agendaobject.Show();
            this.Close();
        }
コード例 #6
0
        private void tareasverbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("agregador");
            AgendaEvents agendaobject = new AgendaEvents();

            agendaobject.WindowState = FormWindowState.Normal;
            agendaobject.Show();
            this.Close();
        }
コード例 #7
0
        private void changelabel_Click(object sender, EventArgs e)
        {
            panelpad.Hide();
            tipobox.Text = "DOP";
            tipo.Text    = "DOP";
            LoginClass AP = new LoginClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());

            editbutton.Enabled   = false;
            quitarbutton.Enabled = false;



            if (DireccionGestor.getorigen() == "_payfor_table")
            {
                namecombo.Text   = "";
                cantidadbox.Text = "";
                palpad.BackColor = Color.Red;
                DireccionGestor.setorigen("_askfor_table");
                titlelabel.Text  = "CUENTAS POR COBRAR";
                changelabel.Text = "CUENTAS POR PAGAR";
                string orden = "SELECT DEUDOR,FECHA,CANTIDAD FROM  " + UserAccessForm.getusername() + "_askfor_table WHERE `TIPO MONEDA`='" + tipobox.Text + "';";
                AP.ShowDataGridfound(datagrid, orden);
                encontradolabel.Text = AP.getcuenta().ToString();
                titlepanel.Text      = "AGREGAR DEUDOR";
                orden = "SELECT SUM(CANTIDAD) FROM  " + UserAccessForm.getusername() + "_askfor_table WHERE `TIPO MONEDA`='" + tipobox.Text + "';";
                MovementsClass Ad = new MovementsClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());

                Ad.getsuma(totalalbel, tipobox.Text, orden, "CANTIDAD");
                AP = new LoginClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
                string orden2 = "SELECT DEUDOR FROM  " + UserAccessForm.getusername() + "_askfor_table ;";

                AP.Fillcombo(namecombo, orden2);
                panelpad.BackColor = Color.DarkRed;
            }
            else if (DireccionGestor.getorigen() == "_askfor_table")
            {
                namecombo.Text   = "";
                cantidadbox.Text = "";
                palpad.BackColor = Color.Blue;
                DireccionGestor.setorigen("_payfor_table");
                titlelabel.Text  = "CUENTAS POR PAGAR";
                changelabel.Text = "CUENTAS POR COBRAR";
                string orden = "SELECT COBRADOR,FECHA,CANTIDAD FROM  " + UserAccessForm.getusername() + "_payfor_table WHERE `TIPO MONEDA`='" + tipobox.Text + "';";
                AP.ShowDataGridfound(datagrid, orden);
                encontradolabel.Text = AP.getcuenta().ToString();
                titlepanel.Text      = "AGREGAR COBRADOR";
                panelpad.BackColor   = Color.MidnightBlue;
                orden = "SELECT SUM(CANTIDAD) FROM  " + UserAccessForm.getusername() + "_payfor_table WHERE `TIPO MONEDA`='" + tipobox.Text + "';";
                MovementsClass Ad = new MovementsClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());

                Ad.getsuma(totalalbel, tipobox.Text, orden, "CANTIDAD");
                AP = new LoginClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
                string orden2 = "SELECT COBRADOR FROM  " + UserAccessForm.getusername() + "_payfor_table ;";

                AP.Fillcombo(namecombo, orden2);
            }
        }
コード例 #8
0
        private void addbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("buscador");

            UserAddForm adduser = new UserAddForm();

            adduser.WindowState = FormWindowState.Maximized;
            adduser.Show();
            this.Close();
        }
コード例 #9
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();
     }
 }
コード例 #10
0
        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();
        }
コード例 #11
0
        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();
        }
コード例 #12
0
        private void timer_Tick(object sender, EventArgs e)
        {
            if (mode == "carga")
            {
                mode = "";



                LoginClass student = new LoginClass(dbserver, dbname, dbuser, dbpassword, dbport);
                student.FillUserBox(userbox);
                DireccionGestor.setorigen("");
            }
            cuenta++;
            if (cuenta == 8000)
            {
                cuenta = 0;
                closebutton.PerformClick();
            }
        }
コード例 #13
0
        private void timer_Tick(object sender, EventArgs e)
        {
            TimeClass timeobject = new TimeClass();

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


            AgendaClass ev = new AgendaClass(dbserver, dbname, dbuser, dbpassword, dbport);

            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 = "";

            if (DireccionGestor.getorigen() == "inicio")
            {
                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());
                }
                else if (DireccionGestor.getorigen() == "")
                {
                    orden = "";
                    DireccionGestor.setorigen("");
                }
            }
            cuenta++;
            if (cuenta == 3000)
            {
                cuenta = 0;
                backbuttonstrip.PerformClick();
            }
        }
コード例 #14
0
        private void UserAccessForm_Load(object sender, EventArgs e)
        {
            conexionpanel.Hide();
            problemuserbutton.Hide();

            LoginClass student = new LoginClass(dbserver, dbname, dbuser, dbpassword, dbport);

            DireccionGestor.setorigen("");
            if (student.FillUserBox(userbox) == false)
            {
                pictureBox1.Hide();
            }
            else
            {
                pictureBox1.Show();
            }
            picture.Hide();

            mode = "carga";
        }
コード例 #15
0
        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();
                }
            }
        }
コード例 #16
0
        private void dataGrid_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                dataout = new string[5];
                LoginClass ver  = new LoginClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
                string     dato = this.dataGrid.CurrentCell.Value.ToString();

                string orden = "SELECT * FROM " + UserAccessForm.getusername() + "_contacts_table WHERE NOMBRE='" + dato + "';";
                if (ver.fillcombos(namecombo, telefonocombo, orden))
                {
                    editbutton.Enabled   = true;
                    quitarbutton.Enabled = true;

                    try
                    {
                        dataout[0] = namecombo.Text;
                        dataout[1] = telefonocombo.Text;
                        dataout[2] = LoginClass.getdata()[0];
                        dataout[3] = LoginClass.getdata()[1];
                        dataout[4] = LoginClass.getdata()[2];

                        DireccionGestor.setorigen("editor");
                        addContact add = new addContact();
                        add.WindowState = FormWindowState.Normal;
                        add.Show();
                    }
                    catch (IndexOutOfRangeException por)
                    {
                        por.ToString();
                    }
                    this.Close();
                }
                else
                {
                    editbutton.Enabled   = false;
                    quitarbutton.Enabled = false;
                }
            }
            catch (NullReferenceException pafh) { pafh.ToString(); }
        }
コード例 #17
0
        private void pictureBox1_Click_1(object sender, EventArgs e)
        {
            LoginClass student = new LoginClass(dbserver, dbname, dbuser, dbpassword, dbport);

            DireccionGestor.setorigen("");

            string orden = "select * from users_table";

            if (student.ordensql(orden) == true)
            {
                student.FillUserBox(userbox);
                MessageBox.Show("BASE DE DATOS MYSQL ESTA SYNCRONIZADA");
            }
            else
            {
                MessageBox.Show("BASE DE DATOS MYSQL NO HA SIDO SYNCRONIZADA, CREE UN NUEVO USUARIO O SINO REVISE EL PERFIL DE BASE DE DATOS");
            }


            picture.Hide();
        }
コード例 #18
0
        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();
                }
            }
        }
コード例 #19
0
        private void createuserbutton_Click(object sender, EventArgs e)
        {
            LoginClass loginobject = new LoginClass(dbserver, dbname, dbuser, dbpassword, dbport);
            carga      men         = new carga();

            men.WindowState = FormWindowState.Normal;
            men.Show();

            loginobject.FillUserBox(userbox);
            loginobject.CreateSchema("users");
            loginobject.CreateUsertabla();

            username = "";
            this.Hide();

            DireccionGestor.setorigen("out");

            UserAddForm adduser = new UserAddForm();

            adduser.WindowState = FormWindowState.Maximized;
            adduser.Show();
            men.Close();
        }