Example #1
0
        private void LlenarGrid()
        {
            DataTable dt = new DataTable();

            if (rbActivo.Checked)
            {
                P.Estado = true;
            }
            else
            {
                P.Estado = false;
            }
            dt = P.ListadoEquivalenciaP();
            try
            {
                dtgEquivalencia.Rows.Clear();
                for (int x = 0; x < dt.Rows.Count; x++)
                {
                    dtgEquivalencia.Rows.Add(dt.Rows[x][0]);
                    dtgEquivalencia.Rows[x].Cells[0].Value = dt.Rows[x][0].ToString();
                    dtgEquivalencia.Rows[x].Cells[1].Value = dt.Rows[x][1].ToString();
                    dtgEquivalencia.Rows[x].Cells[2].Value = dt.Rows[x][2].ToString();
                    dtgEquivalencia.Rows[x].Cells[3].Value = dt.Rows[x][3].ToString();
                    dtgEquivalencia.Rows[x].Cells[4].Value = dt.Rows[x][4].ToString();
                    dtgEquivalencia.Rows[x].Cells[5].Value = dt.Rows[x][5].ToString();
                    dtgEquivalencia.Rows[x].Cells[6].Value = dt.Rows[x][6].ToString();
                    dtgEquivalencia.Rows[x].Cells[7].Value = dt.Rows[x][7].ToString();
                }
                dtgEquivalencia.ClearSelection();
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "FactSYS", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }