Exemplo n.º 1
0
        public void cargarInventario()
        {
            opcionesdb opcione = new opcionesdb();

            this.radGridView1.MasterTemplate.Rows.Clear();
            DataTable tabla = opcione.productoJOIN();
            DataRow   row;

            for (int f = 0; f < tabla.Rows.Count; f++)
            {
                row = tabla.Rows[f];
                radGridView1.Rows.AddNew();
                int x = radGridView1.Rows.Count;
                this.radGridView1.Rows[x - 1].Cells[0].Value = row["CodigoBarra"].ToString();
                this.radGridView1.Rows[x - 1].Cells[1].Value = row["Correlativo"].ToString();
                this.radGridView1.Rows[x - 1].Cells[2].Value = row["Nombre"].ToString();
                this.radGridView1.Rows[x - 1].Cells[3].Value = row["Gravado"].ToString();
                this.radGridView1.Rows[x - 1].Cells[4].Value = row["NombreP"].ToString();
                TotalInve = TotalInve + System.Convert.ToDouble(row["Gravado"].ToString());
            }
            txtTotal.Text = TotalInve + "";
            labelTP.Text  = radGridView1.Rows.Count + "";
        }