示例#1
0
        private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            PConsProveedor doform = new PConsProveedor();

            if (doform.ShowDialog() == DialogResult.OK)
            {
                int pos = doform.dgvdata.CurrentCell.RowIndex;

                txtcodproveedor.Text = doform.dgvdata.Rows[pos].Cells["idproveedor"].Value.ToString();
                txtcodproveedor.Focus();
            }
        }
示例#2
0
        private void btnbuscar_Click(object sender, EventArgs e)
        {
            PConsProveedor doform = new PConsProveedor();

            if (doform.ShowDialog() == DialogResult.OK)
            {
                int pos = doform.dgvdata.CurrentCell.RowIndex;
                txtcodigo.Text    = doform.dgvdata.Rows[pos].Cells["idproveedor"].Value.ToString();
                txtnombre.Text    = doform.dgvdata.Rows[pos].Cells["nombre"].Value.ToString();
                txtdireccion.Text = doform.dgvdata.Rows[pos].Cells["direccion"].Value.ToString();
                txttelefono.Text  = doform.dgvdata.Rows[pos].Cells["telefono"].Value.ToString();
            }
        }