예제 #1
0
        private void Btn_anterior_Click(object sender, EventArgs e)
        {
            //Manda el número de flecha al que pertenece este botón para saber hacia donde moverse.
            int flecha = 2;

            fle.movimiento(flecha, dataGr);
        }
예제 #2
0
        private void Btn_anterior_Click(object sender, EventArgs e)
        {
            //Manda el número de flecha al que pertenece este botón para saber hacia donde moverse.
            int flecha = 2, auxI;

            fle.movimiento(flecha, dataGr);
            int fila = DataGr.CurrentRow.Index;

            foreach (Control componente in forma.Controls)
            {
                auxI = 0;
                if ((componente is TextBox) || (componente is ComboBox) || (componente is DateTimePicker))
                {
                    string aux = "";
                    if (componente.Tag != null)
                    {
                        aux = componente.Tag.ToString();
                    }
                    if (!aux.Equals(""))
                    {
                        auxI = Convert.ToInt32(aux);
                    }
                    if (auxI > 0 && auxI <= 999)
                    {
                        string num    = componente.Tag.ToString();
                        int    numero = Convert.ToInt32(num) - 1;
                        componente.Text = dataGr.Rows[fila].Cells[numero].Value.ToString();
                    }
                }
            }
        }
예제 #3
0
        private void Btn_anterior_Click(object sender, EventArgs e)
        {
            //Manda el número de flecha al que pertenece este botón para saber hacia donde moverse.
            int flecha = 2;

            fle.movimiento(flecha, dataGr);
            int fila = DataGr.CurrentRow.Index;

            foreach (Control componente in forma.Controls)
            {
                if ((componente is TextBox) || (componente is ComboBox))
                {
                    string num    = componente.Tag.ToString();
                    int    numero = Convert.ToInt32(num) - 1;
                    componente.Text = dataGr.Rows[fila].Cells[numero].Value.ToString();
                }
            }
        }