private void namecombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            LoginClass     AP = new LoginClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
            MovementsClass P  = new MovementsClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());

            if (DireccionGestor.getorigen() == "_payfor_table")
            {
                string orden = "SELECT COBRADOR,FECHA,CANTIDAD FROM  " + UserAccessForm.getusername() + "_payfor_table WHERE `TIPO MONEDA`='" + tipobox.Text + "' AND COBRADOR='" + namecombo.Text + "';";

                AP.ShowDataGridfound(datagrid, orden);
                AP.getcuenta();
                encontradolabel.Text = AP.getcuenta().ToString();
                titlepanel.Text      = "AGREGAR COBRADOR";
                orden = "SELECT SUM(CANTIDAD) FROM  " + UserAccessForm.getusername() + "_payfor_table WHERE `TIPO MONEDA`='" + tipobox.Text + "' AND COBRADOR='" + namecombo.Text + "';";
                P.getsuma(totalalbel, tipobox.Text, orden, "CANTIDAD");
            }
            else if (DireccionGestor.getorigen() == "_askfor_table")
            {
                string orden = "SELECT DEUDOR,FECHA,CANTIDAD FROM  " + UserAccessForm.getusername() + "_askfor_table WHERE `TIPO MONEDA`='" + tipobox.Text + "' AND DEUDOR='" + namecombo.Text + "';";

                AP.ShowDataGridfound(datagrid, orden);
                AP.getcuenta();
                encontradolabel.Text = AP.getcuenta().ToString();
                titlepanel.Text      = "AGREGAR COBRADOR";
                orden = "SELECT SUM(CANTIDAD) FROM  " + UserAccessForm.getusername() + "_askfor_table WHERE `TIPO MONEDA`='" + tipobox.Text + "' AND DEUDOR='" + namecombo.Text + "';";
                P.getsuma(totalalbel, tipobox.Text, orden, "CANTIDAD");


                ////////////////////////////////////////////////////////////
            }
        }
        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();
            }
        }
        private void AddSubject_Load(object sender, EventArgs e)
        {
            OKbutton.BackColor         = Color.Green;
            cancelbutton.BackColor     = Color.Red;
            subjectverbutton.BackColor = Color.Blue;

            EmployeeClass ver   = new EmployeeClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
            string        orden = "SELECT `NOMBRE COMPLETO` FROM " + UserAccessForm.getusername() + "_employee_table;";

            ver.FillNameBox(comboasignado, orden);


            if (DireccionGestor.getorigen() == "inicio")
            {
                titlelabel.Text = "AGREGAR ASIGNATURA";
            }
            else if (DireccionGestor.getorigen() == "editor")
            {
                titlelabel.Text = "MODIFICAR ASIGNATURA";
                try {
                    asignaturatextbox.Text   = ShowSubjects.getinfo()[0];
                    comboasignado.Text       = ShowSubjects.getinfo()[1];
                    descripcionbox.Text      = ShowSubjects.getinfo()[2];
                    subjectverbutton.Enabled = false;
                } catch (NullReferenceException epd) { epd.ToString(); }
            }
            else if (DireccionGestor.getorigen() == "buscador")
            {
                titlelabel.Text          = "AGREGAR ASIGNATURA";
                subjectverbutton.Enabled = false;
            }

            ver.FillNameBox(comboasignado, orden);
        }
Exemple #4
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(); }
        }
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            DireccionGestor.setcloseshowuser();
            if (DireccionGestor.getorigen() == "" || DireccionGestor.getorigen() == null || DireccionGestor.getorigen() == "out")
            {
                UserAccessForm menu = new UserAccessForm();
                //menu.WindowState = FormWindowState.Normal;
                menu.Show();

                LoginClass save = new LoginClass();
                // this.Close();
            }
            else if (DireccionGestor.getorigen() == "buscador" || UsersShowForm.getstate() == "edit")
            {
                UsersShowForm menu = new UsersShowForm();
                //menu.WindowState = FormWindowState.Maximized;
                menu.Show();
                LoginClass save = new LoginClass();
                // this.Hide();
            }
            else if (DireccionGestor.getorigen() == "inicio")
            {
                DireccionGestor menu = new DireccionGestor();

                //menu.WindowState = FormWindowState.Maximized;
                menu.Show();
                LoginClass save = new LoginClass();
                // this.Hide();
            }

            this.Close();
        }
        private void accessbutton_Click(object sender, EventArgs e)
        {
            int hour  = DateTime.Now.Hour;
            int min   = DateTime.Now.Minute;
            int sec   = DateTime.Now.Second;
            int day   = DateTime.Now.Day;
            int month = DateTime.Now.Month;
            int year  = DateTime.Now.Year;


            string fecha = day.ToString() + "/" + month.ToString() + "/" + year.ToString();
            string hora  = hour.ToString() + ":" + min.ToString() + ":" + sec.ToString();

            username = userbox.Text;
            problemuserbutton.Hide();

            if (userbox.Text != "" || passwordbox.Text != "")
            {
                LoginClass control = new LoginClass(dbserver, dbname, dbuser, dbpassword, dbport);

                control.setConection(userbox.Text, passwordbox.Text);

                if (control.setConection(userbox.Text, passwordbox.Text) == true)
                {
                    cuenta = 0;

                    string order = "UPDATE users_table SET `FECHA_LAST_CONECTION`= '" + fecha + "', `HORA_LAST_CONECTION`='" + hora + "' WHERE `USER_NAME`='" + userbox.Text + "' ;";
                    control.ordensql(order);
                    DireccionGestor menu = new DireccionGestor();


                    menu.WindowState = FormWindowState.Maximized;


                    this.Hide();
                    menu.Show();
                }
                else if (control.setConection(userbox.Text, passwordbox.Text) == false)
                {
                    cuenta++;
                    if (cuenta == 5)
                    {
                        MessageBox.Show("POR MOTIVOS DE SEGURIDAD LA APLICACION SE CERRARA");
                        this.Close();
                    }
                    problemuserbutton.Text = control.getMensajeUser();
                    problemuserbutton.Text = "Hay problemas con el USUARIO o la CONTRASEÑA, Modificar Usuario?";


                    problemuserbutton.Show();
                    userbox.Text     = "";
                    passwordbox.Text = "";
                }
            }
            else
            {
                problemuserbutton.Show();
            }
        }
        private void backstripbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor begin = new DireccionGestor();

            begin.WindowState = FormWindowState.Normal;
            begin.Show();
            this.Close();
        }
Exemple #8
0
        private void editbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("inicio");
            AgendaEvents agendaobject = new AgendaEvents();

            agendaobject.WindowState = FormWindowState.Normal;
            agendaobject.Show();
        }
        private void editbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("editor");
            AddSubject ad = new AddSubject();

            ad.WindowState = FormWindowState.Normal;
            ad.Show();
        }
Exemple #10
0
        private void cancelbuttonstrip_Click(object sender, EventArgs e)
        {
            DireccionGestor menu = new DireccionGestor();

            menu.WindowState = FormWindowState.Maximized;
            menu.Show();
            this.Close();
        }
Exemple #11
0
        private void agregarbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("buscador");
            agendaAdd agendaobject = new agendaAdd();

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

            agendaobject.WindowState = FormWindowState.Normal;
            agendaobject.Show();
            this.Close();
        }
        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);
            }
        }
        private void agregarbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("buscador");
            addContact add = new addContact();

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

            studentaddobject.WindowState = FormWindowState.Maximized;
            studentaddobject.Show();
            this.Close();
        }
        private void cancelbuttonstrip_Click(object sender, EventArgs e)
        {
            DireccionGestor.setcloseshowuser();

            UserAccessForm begin = new UserAccessForm();

            begin.WindowState = FormWindowState.Normal;
            begin.Show();
            this.Close();
        }
        private void addbutton_Click(object sender, EventArgs e)
        {
            DireccionGestor.setorigen("buscador");

            UserAddForm adduser = new UserAddForm();

            adduser.WindowState = FormWindowState.Maximized;
            adduser.Show();
            this.Close();
        }
Exemple #18
0
        private void backbuttonstrip_Click(object sender, EventArgs e)
        {
            if (DireccionGestor.getorigen() == "agregador")
            {
                agendaAdd agendaobject = new agendaAdd();
                agendaobject.WindowState = FormWindowState.Normal;
                agendaobject.Show();
            }


            this.Close();
        }
Exemple #19
0
 private void cancelbutton_Click(object sender, EventArgs e)
 {
     if (DireccionGestor.getorigen() == "editor" || DireccionGestor.getorigen() == "buscador")
     {
         ShowContacts pop = new ShowContacts();
         pop.WindowState = FormWindowState.Normal;
         pop.Show();
         this.Close();
     }
     else
     {
         this.Close();
     }
 }
Exemple #20
0
 public carga()
 {
     InitializeComponent();
     if (DireccionGestor.getorigen() == "listo")
     {
         //message2.Show();
         message.Hide();
     }
     else
     {
         //message2.Hide();
         message.Show();
     }
 }
Exemple #21
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();
     }
 }
Exemple #22
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     if (DireccionGestor.getorigen() == "editor" || DireccionGestor.getorigen() == "buscador")
     {
         EmployeeFormSearch menu = new EmployeeFormSearch();
         menu.WindowState = FormWindowState.Maximized;
         menu.Show();
         this.Hide();
     }
     else
     {
         DireccionGestor menu = new DireccionGestor();
         menu.WindowState = FormWindowState.Maximized;
         menu.Show();
         this.Hide();
     }
 }
 private void findinggrid_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try {
         EmployeeClass show         = new EmployeeClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
         string        userDataName = UserAccessForm.getusername() + "_employee_table";
         string        dato         = this.findinggrid.CurrentCell.Value.ToString();
         comboname.Text = dato;
         string orden = "select * from " + userDataName + " where `NOMBRE COMPLETO` = '" + comboname.Text + "';";
         DireccionGestor.setordensql(orden);
         if (show.fillboxes(comboname, birthdatebox, edadbox, cargobox, workingbox, getindateTimePicker, getoutdateTimePicker, workingbox, trabajandopanel, orden) == true)
         {
             EmployeeOutForm menu = new EmployeeOutForm();
             menu.WindowState = FormWindowState.Maximized;
             menu.Show();
             this.Close();
         }
     } catch (NullReferenceException pafh) { pafh.ToString(); }
 }
        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)
        {
            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)
        {
            entrada = "editar";
            string         date = fechabox.Value.Day.ToString() + "/" + fechabox.Value.Month.ToString() + "/" + fechabox.Value.Year.ToString();
            LoginClass     AP   = new LoginClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());
            MovementsClass Ad   = new MovementsClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport());


            if (DireccionGestor.getorigen() == "_payfor_table")
            {
                titlepanel.Text = "EDITAR CUENTA POR PAGAR";
                string orden = "SELECT * FROM  " + UserAccessForm.getusername() + "_payfor_table WHERE `TIPO MONEDA`='" + tipobox.Text + "' AND  COBRADOR='" + namecombo.Text + "' AND MONTO='" + cantidadbox.Text + "' AND FECHA='" + date + "';";


                AP.ShowDataGridfound(datagrid, orden);
                id         = MovementsClass.getdato()[0];
                name.Text  = MovementsClass.getdato()[1];
                fecha.Text = MovementsClass.getdato()[2];

                monto.Text = MovementsClass.getdato()[3];
                tipo.Text  = MovementsClass.getdato()[4];
                panelpad.Show();
                entrada = "editar";
                openpad = true;
            }
            else if (DireccionGestor.getorigen() == "_askfor_table")
            {
                titlepanel.Text = "EDITAR CUENTA POR COBRAR";
                string orden = "SELECT * FROM  " + UserAccessForm.getusername() + "_askfor_table WHERE `TIPO MONEDA`='" + tipobox.Text + "' AND  COBRADOR='" + namecombo.Text + "' AND MONTO='" + cantidadbox.Text + "' AND FECHA='" + date + "';";

                AP.ShowDataGridfound(datagrid, orden);

                id         = MovementsClass.getdato()[0];
                name.Text  = MovementsClass.getdato()[1];
                fecha.Text = MovementsClass.getdato()[2];

                monto.Text = MovementsClass.getdato()[3];
                tipo.Text  = MovementsClass.getdato()[4];

                panelpad.Show();
                entrada = "editar";
                openpad = true;
            }
        }
        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();
            }
        }
        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";
        }
Exemple #29
0
 private void IngresosForm_Load(object sender, EventArgs e)
 {
     if (DireccionGestor.getorigen() == "inicio")
     {
         monedatipo.Text  = "DOP";
         fondoorigen.Text = "EFECTIVO";
     }
     else if (DireccionGestor.getorigen() == "editor")
     {
         titleingreso.Text   = "MODIFICAR INGRESO";
         gastostrip.Text     = "MODIFICAR";
         datebox.Text        = MovementsClass.getdato()[2];
         horabox.Text        = MovementsClass.getdato()[3];
         reasonbox.Text      = MovementsClass.getdato()[1];
         monedatipo.Text     = MovementsClass.getdato()[5];
         cuantitybox.Text    = MovementsClass.getdato()[4];
         explanationbox.Text = MovementsClass.getdato()[6];
         fondoorigen.Text    = MovementsClass.getdato()[7];
     }
 }
        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(); }
        }