示例#1
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            opcionesdb opciones = new opcionesdb();
            DataTable  tabla    = opciones.productoJOINFiltro(System.Convert.ToInt32(radDropDownList2.SelectedItem.Value.ToString()), txtNombre.Text);
            DataRow    row;

            this.radGridView1.MasterTemplate.Rows.Clear();
            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 + "";
        }