Exemple #1
0
        void selectClientes()
        {
            var campos = "*";

            foreach (DataRow row in bd.select(campos, tabla).Rows)
            {
                foreach (var item in row.ItemArray)
                {
                    var a = item.ToString();
                }
            }
        }
Exemple #2
0
        public frmDetallesCliente(string id)
        {
            InitializeComponent();
            var bd           = new clsBD();
            var tablaCliente = bd.select("nombreCliente NOMBRE", "Cliente", "codigoCliente=" + id);
            var tablaEstilos = bd.selectEstilos(id);
            var nombre       = tablaCliente.Rows[0]["NOMBRE"].ToString();

            dgvEstilos.DataSource = tablaEstilos;
            lblNombre.Text        = nombre;
        }
Exemple #3
0
        private void frmAltaEstilos_Load(object sender, EventArgs e)
        {
            tabla = "Cliente";
            var campos = "codigoCliente codigo, nombreCliente nombre";

            indexClientes = new List <int>();
            indexColor    = new List <int>();

            foreach (DataRow row in bd.select(campos, tabla).Rows)
            {
                cboCliente.Items.Add(row.ItemArray[1]);
                indexClientes.Add(int.Parse(row.ItemArray[0].ToString()));
            }

            tabla  = "Color";
            campos = "idColor id, nombreColor nombre";

            foreach (DataRow row in bd.select(campos, tabla).Rows)
            {
                cboColor.Items.Add(row.ItemArray[1]);
                indexColor.Add(int.Parse(row.ItemArray[0].ToString()));
            }
        }
Exemple #4
0
        void cargarTabla()
        {
            var tabla = bd.select(cliente.codigo + ", " + cliente.nombre, cliente.tabla, cliente.estatus + "=1");

            dgvClientes.DataSource = tabla;
        }